#3992 closed defect (bug) (invalid)
1.x DB Entries in wp-config.php cause PHP MySQL connection errors in 2.x
| Reported by: | bald_technologist | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
I’ve been running into problems ever since I upgraded WordPress to 2.x (not sure if it was 2.0 or 2.1) with new posts. The first time a new post was was loaded into the browser, the server kicked out this error:
PHP Warning: mysql_affected_rows() [<a href='function.mysql-affected-rows'>function.mysql-affected-rows</a>]: A link to the server could not be established in /Users/alex/Dev/SilverSpider/site/wp-includes/wp-db.php on line 183
My old wp-config.php contained some lines that are not included in the 2.x wp-config-sample.php:
$server = DB_HOST;
$loginsql = DB_USER;
$passsql = DB_PASSWORD;
$base = DB_NAME;
As the upgrade instructions specifically state that one shouldn't delete wp-config.php, nor do they provide any direction on modifying it accordingly, this could be a problem on a lot of sites.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I spoke too soon, this didn't resolve the problem at all. Sorry for the invalid entry.