You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 248 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Security Image Not Showing [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Thu Jun 05, 2003 10:37 am Reply with quoteBack to top

Bugged by this are you ? Well, there have been several different solutions to this puzzler and I just solved another! Here is the list of things to check when you have this problem:

Is the GD package installed? (Version 2.0 and higher)
Is JPEG enabled in the GD installation?
Is the image in images/admin/code_bg.jpg and modules/Your_Account/images/code_bg.jpg ?

If you answered YES to all of the above and it's still not working, make sure that there are no empty/blank lines after the closing ?> tag in your config.php file! What I finally determined was happening on several sites is that their editors add blank lines to the file. PHP then interprets those lines as text and starts dumping to the browser. Well, then along comes the Header() call for the JPG image and guess what? No Can Do, because you can't call Header() after the transmission to the browser has started so it dies .... Crying or Very sad . Of course we could do output buffering, but, that's another post Smile

Happy imaging!!!!

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
cold
Nuke Cadet
Nuke Cadet


Joined: May 27, 2003
Posts: 3

Location: LA, CA

PostPosted: Thu Jun 05, 2003 10:59 am Reply with quoteBack to top

OMG Thank you for the insight. I was using Namo Web Editor and it was tossing in <p>&</p> at the end of ?>. Raven Thank you for this information.
Find all posts by coldView user's profileSend private messageVisit poster's website
Cracker
Nuke Soldier
Nuke Soldier


Joined: May 27, 2003
Posts: 14


PostPosted: Fri Jun 06, 2003 9:00 am Reply with quoteBack to top

Thanks Raven your help is appreciated,

The blank lines after the closing ?> can be a killer.

Cracker
Find all posts by CrackerView user's profileSend private message
Tank863
Lieutenant
Lieutenant


Joined: Feb 21, 2003
Posts: 195

Location: Philadelphia

PostPosted: Fri Jun 06, 2003 10:55 am Reply with quoteBack to top

Raven...

I just read this post.
I was having a similar problem.

User Sign On image would not appear., but the admin logon image would.

I checked both places.. both had the image file..

but the image in Your Account had a different file size. I opened it in my image editor.. and it ws corrupt. I replaced it with the same one from the admin..

It worked.

Tank863

(PS: This was a new install of 6.5)
Find all posts by Tank863View user's profileSend private messageVisit poster's websiteICQ Number
BoBBaGe
Nuke Cadet
Nuke Cadet


Joined: Jun 07, 2003
Posts: 1


PostPosted: Sat Jun 07, 2003 5:42 pm Reply with quoteBack to top

yea i did all that stuff and it still wont work, i cry every night. can one of you guys please help me?

http://www.pxvisystems.com/csm/html/

thats the site i cant login tho cuz of the security crap wont work
Find all posts by BoBBaGeView user's profileSend private message
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Sat Jun 07, 2003 6:09 pm Reply with quoteBack to top

Pleas pm me your

ftp url, id, password
site url, adminid, adminpw
phpmyadmin url, id, password

Is this a fresh install?

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
chris-au
Elite Nuker
Elite Nuker


Joined: Jan 31, 2003
Posts: 717


PostPosted: Sat Jun 07, 2003 10:10 pm Reply with quoteBack to top

Guess what, when I use Roboform, there is no need to enter the code. Just hit fill and enter and away you go.
Don't know why that works though.
Maybe a thought for NukeCops?

_________________
Chris
Find all posts by chris-auView user's profileSend private messageVisit poster's website
escv
Nuke Soldier
Nuke Soldier


Joined: Jun 02, 2003
Posts: 12


PostPosted: Wed Jun 11, 2003 11:34 am Reply with quoteBack to top

I have had 6.5 installed for over a week and everything worked fine. Yesterday I tried to log into the admin site and the security code doesn't appear. It works fine for users and the image appears, but not for the admin login.

I checked analyse and phpinfo and all are fine and nothing seems to have changed. I also verified that the code_bg.jpg files existed and even replced the admin one with the user one to see if it was a corrupt image file. Still Not working. All I get is a blank where the image should go.

Please help Raven !!
Find all posts by escvView user's profileSend private messageVisit poster's website
Kilo
Nuke Cadet
Nuke Cadet


Joined: Jun 11, 2003
Posts: 1


PostPosted: Wed Jun 11, 2003 1:06 pm Reply with quoteBack to top

I know this may not be the correct place, but if GD is enabled, but JPG support is not, how do you enable that? Somehow when I upgraded to 4.3.2 It changed it.

Thanks in advance!
Find all posts by KiloView user's profileSend private message
chatserv
General
General


Joined: Jan 12, 2003
Posts: 3128

Location: Puerto Rico

PostPosted: Wed Jun 11, 2003 3:23 pm Reply with quoteBack to top

Here's a workaround by Humpa:

You can 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.
Image


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.
Image

_________________
Feed a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
ScriptHeaven | NukeResources
Find all posts by chatservView user's profileSend private messageVisit poster's website
bjamm
Nuke Cadet
Nuke Cadet


Joined: May 24, 2003
Posts: 6


PostPosted: Wed Jun 11, 2003 8:38 pm Reply with quoteBack to top

WOW thanks a bunch, i just had this problem TODAY after editing my script to add the Server Stats block.

In this block you have to edit your language file, mine had two blank lines at the end and a friend was registering and i removed those lines after reading this post and WOW boom it works.

Thanks so much for the quick fix Smile
Find all posts by bjammView user's profileSend private message
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Wed Jun 11, 2003 8:40 pm Reply with quoteBack to top

I need to point out that ANY file that is INCLUDED by any script MUST NOT HAVE BLANK LINES after the clsing ?> tag.

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Wed Jun 11, 2003 8:41 pm Reply with quoteBack to top

mFactor wrote:
Raven wrote:
Bugged by this are you ? Well, there have been several different solutions to this puzzler and I just solved another! Here is the list of things to check when you have this problem:

Is the GD package installed? (Version 2.0 and higher)
Is JPEG enabled in the GD installation?
Is the image in images/admin/code_bg.jpg and modules/Your_Account/images/code_bg.jpg ?

If you answered YES to all of the above and it's still not working, make sure that there are no empty/blank lines after the closing ?> tag in your config.php file! What I finally determined was happening on several sites is that their editors add blank lines to the file. PHP then interprets those lines as text and starts dumping to the browser. Well, then along comes the Header() call for the JPG image and guess what? No Can Do, because you can't call Header() after the transmission to the browser has started so it dies .... Crying or Very sad . Of course we could do output buffering, but, that's another post Smile

Happy imaging!!!!



1) What is the GD package
2) How do I check if "JPEG is enabled in the GD installation"?
3) Yes it is = Is the image in images/admin/code_bg.jpg
4) Yes it is = modules/Your_Account/images/code_bg.jpg ?
5) I had one empty empty/blank line after the closing ?>

I still can not see the security logo with the field to enter the number in the picture. What I get is _USERLOGIN at the top of the block. I am running Php-Nuke v6.5. Your help is greatly appreciated!

GD is the graphics package that implements image manipulation in PHP. Run the analyzer script to see if it's installed and if JPG support is enabled.

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Wed Jun 11, 2003 8:52 pm Reply with quoteBack to top

If your site is hosted then your host must install it.

If this is a windows server then uncomment the ;php_gd2.dll setting and restart your server.

If it's linux, then you have to recompile php with gd and jpg support.

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Wed Jun 11, 2003 9:05 pm Reply with quoteBack to top

http://www.onlamp.com/lpt/a/3337

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
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

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.249 Seconds - 145 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::