3.10. Common miscellaneous errors

Some miscellaneous errors are discussed here.

3.10.1. RSS block Error: There is a current problem with the headlines from this site

If you encounter the error

There is a current problem with the headlines from this site

after some innocent changes in an RSS block, you are not alone. This is a known issue and a solution is presented in Section 3.10.1.

3.10.2. MySQL errno: 145: Can't open file nuke_XXXX.MYI

If suddenly you get an error like:

Could not insert new word matches
DEBUG MODE
SQL Error : 1016 Can't open file: 'nuke_bbsearch_wordmatch.MYI'. (errno: 145)
INSERT INTO nuke_bbsearch_wordmatch (post_id, word_id, title_match) 
SELECT 4467, word_id, 0 FROM nuke_bbsearch_wordlist WHERE word_text IN ('testing')
Line : 282
File : /xxxx/xxxx/public_html/nuke/includes/functions_search.php

then you will know that your MySQL database has been corrupted. In the above example, the nuke_bbsearch_wordmatch table is damaged (see MySQL errno: 145 Can't open file nuke bbsearch wordmatch.MYI).

Solution: Enter the MySQL prompt from the shell:

mysql -u dbuname -h dbhost -p dbname;

where dbuname, dbhost and dbname are exactly the same as in your config.php (Section 3.7) - you will also be prompted for your password, which must also be the same as in config.php - and try the REPAIR TABLE command:

repair table nuke_bbsearch_wordmatch;

You can also try from the shell command-line the myisamchl utility:

myisamchk -r nuke_bbsearch_wordmatch

See Section 26.1 on how to repair corrupt tables.

3.10.3. Modules do not show up and/or disappear

Figure 3-38. Administration panel: Modules.

Administration panel: Modules.

In PHP-Nuke version 7 alpha, when adding a module to the modules folder it won't show in admin/modules. When renaming a module, with FTP or similar, the module also disappears (see Modules do not show and/or disappear).

The problem is that in admin/modules/modules.php, of that version, on the line that inserts the modules in the folder modules, the number of fields is incorrect. In admin/modules/modules.php, the lines with:

       if ($mid == "") {
      sql_query("insert into ".$prefix."_modules 
values (NULL, '$modlist[$i]', '$modlist[$i]', '0', '0', '1')", $dbi);
       }

should have been:

       if ($mid == "") {
           sql_query("insert into ".$prefix."_modules 
values (NULL, '$modlist[$i]', '$modlist[$i]', '0', '0', '1', '0')", $dbi);
       }

Notice the extra

,'0' 

before the

)",$dbi);

This error seems to affect v. 7 alpha and some of the 7.0 FINAL downloads.

You should also be aware that there are some third party modules which alter the nuke_modules table. All you have to do to determine if this might be a problem for you, is to view your nuke_modules table through phpMyAdmin (Section 3.3) or a similar tool, count the number of fields and then compare this number with the code in admin/modules.php:

if ($mid == "") {
      sql_query("insert into ".$prefix."_modules 
values (NULL, '$modlist[$i]', '$modlist[$i]', '0', '0', '1', '0')", $dbi);
}

The above gives us 7 fields.

3.10.4. Forums Error: Can't create a category without a name

You want to create a category in the Forum (see Section 7.1.1), but you get the error:

General Error 
Can't create a category without a name

Your strategy in coping with error messages, in case your error is not obvious or not well explained by the message, is to search the whole code tree for the error text (just as you would search for a link text in Section 26.5). In this case, it turns out that there is only one occurence, in modules/Forums/admin/admin_forums.php:

case 'addcat':
        // Create a category in the DB
        if( trim($HTTP_POST_VARS['categoryname']) == '')
        {
                message_die(GENERAL_ERROR, "Can't create a category without a name");
        }

As you can easily see, the error is issued if the category name contains only "white space"[1] (which is what the PHP trim function strips from the beginning and end of a string), in simple words: if you did not enter any name for the category. Logical, isn't it?

But what happens if you swear that you did enter a name there? Isn't this error going to drive you nuts then?

In such situations, you should keep your calmness and try to think further than the obvious: what could be happenning behind the scenes in PHP-Nuke? Here are some possibilities (see Can't create a category without a name):

  1. You entered an empty name - O.K., you already checked that, but let's include it, just for the sake of completeness. This means that $HTTP_POST_VARS['categoryname'], the value of the POST variable that holds the category name, is empty, or contains at most some white space.

  2. Your browser does not send POST variables back to the server, e.g. it does not support forms. Also quite unlikely.

  3. $HTTP_POST_VARS['categoryname'] was not empty when it arrived at PHP-Nuke, but PHP-Nuke changed it. In fact, PHP-Nuke subjects the POST and GET variables to some sanity checks (see Section 23.4.3 for details), to see if they contain malicious code. If your category name contained any “forbidden” characters, it may be that some check routine in PHP-Nuke deleted it. Try a name that will not raise suspicions of SQL injection (Section 23.3.2) and similar attacks.

  4. You are logged in as the administrator and as a user. In this case, you browser has stored two cookies (Section 23.4.5) on your computer and it is not clear under what ID your action has been evaluated by PHP-Nuke. Try to avoid such situations. If you must me logged in as both a user and an administrator at all costs, you might try to use two different browsers for each ID (not two instances of the same browser, but two different products). They will store the cookies in different locations and will (hopefully) not mess them up.

Of course, YMMV.

3.10.5. Left and right blocks are missing

Figure 3-39. Missing blocks.

Missing blocks.

If your PHP-Nuke site looks like the one in Figure 3-39, i.e. lacking totally the left and right columns with all the blocks in them, then maybe your nuke_blocks table is corrupt (see Missing blocks and modules, as well as My blocks are gone and Blocks have disappeared). See Section 26.1 on how to repair a corrupt table.

Notes

[1]

“White space”, in the setting of the PHP trim(), function can contain only the following characters:

  • " " (ASCII 32 (0x20)), an ordinary space.

  • "\t" (ASCII 9 (0x09)), a tab.

  • "\n" (ASCII 10 (0x0A)), a new line (line feed).

  • "\r" (ASCII 13 (0x0D)), a carriage return.

  • "\0" (ASCII 0 (0x00)), the NUL-byte.

  • "\x0B" (ASCII 11 (0x0B)), a vertical tab.