• MODx Parse Error - Help can't access site#

  • world Reply #1, 3 years, 9 months ago

    Reply
    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


  • ryanlwh Reply #2, 3 years, 9 months ago

    Reply
    Update your config file to match the new database credentials, and make sure you clear the MODx cache.


  • lance.spurgeon Reply #3, 2 years, 2 months ago

    Reply
    Hi I am having the same problem, can you be a bit more specific as to what config file?

    cheers


  • BobRay Reply #4, 2 years, 2 months ago

    Reply
    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.


  • zcrafts Reply #5, 2 years, 2 months ago

    Reply
    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.



  • austin Reply #6, 1 year, 11 months ago

    Reply
    Quote from: ryanlwh at Aug 13, 2008, 11:39 AM
    Update your config file to match the new database credentials, and make sure you clear the MODx cache.

    Where do you clear cache?


  • einsteinsboi Reply #7, 1 year, 11 months ago

    Reply
    Quote from: austin at Jun 17, 2010, 10:33 AM
    Quote from: ryanlwh at Aug 13, 2008, 11:39 AM
    Update your config file to match the new database credentials, and make sure you clear the MODx cache.

    Where do you clear cache?

    Can you log into the manager? If yes, then you would clear the site cache from the backend, it's under the Site tab, the main one that loads when you log in.

    Also make sure your db settings are still correct in the config file as stated before


  • austin Reply #8, 1 year, 11 months ago

    Reply
    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.


  • BobRay Reply #9, 1 year, 11 months ago

    Reply
    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.


  • stuart1 Reply #10, 6 months, 3 weeks ago

    Reply
    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 . '; . $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.