We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5554
    • 22 Posts
    Just tried to login to Manager and got this error...

    Parse error: parse error, unexpected ’\"’, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/syracus/public_html/manager/includes/config.inc.php on line 18


    I did not change the config file (to my knowledge anyway) and it’s suddenly giving me this error. Any ideas why?
      • 22303 MODX Staff
      • 10,725 Posts
      That’s odd, did you move the manager directory by any chance? It’s acting like it cannot find the /manager path in line 18, but the fact that the config.inc.php files was still found seems to contradict that fact. Can you see what line 18 looks like in your /manager/config.inc.php file?
        • 5554
        • 22 Posts
        I’ve just discovered that a back slash was missing in three places in the config file.

        I sure didn’t do this, at least I don’t know how I could have done this.

        These three places had only one backslash instead of two...

        $a = explode("/manager",str_replace("\\","/",dirname($_SERVER["PHP_SELF"])));
        if(count($a)>1) array_pop($a);

        $a = explode("manager",str_replace("\\","/",dirname(__FILE__)));

        $base_path = $pth.(substr($pth,-1)!="/" && substr($pth,-1)!="\\"? "/":"");


        I created a new empty config file and I tried to reinstall MODx by upgrading but that didn’t work because the installer said the database didn’t exist.

        So then I did a new install but specified the existing database and got another error saying the database prefix already was being used. So I changed the prefix to a different prefix and the install completed.

        Then I went into the config file and changed the table being used to the original prefix and everything seems to be working now.

        But my big concern is how could the config file have been changed? I don’t think I was doing anything in manager to cause this. And I did have permissions set (644) on the config file as well.

          • 5554
          • 22 Posts
          I obviously have no clue what I’m doing. But visiting my site now results in no style sheets being used. So apparently my "fix" in my preceding post was not the solution to what the real problem may be.

          I did not move any directories around...in fact I’ve not really done much of anything except via the manager. So I’m totally clueless.

          Unless someone has a suggestions, I’m inclined to just completely trash the installation and start all over again.
            • 22303 MODX Staff
            • 10,725 Posts
            Yeah, unfortunately, I have no experience with the config file just up and changing like that. I’m guessing at this point it might be best to start again from scratch, though I would sure be interested in finding out what went wrong. huh
              • 5554
              • 22 Posts
              I’ve been thinking about all this and the only thing I can come up with that might have somehow affected this is that I went into Manager and configured the site to be offline. I did this once or twice. but other than that I can’t think of anything else that i did in manager that could have caused anything to change.

              Could taking the site offline via the Manager possibly have anything to do with this? what is the mechanism by which the Manager takes the site offline and then displays the site is offline page?
                • 13447
                • 5 Posts
                Quote from: cnymike at Jan 26, 2006, 10:11 AM

                Just tried to login to Manager and got this error...

                Parse error: parse error, unexpected ’\"’, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/syracus/public_html/manager/includes/config.inc.php on line 18


                I did not change the config file (to my knowledge anyway) and it’s suddenly giving me this error. Any ideas why?

                Same thing is happening to me... all of the sudden one day, the site is down. I am getting the same error... have there been any fixes for this? The solution above just returned other errors.