We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21112
    • 156 Posts
    Hi folks.

    I’m trying to get a new install of MODx going on my site, and I’ve run into a problem. The install works fine, and the manager seems to be fully functional. But the index.php file generates the following error (which also appears in the preview in the manager):

    Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/orioscom/public_html/cgi-bin/cgi.s.php:3) in /home/orioscom/public_html/manager/includes/config.inc.php on line 39 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/orioscom/public_html/cgi-bin/cgi.s.php:3) in /home/orioscom/public_html/manager/includes/config.inc.php on line 39 Warning: Cannot modify header information - headers already sent by (output started at /home/orioscom/public_html/cgi-bin/cgi.s.php:3) in /home/orioscom/public_html/manager/includes/document.parser.class.inc.php on line 431
    « 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/orioscom/public_html/cgi-bin/cgi.s.php:3)	 
      Error type/ Nr.: 	Warning - 2	 
      File: 	/home/orioscom/public_html/manager/includes/document.parser.class.inc.php	 
      Line: 	73	 
      Line 73 source: 	} 	 
     
    Parser timing
      MySQL: 	0.0096 s s	(0 Requests)
      PHP: 	0.0435 s s	 
      Total: 	0.0531 s s
    


    I have tried uninstalling, deleting the database, and doing everything again from scratch with a freshly downloaded copy of the software and I still have the same problem. The confic.inc.php file seems to stay empty after the install.

    Here’s the address for phpinfo:
    http://www.orionvisuals.com/phpinfo.php

    Any help is appreciated!
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      What is the cgi.s.php file in your cgi-bin folder doing? Looks like it’s interfering with session control.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 21112
        • 156 Posts
        Thanks for the reply.

        This is what’s in the cgi.s.php file:

        <?
        echo "Content-type: text/html\n\n";
        @ob_start();
        define('UPDIR', '..');
        define('BACKDIR', 'cgi-bin');
        ?>
        


        I didn’t create this myself, so I’m not sure of its function. If it wasn’t put there by my host for some purpose, then I can only assume it came from some other software I run on my site, such as vBulletin or Gallery. Any ideas?
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Well, whatever it is, that’s what’s breaking your site by sending out its own headers before MODx can. I can’t find anything about it in English in Google. Looks suspicious to me.

          Somebody reported finding a bunch of similar files in a hidden folder on their server; this was found by Yahoo search.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 21112
            • 156 Posts
            Hmm... Interesting.

            I renamed the file to cgi.s.php-old, and when I attempted to access the home page (not the intex.php but index.html) of my site, I got a server error:

            Internal Server Error
            The server encountered an internal error or misconfiguration and was unable to complete your request.
            
            Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
            
            More information about this error may be available in the server error log.
            
            Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
            Apache/1.3.34 Server at www.orionvisuals.com Port 80
            


            Should I be asking my web host to explain?

            Regards.
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Yes. Something is definitely odd here. Who is calling that .php file? As in what program on your server is calling it; it doesn’t just run all by itself.
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 21112
                • 156 Posts
                I’m afraid I don’t know that. Is there any way to find out?
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Does the index.html file refer to it? How about your .htaccess file? (kind of a stretch, but it’s coming from somewhere!)
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    In any case, you should contact your host’s tech support.
                      Studying MODX in the desert - http://sottwell.com
                      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                      Join the Slack Community - http://modx.org
                      • 21112
                      • 156 Posts
                      The file is not referred to in either the index.html or the .htaccess. I’ve submitted a suport ticket to my host explaining the situation and linked to this thread. I will let you know when I learn more.

                      Thanks for the help!