Title: Parse error in wp-db.php when upgrading
Last modified: August 18, 2016

---

# Parse error in wp-db.php when upgrading

 *  [mantruc](https://wordpress.org/support/users/mantruc/)
 * (@mantruc)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/parse-error-in-wp-dbphp-when-upgrading/)
 * Hi all
 * I’m just trying to upgrade from 1.2 to 1.5 . I followed Podz tutorial (thanks),
   just skipped the “adjust your files” part since I was still under default template.
 * Now on executing the upgrade.php, I get the following error:
 * Parse error: parse error, unexpected $ in /home/hosting/mantruc.com/blog/en/wp-
   includes/wp-db.php on line 309
 * Fatal error: Call to undefined function: hide_errors() in /home/hosting/mantruc.
   com/blog/en/wp-settings.php on line 71
 * anyone knows how I can fix this?
 * thanks in advance
    mantruc

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [whoispauladams](https://wordpress.org/support/users/whoispauladams/)
 * (@whoispauladams)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/parse-error-in-wp-dbphp-when-upgrading/#post-148424)
 * I’m having the exact same problem, but it’s on a fresh install (not an upgrade).
   Sure hope someone knows why this parse erros in line 309 would pop up.
 * I’ve searched the site and google and don’t find anything.
 *  [Joshua Sigar](https://wordpress.org/support/users/alphaoide/)
 * (@alphaoide)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/parse-error-in-wp-dbphp-when-upgrading/#post-148436)
 * Sounds like a corrupted file to me; delete and re-upload that file.
 *  [whoispauladams](https://wordpress.org/support/users/whoispauladams/)
 * (@whoispauladams)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/parse-error-in-wp-dbphp-when-upgrading/#post-148477)
 * Well, tried deleting the file and reuploading it. Still get the same error…. 
   Thought maybe it was cause I was using Firefox, so I tried IE. Same error (guess
   that’s like checking the air in your tires when your car won’t start).
 * I think the next step is to redownload it and try a new file.
 * Any other suggestions?
 *  [whoispauladams](https://wordpress.org/support/users/whoispauladams/)
 * (@whoispauladams)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/parse-error-in-wp-dbphp-when-upgrading/#post-148481)
 * Perfect! It worked. I redownloaded the same files, went in and deleted from my
   local and server directories and then reuploaded the new file. Worked perfect(
   well, not without the same error happening with another file first, but I did
   the same thing and now I’m on my merry way).
 * Thanks!
 *  Thread Starter [mantruc](https://wordpress.org/support/users/mantruc/)
 * (@mantruc)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/parse-error-in-wp-dbphp-when-upgrading/#post-148639)
 * Dear Forum
 * I’ve tried deleting and reuploading a new download of the files (as per alphaoide’s
   suggestion, thanks) and I keep on getting the same error.
 * I’ve looked at my local copy of the file and it seemed ok, but I don’t understand
   PHP. This time I double checked the codex instructions, I was following every
   step.
 * Please, help!
 * thanks in advance
 *  [whoispauladams](https://wordpress.org/support/users/whoispauladams/)
 * (@whoispauladams)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/parse-error-in-wp-dbphp-when-upgrading/#post-148646)
 * Have you tried to replacing the LOCAL copy as well? It didn’t work for me until
   I replaced that too.
 * So, download another ZIP file. Open it and extract the file you need to your 
   local directory (replacing the old file). Then upload this new file to the server(
   replacing the old file on the server).
 * Try that. It worked for me.
 *  Thread Starter [mantruc](https://wordpress.org/support/users/mantruc/)
 * (@mantruc)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/parse-error-in-wp-dbphp-when-upgrading/#post-148652)
 * Yes Paul, I’ve replaced the local copy as well, twice. That’s what I meant by“
   reuploading a new download of the files”, sorry for being unclear.
 * Now I’ve downloaded the .tar version instead of the .zip file, and will try doing
   it all again through another ftp app.
 * Thanks a lot, I’ll let you know if it works!
 *  Thread Starter [mantruc](https://wordpress.org/support/users/mantruc/)
 * (@mantruc)
 * [21 years, 2 months ago](https://wordpress.org/support/topic/parse-error-in-wp-dbphp-when-upgrading/#post-148655)
 * Well, that did the trick:
 * [http://www.mantruc.com/blog/en/](http://www.mantruc.com/blog/en/)
 * Kubrick looks sweet!
 * These machines are quirky somteimes.
 * Thanks a ton, this forum is great!

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Parse error in wp-db.php when upgrading’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 8 replies
 * 3 participants
 * Last reply from: [mantruc](https://wordpress.org/support/users/mantruc/)
 * Last activity: [21 years, 2 months ago](https://wordpress.org/support/topic/parse-error-in-wp-dbphp-when-upgrading/#post-148655)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
