Skip to main content

Changing PHP version causes unexpected database error

Comments

9 comments

  • Jcats
    That is a generic error message, you need to find the actual one, my guess is the new version of PHP probably doesn't have mysqli built or enabled. Is GoDaddy using CL now? If so, when you select the PHP version you should be able to select different PHP mods as well like mysqli, pdo, etc. If you can link a PHP info script I may be able to help, if you also have SSH access I would search for any error_log as the actual error message is most likely in one of those. In your public_html do: # find . -type f -name error_log -exec tail -5 {} \; That will find all error logs and output the last 5 lines in each which should hopefully help and narrow it down.
    0
  • AndyX
    Hello, Thank you for your help. When I select PHP 5.5 I get the following defaults: Looking at other web sites I manage I compared and it looks like everything is enabled properly. Again the issue is XenForo forum software is not able to be run because of the unexpected database error. I don't have SSH access as this is a shared server.
    0
  • Jcats
    Yeah the unexpected database error is most likely because it cannot connect to the database. If you enable PHP 5.5 again, refresh the site, then right click it and goto view source. Is there anything output there in source code that gives anymore info other than 'unexpected database error' which again is a generic response not an actual error.
    0
  • AndyX
    goto view source. Is there anything output there in source code that gives anymore info other than 'unexpected database error' which again is a generic response not an actual error.

    Excellent suggestion. This is what source shows: An unexpected database error occurred. Please try again later.
    0
  • Jcats
    Hmm so it should be working then as I see you clearly selected it in PHP selector. Can you link me to a php info script while PHP 5.5 is loaded.
    0
  • AndyX
    Hi jcats, With your help I finally got this working, thank you. In order to make Imagick PECL extension work on GoDaddy I had to do the following: 1) In cPanel switch from PHP 5.4 native to PHP 5.5. 2) Delete public_html/php.ini as that prevented MySQLI from loading.
    0
  • Jcats
    Hmm that is strange as I didn't even think php.ini was recognized when using the php selector. I am glad to hear you got it resolved though
    0
  • JMTG
    Thank you guys, it worked for me
    0
  • cPanelMichael
    Hello :) I am happy to see the issue is now resolved. Thank you for updating us with the outcome.
    0

Please sign in to leave a comment.