-
- 26 Posts
My IPS has just moved my website to a new datacentre.
Trouble is when I now try to access the website I get the following message:
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error: mysql_connect() [function.mysql-connect]: Access denied for user ’xyz_m1’@’ns2.nhgdns.com’ (using password: YES)
Error type/ Nr.: Warning - 2
File: /home/xyz/public_html/manager/includes/extenders/dbapi.mysql.class.inc.php
Line: 87
Line 87 source: if (!$this->conn = ($persist ? mysql_pconnect($host, $uid, $pwd) : mysql_connect($host, $uid, $pwd, true))) {
Parser timing
MySQL: 0.0000 s (0 Requests)
PHP: 0.0135 s
Total: 0.0135 s
Error while inserting event log into database.
Can anyone shed some light.
Many thanks
W
-
- 19 Posts
Update your config file to match the new database credentials, and make sure you clear the MODx cache.
-
- 3 Posts
Hi I am having the same problem, can you be a bit more specific as to what config file?
cheers
-
- 24,544 Posts
That would be:
manager/includes/config.inc.php
The error message you’re getting is telling you that the username/password for the MODx database is not correct, so either the host changed the database name, username, and/or password or forgot to move the MODx database.
Some hosts add a prefix to the DB name or user name so one possibility is that the prefix has changed.
-
- 14 Posts
Hello,
Check if your database and users are assigned corrected on the server server.
Most of the times while transfer of site database user are missed if its cpanel.
Recheck the user permissions as well.
-
- 11 Posts
My issue is that my manager wouldn’t have even loaded O_O so I was hoping there was a manual way of doing this.
either deleting cache/ directories, or running a clearCache() function.
-
- 24,544 Posts
Your best bet, at this point, is to upload the original install directory and do an upgrade install -- that will clear the cache and use the DB credentials from config.inc.php. Be sure *not* to install the sample site or any snippets or plugins.
It’s important that the install directory comes from a version of MODx that exactly matches the one used on your site.
If you can’t be sure of that, I’d do a full upgrade to version 1.0.4.
-
- 14 Posts
Hi
I have just found this thread and thought someone might be able to help. I too have a Parse error message coming up. It's a bit different though:
Warning: Cannot modify header information - headers already sent by (output started at /home/sunfjam/public_html/index.php:1) in /home/sunfjam/public_html/index.php on line 59
Warning: Cannot modify header information - headers already sent by (output started at /home/sunfjam/public_html/index.php:1) in /home/sunfjam/public_html/index.php on line 60
Warning: Cannot modify header information - headers already sent by (output started at /home/sunfjam/public_html/index.php:1) in /home/sunfjam/public_html/manager/includes/config.inc.php on line 74
Warning: Cannot modify header information - headers already sent by (output started at /home/sunfjam/public_html/index.php:1) in /home/sunfjam/public_html/manager/includes/document.parser.class.inc.php on line 2793
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error: Cannot modify header information - headers already sent by (output started at /home/sunfjam/public_html/index.php:1)
Error type/ Nr.: Warning - 2
File: /home/sunfjam/public_html/manager/includes/document.parser.class.inc.php
Line: 514
Line 514 source: header('Content-Type: ' . $type . '; charset=' . $this->config['modx_charset']);
Parser timing
MySQL: 0.0038 s (0 Requests)
PHP: 0.0262 s
Total: 0.0300 s
The last alteration that was made to the website was made on Thursday after which it was working fine with no problems. It was also working the day after perfectly OK as well but today I just keep getting this message on every page.
I am therefore wondering if the hosting company has moved the website to a new server and somehow that is causing problems like the original poster? I can log into the manager OK.
Does anyone have any ideas or pointers to what might have happened?
Many thanks.