Announcement

Collapse
No announcement yet.

array_keys and database error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • array_keys and database error

    I have been having problems with Apache recently. Today my host upgraded Apache and PHP for me (to 1.3.37 and 4.4.4, respectively). Since that happened, my forums have been a mess of errors. Apache and PHP seem to be working fine, as my other sites are working just dandy, but vB is not liking something in the new config. I thought maybe it was my outdated version of vB (3.0.7) so I decided to try and upgrade, but I am getting the same errors. These are the three distinct errors being displayed (they are shown repeatedly about 10 times each on the page):
    Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/***/public_html/includes/class_core.php on line 1525

    Warning: Invalid argument supplied for foreach() in /home/***/public_html/includes/class_core.php on line 1525
    After these are shown about 10 times each, in groups like above, this error is shown about 10 times:
    Warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /home/***/public_html/includes/class_core.php on line 648
    In addition it is showing this database error:
    Database error in vBulletin :

    Invalid SQL:
    SELECT varname, value, datatype FROM setting;

    MySQL Error : Unknown column 'datatype' in 'field list'
    Error Number : 1054
    Date : Wednesday, October 11th 2006 @ 01:35:18 AM
    Script : http://***/install/upgrade.php
    Referrer :
    IP Address : ***
    Username :
    Classname : vb_database
    This is with freshly uploaded files. I deleted all existing files and uploaded everything fresh, including a new config.php taken from config.php.new.

    I have tried everything I can think of. I even downloaded & ran vb_test.php and it says my server passes all tests, including the MySQL tests.

    Any ideas? Thanks.

  • #2
    Is this with vB 3.6.2? If so, reupload all the original vB non-image files (except install.php). Make sure you upload these in ASCII format and overwrite the ones on the server. Also be sure to upload the admincp files to whichever directory you have set in your config.php file.

    Next, disable all plugins.

    Note: To temporarily disable the plugin system, edit config.php and add this line right under <?php

    define('DISABLE_HOOKS', true);

    Then if you still have this problem, create a new style and choose no parent style. This will force it to use the default templates. Finally empty your browser cache, close all browser windows then try again. Make sure you change to the new style and view your forums with it. Do you have the same problem?
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment


    • #3
      Thanks for the quick reply. Yes, this is 3.6.2. As noted in my post, I wiped all vB files on the server and uploaded all new ones. Just to be sure I have just done this again. Did not help.

      I can't remember honestly if I have any plugins installed. I don't think I do, but at any rate I should have mentioned in the original post I did add that line to config.php, after seeing that suggested in another thread. Did not help.

      As far as the template thing, two issues. First, I am not able to get anywhere on my vB to do this. The errors are being displayed everywhere. Second, this error is also occuring when going to /forums/install/upgrade.php to start the upgrade process. Unless something has drastically changed in vB that page is not governed by templates or styles.

      Thanks for the quick reply, but any other ideas?

      Comment


      • #4
        Line 1525 of class_core.php seems to have something to do with reversing 'the effects of register_globals if necessary'. I'm not a programmer so I don't really know what that error means but I suspect it has something to do with your configuration of PHP.

        Can you post a link to your phpinfo.php file?
        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
        Change CKEditor Colors to Match Style (for 4.1.4 and above)

        Steve Machol Photography


        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


        Comment


        • #5
          http://www.idlewords.net/phpinfo.php

          Comment


          • #6
            If you can, turn register_globals off.
            Baby, I was born this way

            Comment


            • #7
              And if you don't have access to the server's php.ini file to do this, try adding this line to an .htaccess file inj your main forum directory:

              php_value register_globals OFF
              Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
              Change CKEditor Colors to Match Style (for 4.1.4 and above)

              Steve Machol Photography


              Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


              Comment


              • #8
                I am not able to turn off register_globals serverwide as I have other scripts that, for better or worse, rely on them being on and right at this moment I am not keen on rewriting everything. Also, prior to my host upgrading PHP, vB seemed to have no problem with them on.

                That said, I did add the php_value line to the .htaccess file and it did not help.

                Comment


                • #9
                  Fill out a support ticket at:

                  http://members.vbulletin.com/members...ontactform.php

                  Be sure to include the login info to your Admin CP, phpMyAdmin and FTP. Please also include a complete description of the problem.
                  Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                  Change CKEditor Colors to Match Style (for 4.1.4 and above)

                  Steve Machol Photography


                  Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                  Comment

                  widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                  Working...
                  X