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 3.9.1.1),
ConnectTest.php (see Section 3.9.1.2) or analyze.php (see Section 3.9.1.3). 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).
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.
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:
Follow the above instruction exactly.
 |
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:
and change it to (see How to disable the security code):