WordPress.org

Ready to get started?Download WordPress

Forums

[closed] Just upgraded to php 5.4 and site doesn't work! (20 posts)

  1. BaldPunk1
    Member
    Posted 1 year ago #

    The IDIOTS at 1and1.com sent me an email to upgrade to php 5.4 today from 5.2, and after I did, my site won't come up!

    I called and they said I needed to upgrade wordpress(Should have told mentioned it would not be compatible). How do I do that when site is screwed up???

    Thanks,
    Joe
    http://BaldPunk.com

  2. BaldPunk1
    Member
    Posted 1 year ago #

    I just called and they said I need to reinstall. I hope it won't screw up my site!!!

  3. BaldPunk1
    Member
    Posted 1 year ago #

    This is the exact error:

    Error establishing a database connection

    This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at db----.perfora.net. This could mean your host's database server is down.
    •Are you sure you have the correct username and password?
    •Are you sure that you have typed the correct hostname?
    •Are you sure that the database server is running?

  4. And it shouldn't screw things up -- all your content is in the database and the wp-content folder, not in the core WP files. SAVE a copy of the wp-content folder, and if the manual update instructions don't work, be sure to use the same db as you used before.

  5. Just upgrading PHP shouldn't have changed anything about your database login info. Doublecheck that you're using the same information you were before, and then check with 1and1 to see if that changed at the same time as the PHP update (for instance, if they moved you to a new server in the process).

    Again, this shouldn't have happened, but it's possible that either you overlooked a bit of info in their message, or that they didn't tell you everything you needed to know to do an upgrade when you called them.

    And good luck. This kind of thing really sucks to go through :(

  6. alanslingsby
    Member
    Posted 1 year ago #

    Same thing here. You can go back to 5.2 via 1&1 panel. Worked for me while I sort out what to do. Complete reinstalls on two sites did NOT work.

  7. ffreundt
    Member
    Posted 1 year ago #

    Same problem here, moving back to 5.2 via the 1&1 panel helped, but it's only a temporary option. However I couldn't identifiy the cause yet. Deleting all my plugins didn't help, neither did switching to the standard theme. I didn't try a reinstall. Any ideas?

  8. ffreundt
    Member
    Posted 1 year ago #

    Problem solved: update your mySQL-database password, update the new password into your wp-config.php, wait a few minutes and done! Hope that works for you as well!

    Apparently php5.4 can't handle database passwords created pre mySQL 4.1, though I'm just paraphrasing here: http://community.webfaction.com/questions/8063/php-54-and-wordpress-error-establishing-a-database-connection

  9. mwbay
    Member
    Posted 1 year ago #

    Confirmed, ffreundt. Thanks for finding it!

  10. BaldPunk1
    Member
    Posted 1 year ago #

    If update password, do I still have to also update WordPress too?

  11. ffreundt
    Member
    Posted 1 year ago #

    You have to update the password in your wp_config.php, of course. But I don't know which WordPress version you need to run php4.3, mine was already updated to the most recent WP version. It never hurts though to run a current version ;)

  12. faxon22
    Member
    Posted 1 year ago #

    I had this same problem, but just another note that you don't actually have to change your password in wp-config.php. Just go to mySQL Administration at 1and1 and re-enter the same password you've always used (the same one in your wp-config). Once that updates you should be good. Thanks to: http://snydersoft.com/2012/11/30/database-errors-after-1and1-upgrade-to-php-5-4/

  13. bradybarrows
    Member
    Posted 1 year ago #

    I had the same problem and thanks to this thread the solution is to simply change the password in the MySQL database admin at 1and1. Use the same password you have the wp-config.php set at. Within a few minutes it works. Thanks so much for this thread.

  14. John Wiehe
    Member
    Posted 1 year ago #

    Success!

    Bluehost hosts my Web site. I changed my MySQL password in the database and wp-config.php file just to be sure. After that I upgraded to PHP 5.4 (Single php.ini).

    Thank you, this thread is a lifesaver.

  15. Gwyneth Llewelyn
    Member
    Posted 1 year ago #

    You guys utterly, amazingly, supremely ROCK!

    I'm a DreamHost user and have been plagued with this very same problem, which has stumped me for a couple of weeks, because connecting to the database from the shell worked out perfectly. I was (erroneously) assuming that some plugin was malfunctioning under PHP 5.4, and thus the strange database connection error.

    I should have immediately noticed that this error only appears on very old websites, where the database password hasn't changed in several years... but somehow I missed the 'connection' (pun intended). I just thought it was a bad plugin somewhere.

    DreamHost's control panel, like 1and1's or Bluehost's, allows the database password to be changed easily, and after that's done, the sites work flawlessly under PHP 5.4.

    Woo hoo! Kudos to @ffreundt for getting us a working solution!

  16. kitchin
    Member
    Posted 1 year ago #

    Just to be exact, it's actually a PHP 5.3 issue not 5.4. http://www.php.net/manual/en/migration53.incompatible.php

  17. simpso1j
    Member
    Posted 1 year ago #

    I am still stuck on this issue. Can someone point me to a list of instructions that explicitly tell me how to get WordPress to work under PHP 5.4? I have searched and searched, and have not been able to locate a good set of instructions.

    Thanks,
    John

  18. Yui
    Member
    Posted 1 year ago #

    simpso1j, start your own thread, this one is 1 month old.

    and btw, wordpress works fine with PHP 5.4 and upcoming 5.5
    If you have some issues - start new thread.

  19. John Wiehe
    Member
    Posted 1 year ago #

    Here's BlueHost's answer if you have them. You'll have to look elsewhere if you have another host.

Topic Closed

This topic has been closed to new replies.

About this Topic