4.2.5 Database error and PHP question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Flipfloptrader
    New Member
    • Mar 2017
    • 8
    • 4.2.x

    4.2.5 Database error and PHP question

    Hi all,

    I have upgraded from 4.2.4 to 4.2.5 and it seems to be working but get this database error whenever I log into the admincp:

    Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME'
    /home/flipflop/public_html/includes/class_core.php on line 6153

    MySQL Error :
    Error Number :
    Request Date : Wednesday, May 10th 2017 @ 11:41:22 PM
    Error Date : Wednesday, May 10th 2017 @ 11:41:22 PM
    Script : http://flipfloptrader.com/forum.php
    Referrer : https://flipfloptrader.com/admincp/index.php?do=head
    IP Address : 155.143.67.72
    Username :
    Classname : vB_Database_MySQLi
    MySQL Version :
    Server : 103.18.109.144
    User Agent :


    Stack Trace:

    #0 vB_Database->halt() called in [path]/includes/class_core.php on line 5948
    #1 catch_db_error() called in [path]/includes/class_core.php on line 6153
    #2 vbulletin_exception_handler() called in on line

    Also, I have the ability to change to PHP 7.1 but when I try and select it it causes the forum to break and just displays this:

    Call to undefined function split() on line 4 in /home/flipflop/public_html/forum.php(791) : eval()'d code
    #0 /home/flipflop/public_html/forum.php(791): eval()
    #1 {main}


    Hopefully that makes sense to someone, haha!
  • Flipfloptrader
    New Member
    • Mar 2017
    • 8
    • 4.2.x

    #2
    Fixed the error for registration as it was a plugin error.
    Last edited by Flipfloptrader; Wed 10 May '17, 4:50pm.

    Comment

    • Flipfloptrader
      New Member
      • Mar 2017
      • 8
      • 4.2.x

      #3
      Resolved with some more googling and researching. It was a username colourbar mod effecting it.

      Comment

      • Wayne Luke
        vBulletin Technical Support Lead
        • Aug 2000
        • 74167

        #4
        Glad you resolved it. Seems they weren't defining things properly. So the PHP notice caused a cascading effect.
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API

        Comment

        • Wayne Luke
          vBulletin Technical Support Lead
          • Aug 2000
          • 74167

          #5
          Going to bump this due to another site that recently had this same problem. On the second site, the issue was due to the MySQLi library not being available in PHP within the AdminCP due to an extraneous php.ini file. It seems we define the SAPI_NAME constant after trying to connect to the database and since it isn't defined, that overrides the database error.
          1. Make sure that MySQLi is available in PHP.
          2. Make sure there are no extraneous php.ini files in your directories.
          Translations provided by Google.

          Wayne Luke
          The Rabid Badger - a vBulletin Cloud demonstration site.
          vBulletin 5 API

          Comment

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