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

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

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

You are Anonymous user. You can register for free by clicking here
Security code is not showing up

3.9.8. Security code is not showing up

Figure 3-28. Security code in the User Login screen.

Security code in the User Login screen.

You just installed PHP-Nuke for the first time, created a super user, and you can't log in because the security code graphic (see Figure 3-28) is coming up as a dead image.

This is a frequent error, but it seems that the reasons (and cures) may be multiple (see Security code graphic not showing up, security image stopped working):

  • You changed something in the language files and put comments - remove the comments.

  • You (or your ISP) don't have the GD library loaded. To find out if you have the GD library loaded, run a test script like test.php (see Section, ConnectTest.php (see Section or analyze.php (see Section The first two display the output of the PHP phpinfo() function directly ( Figure 3-29), analyze.php will display an only slightly different information box on GD (Figure 3-30). If you are on Windows 2000, read how to install GD on a Win2K box.

  • The gfx function in admin.php is not always working fine. You could try to put it in a separate file and change the call from admin.php to the new file. See Humpa's posting in Admin Security login jpeg not showing for an example.

  • Activate (or reactivate) the Your Account module. If your Admin's security code works, but the others don't (showing an read X mark for others), then you may want to set the Your Account module as viewable by all visitors (see PhpNuke 6.5 Security Code Problem).

Figure 3-29. phpinfo(): GD library information.

phpinfo(): GD library information.

For more thoughts on this problem, read Humpa's PHP-Nuke FAQ on the security code.

If you want to use a PNG or GIF image for the security code, consult the solution in Using a png or gif for security code image. If you want to display the security code as text, rather than an image, see security code in plain text format - but then there is no point to it (the idea is to display an image that makes automatic number recognition difficult to robots), then you can disable it just as well.

Figure 3-30. analyze.php: GD library information.

analyze.php: GD library information. How to bypass the security code

Another approach could be to bypass the security code altogether. This is probably the only option you have (unless you are willing to display it as plain text - see the links at the end of this section for this), if your ISP refuses to load the GD library: without GD, no security code image - without security code image, you cannot enter anything in the security code field, and you get an "Access denied" error.

Here is how you disable the security code:

Find the 7 occurences of:


For the Admin login, there is one in the admin.php, and one in the auth.php. For Users, there will be five in the modules/Your_Account/index.php (and there might be one in the block-Login.php, and/or one in the block-User_Info.php, if they are modified). Replace all of the occurances with this:

$user == "whatever"

Follow the above instruction exactly.

Caution Be careful not to introduce syntax errors!

Changes like the last one (bypassing the security code) require extreme caution on your part. All too big is the risk of introducing new errors, while trying to correct old ones! If you get an error, it does't mean the solution ceased to work for you. Check for syntax errors that you might have introduced with your editing. Most probably, you will find something. See syntax error, security images removed for a real world example.

If you have one of the later versions of PHP-Nuke, you can try a trick: edit the config.php file and if you find a line there, like this one:

$gfx_chk = 7;

and change it to (see How to disable the security code):

$gfx_chk = 0;

Help us make a better PHP-Nuke HOWTO!

Want to contribute to this HOWTO? Have a suggestion or a solution to a problem that was not treated here? Post your comments on my PHP-Nuke Forum!

Chris Karakas, Maintainer PHP-Nuke HOWTO

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.078 Seconds - 230 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded ( ::