Nuke Toolbar

          
Quick Links 
 [Home Page ][ Category Listings ][ Forum Listings][ Forum FAQs]
[ HomeDNS - Domains ]  [ Nuke Resources ]  [ Nuke Skins and Themes ]  [ Nuke Sites Link Directory ]
[ LearningLinux.com ]  [ Nuke Fixes ]
[ NukeZone Hosting ]  [ Domain Name Database ]
Nuke Forums Forum Index

Nuke Sites Link Directory


Admin Security login jpeg not showing
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Nuke Forums Forum Index -> PHP-Nuke 6.x Installation
View previous topic :: View next topic  
Author Message
findit
Guest






PostPosted: Thu Apr 03, 2003 1:51 pm    Post subject: Reply with quote

Hi all

Have looked all through the forums here and elswhere...the admin login jpeg security code that is suppose to show is not showing...and all the forums waffle on about gd libraries, or language files...or uploading the gifs.

Well the login jpeg worked once,(got into admin once) that is it...will not work now..have not changed anything..not uploaded anything, and not modded anything...so i know that the gd library is ok and the image file is there. (and dont say try the Analyzer.php) have been using that since it first came out...my server has all, and more than needed for nuke.

what i need is a way around this. (disable the security code) or display the security code without the jpeg...anything...as I cannot get into admin at all anymore.

Is thier anybody that can help me...or do i need to go back to nuke 6.0

Many thanks

Richard
Back to top
Humpa
President
President


Joined: 23 Apr 2002
Posts: 3429


PostPosted: Thu Apr 03, 2003 2:25 pm    Post subject: Reply with quote

1. Are you getting a broken image or no img tag at all?
2. Can I see?
3. You said you logged in once, was the security code image there when you logged in that one time?
Back to top
View user's profile Send private message
findit
Guest






PostPosted: Thu Apr 03, 2003 2:34 pm    Post subject: Reply with quote

Hi Humpa
Yes the image was there then...I have since given up with trying to get the image to appear...I deleted the code in admin.php

if (extension_loaded("gd")) {
echo "<tr><td colspan='2'>"._SECURITYCODE.": <img src='admin.php?op=gfx&random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'></td></tr>"
."<tr><td colspan='2'>"._TYPESECCODE.": <input type="text" NAME="gfx_check" SIZE="7" MAXLENGTH="6"></td></tr>";
}


and the code in auth.php
if ((isset($aid)) && (isset($pwd)) && ($op == "login")) {
$datekey = date("F j");
$rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $_POST[random_num] . $datekey));
$code = substr($rcode, 2, 6);
if (extension_loaded("gd") AND $code != $_POST[gfx_check]) {
Header("Location: admin.php");
die();
}


got fed-up as i know my server has all the gd libraries needed and some to spare as i used these to creat thumbnails in My_eGallery..so i decided to delete the dodgy code.

I know you are the man when it come to these problems...but a post i found from you(sending people to a forum download) relating to this script has been sending people to a currupted file download.

all the best

Richard
Back to top
Humpa
President
President


Joined: 23 Apr 2002
Posts: 3429


PostPosted: Thu Apr 03, 2003 2:45 pm    Post subject: Reply with quote

what is this corrupted file that I am sending people to?

... and I have seen someone get a broken img tag on the security code because of a bad cookie. Deleting cookies fixed it.
That is why I asked to see the page, and also why I asked if you were getting a broken img tag.
Back to top
View user's profile Send private message
findit
Guest






PostPosted: Thu Apr 03, 2003 3:04 pm    Post subject: Reply with quote

Sorry Humpa

Caould not find all of the links that i was on previously...the currupted file i deleted as it WAS Currupted (if i find it again i will let you know)the dead link that you have posted in the PHP-Nuke site is:
http://www.nukeforums.com/forums/viewtopic.php?topic=14359&forum=39
(This is not your problem as i think it is a post that has been removed) dont get me wrong Humpa...you are about the only bloke that offers decent answers to request on the nuke subjects.

as for the cookies...that is an old problem...that causes amny problems (so yes i deleted the cookies).
it was the box with the bog red X...which supports a broken link to the image file..ut that is not the case..as it is there...and i have had the link working Ok...Once (ye..i know stupid eh).
never mind have deleted the dodgy code and i can get into admin now...if there are people with the same problem...as i know from searching this problem, that there are many...you can link them to this thread as the deletion of the code has enabled me to get into admin.

Richard
Back to top
Lateron
Sergeant
Sergeant


Joined: 07 Jul 2002
Posts: 24
Location: Australia

PostPosted: Thu Apr 03, 2003 3:48 pm    Post subject: Reply with quote

I don't know if it is any help but see


http://www.nukeforums.com/forums/viewtopic.php?topic=14525&forum=40&4

I could log in after my upgrade because I had not logged admin off before doing it. Once I did logoff no security image.
Back to top
View user's profile Send private message Visit poster's website
findit
Guest






PostPosted: Thu Apr 03, 2003 3:57 pm    Post subject: Reply with quote

Thanks Lateron

I have been through all that...saying about the gd library...and the login as admin first...but that does not tell us why we can not get in again...strange eh!...no probelm to start with...then it is all blamed on the gd library...I know i have all the files and have run the Analyze.php (gd library installed) have contacted host...latest PHP and all gd library code installed.....I am stumped...

Thanks for the reply though

Richard
Back to top
Lateron
Sergeant
Sergeant


Joined: 07 Jul 2002
Posts: 24
Location: Australia

PostPosted: Thu Apr 03, 2003 4:12 pm    Post subject: Reply with quote

Hi Richard,

This is the reply from my host after lodging a support docket:

"The problem is on the machine itself we only run GD 1.8 where as the included GD with PHP gives us GD 2.0 support. We can't upgrade to 2.0 since the system simply won't do it so we are left at a catch 22.

Going to Use GD 2.0 and you have to do without Jpeg support."

I am not sure what it means because my knowledge of servers is nil. However, they are moving my sites to a new server where I all ready have other 6.5 sites and I know the security jpeg works.

Cheers, Ron...
Back to top
View user's profile Send private message Visit poster's website
findit
Guest






PostPosted: Thu Apr 03, 2003 4:20 pm    Post subject: Reply with quote

Cheers Ron

Have already spoke with my host and they have version 1.0 and 2.0 available...which does support jpeg...never mind..will keep modding...hacking...plodding along untill i find a cure.

Many thanks Ron

Richard
Back to top
Humpa
President
President


Joined: 23 Apr 2002
Posts: 3429


PostPosted: Thu Apr 03, 2003 5:09 pm    Post subject: Reply with quote

Just use a png of a gif .. the code is easily modified.

To use a png, replace the function gfx in the admin.php with this:
Code:
function gfx($random_num) {
    global $prefix, $db;
    require("config.php");
    $datekey = date("F j");
    $rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
    $code = substr($rcode, 2, 6);
    $image = imagecreatefrompng("images/admin/code_bg.png");
    $text_color = ImageColorAllocate($image, 80, 80, 80);
    Header("Content-type: image/png");
    ImageString ($image, 5, 12, 2, $code, $text_color);
    Imagepng($image, '', 75);
    ImageDestroy($image);
    die();
}

And, replace the function gfx in the modules/Your_Account/index.php with this:
Code:
function gfx($random_num) {
    global $prefix, $db, $module_name;;
    require("config.php");
    $datekey = date("F j");
    $rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
    $code = substr($rcode, 2, 6);
    $image = imagecreatefrompng("modules/$module_name/images/code_bg.png");
    $text_color = ImageColorAllocate($image, 80, 80, 80);
    Header("Content-type: image/png");
    ImageString ($image, 5, 12, 2, $code, $text_color);
    Imagepng($image, '', 75);
    ImageDestroy($image);
    die();
}

Upload the code_bg.png to the images/admin folder, and also the modules/Your_Account/images folder.


[ This Message was edited by: Humpa on 2003-04-03 19:11 ]
Back to top
View user's profile Send private message
Humpa
President
President


Joined: 23 Apr 2002
Posts: 3429


PostPosted: Thu Apr 03, 2003 5:13 pm    Post subject: Reply with quote

If you cant use png files either, then try a gif.
To use a gif, replace the function gfx in the admin.php with this:
Code:
function gfx($random_num) {
    global $prefix, $db;
    require("config.php");
    $datekey = date("F j");
    $rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
    $code = substr($rcode, 2, 6);
    $image = imagecreatefromgif("images/admin/code_bg.gif");
    $text_color = ImageColorAllocate($image, 80, 80, 80);
    Header("Content-type: image/gif");
    ImageString ($image, 5, 12, 2, $code, $text_color);
    Imagegif($image, '', 75);
    ImageDestroy($image);
    die();
}

And, replace the function gfx in the modules/Your_Account/index.php with this:
Code:
function gfx($random_num) {
    global $prefix, $db, $module_name;;
    require("config.php");
    $datekey = date("F j");
    $rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
    $code = substr($rcode, 2, 6);
    $image = imagecreatefromgif("modules/$module_name/images/code_bg.gif");
    $text_color = ImageColorAllocate($image, 80, 80, 80);
    Header("Content-type: image/gif");
    ImageString ($image, 5, 12, 2, $code, $text_color);
    Imagegif($image, '', 75);
    ImageDestroy($image);
    die();
}

Upload the code_bg.gif to the images/admin folder, and also the modules/Your_Account/images folder.
Back to top
View user's profile Send private message
Go*.*
Captain
Captain


Joined: 09 Feb 2002
Posts: 290


PostPosted: Thu Apr 03, 2003 9:00 pm    Post subject: Reply with quote

Humpa man thats the most logical thing anyones said about this graphic chit period!

Back to top
View user's profile Send private message
Lateron
Sergeant
Sergeant


Joined: 07 Jul 2002
Posts: 24
Location: Australia

PostPosted: Thu Apr 03, 2003 11:16 pm    Post subject: Reply with quote

I hope this security system is worth it because I reckon it is a pain in the a**e. Not only when it's not working as per this thread but also to use on a daily basis.

I am running nuke on four different hosted servers. On three servers 6.5 is running 'out of the box' on both upgrades and fresh installs. I have tried the above png and gif solution but it is still not working and I give up on this one. My host is moving the sites over to one of the other three servers where it will work.



[ This Message was edited by: Lateron on 2003-04-04 01:17 ]
Back to top
View user's profile Send private message Visit poster's website
Lateron
Sergeant
Sergeant


Joined: 07 Jul 2002
Posts: 24
Location: Australia

PostPosted: Tue Apr 08, 2003 3:33 am    Post subject: Reply with quote

Update:

My host moved the site to a newer, up-to-date server and now the jpeg problem is gone.

Not the easiest of solutions as the domain had to repropagate etc.
Back to top
View user's profile Send private message Visit poster's website
CoCo
Staff Sergeant
Staff Sergeant


Joined: 22 Jan 2002
Posts: 33


PostPosted: Tue Apr 08, 2003 11:45 am    Post subject: Reply with quote

I have made the changes to my admin.php files but I continue to have the same problem with the graphic not showing up. Any suggestions??? Thanks!
Back to top
View user's profile Send private message
danny
Guest






PostPosted: Wed Apr 30, 2003 2:00 am    Post subject: Reply with quote

Analyze.php says that the GD extensions are loading and at the bottom of the page the image appears.
One thing is that if I keep clicking on the various links for your_account and the admin account, eventually the image appears but not constantly. And it is the same for new registrations, the image may appear after ive clicked on either your_account or admin.php.
Maybe this will provide some idea into the problem.

Thanks for any help.

Danny
Back to top
danny
Guest






PostPosted: Wed Apr 30, 2003 2:22 am    Post subject: Reply with quote

Ive tried making into a gif and i get the following error now.

Fatal error: Call to undefined function: imagecreatefromgif() in /public_html/admin.php on line 111

Ive tried it in the your_account/index.php and it doesnt work but i dont get this error.

confusion is commonplace around here

here is my admin.php

function gfx($random_num) {
global $prefix, $db;
require("config.php");
$datekey = date("F j");
$rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
$code = substr($rcode, 2, 6);
$image = ImageCreateFromgif("images/admin/code_bg.gif");
$text_color = ImageColorAllocate($image, 80, 80, 80);
Header("Content-type: image/gif");
ImageString ($image, 5, 12, 2, $code, $text_color);
Imagegif($image, '', 75);
ImageDestroy($image);
die();

Back to top
Humpa
President
President


Joined: 23 Apr 2002
Posts: 3429


PostPosted: Wed Apr 30, 2003 6:08 am    Post subject: Reply with quote

If you cant get the security image working, you can just remove it.

I have been unable to get my security images to NOT work - I have tried.
I have tried getting it to fail on my paid web hosts and on my linux box - but I cant.

This thread has some strange issues reported:
http://www.nukeforums.com/forums/viewtopic.php?topic=14758&forum=41
http://www.nukeforums.com/forums/viewtopic.php?topic=14758&forum=41

If you want to disable the code, use this simple method:
http://www.nukeforums.com/forums/viewtopic.php?topic=14935&forum=40

[ This Message was edited by: Humpa on 2003-04-30 09:09 ]
Back to top
View user's profile Send private message
Humpa
President
President


Joined: 23 Apr 2002
Posts: 3429


PostPosted: Wed Apr 30, 2003 8:10 am    Post subject: Reply with quote

ok ... I did some testing, and I can get the security image to fail.

I think this will fix the broken security image for anyone who has the GD extension loaded (with jpeg support), but still see the broken image.

Make a new file, name it gfx.php, and use this code:
Code:
<?php
    global $prefix, $db;
    require("config.php");
    $datekey = date("F j");
    $rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
    $code = substr($rcode, 2, 6);
    $image = ImageCreateFromJPEG("images/admin/code_bg.jpg");
    $text_color = ImageColorAllocate($image, 80, 80, 80);
    Header("Content-type: image/jpeg");
    ImageString ($image, 5, 12, 2, $code, $text_color);
    ImageJPEG($image, '', 75);
    ImageDestroy($image);
?>

Upload it to your phpnuke directory (with the config.php, mainfile.php, etc).

Now, you just need to edit the img tags for the security image.
By default, there is just the one in the admin.php and in the modules/Your_Account/index.php (if you have modified Login and/or User_Info blocks, do the same thing).

In the admin.php in the function login, the img tag is this:
Code:
<img src='admin.php?op=gfx&random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'>

Change to:
Code:
<img src='gfx.php?random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'>

In the Your_Account/index.php in the function main is this:
Code:
<img src='modules.php?name=$module_name&op=gfx&random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'>

Change it to this:
Code:
<img src='gfx.php?random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'>

That's it!

[ This Message was edited by: Humpa on 2003-04-30 11:12 ]
Back to top
View user's profile Send private message
ryndog
Guest






PostPosted: Thu May 01, 2003 2:33 pm    Post subject: Reply with quote

This worked for me. On the second try. I can now see the security code images.

-Administrator can log in no problems at all.

-Regular users CAN NOT log in at all. They see the security image, put in there info, and are only directed to thier personal profiler page. After attempting to log in the do not see 'Welcome (username)' in the top left corner. Users, when attempting to log in, do not have registered access. It only takes them to the profile page and thats it.

This is my last issue I beleive. Any help on this. http://www.clanhood.com/index.php

History on other boards concerning how I ended up here at:

http://www.phpnuke.org/modules.php?name=Forums&file=viewtopic&t=8701

http://www.nukeresources.com/postt2343.html
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Nuke Forums Forum Index -> PHP-Nuke 6.x Installation All times are GMT - 8 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group




Forum Options
Main Menu
index.phpForums Index
    - Collaped View
    + Expanded View
FAQFAQ
SearchSearch
MemberlistMemberlist
UsergroupsUsergroups
RegisterRegister
ProfileProfile
Log in to check your private messagesLog in to check your private messages
Log inLog in

Visitor Options
 
Subscribe
Unsubscribe


Keep informed of updates, bug fixes, software releases, news and more!
Installation or Upgrade Services for phpNuke or PostNuke? Require site maintenance, addons, modules or custom themes? Send private message or e-mail for rates and availablity.

Quick Links
  Domain Names
  Firewall Forums
  Joke Crazy
  Learning Linux
  Find your IP Fast!
  Purchase WinRAR

Trusted Nuke Sites
  NukeZone Hosting
  CMS Focus
  NukeFixes.com
  NukeResources.com
  NukeSkins.com
  NukeSites.com
  PHPNuke.org

Sponsor Links


NukeZone Hosting