Luis Valencia
Luis Valencia

Reputation: 33978

Premature end of script headers on index.php magento

I have searched this a lot and none of the solutions has worked so far, so I guess I really need to troubleshoot to see what the problem is:

When I browse our website www.theprinterdepo.com, it works fine on chrome, ie or firefox. However when I go to the admin on www.theprinterdepo.com/admin on Internet explorer, then it shows the 500 internal server error, and after that if I try to use Internet Explorer to www.theprinterdepo.com, it shows the same error. At the same time I can be in Google Chrome or Firefox surfing the site and it works without a problem.

It takes ages to load on Internet Explorer when it works. while on chrome still loads perfect.

I set chmod 755 in index.php.

I added this on index.php

if ($_SERVER['REMOTE_ADDR'] == '83.134.93.212') { Mage::setIsDeveloperMode(true); ini_set('display_errors', 1); }

I got this

Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 60: parser error : Opening and ending tag mismatch: config line 28 and confg  in /home/theprint/public_html/lib/Varien/Simplexml/Config.php on line 510

#0 [internal function]: mageCoreErrorHandler(2, 'simplexml_load_...', '/home/theprint/...', 510, Array)
#1 /home/theprint/public_html/lib/Varien/Simplexml/Config.php(510): simplexml_load_string('loadString('loadFile('/home/theprint/...')
#4 /home/theprint/public_html/app/code/core/Mage/Admin/Model/Config.php(59): Mage_Core_Model_Config->loadModulesConfiguration('adminhtml.xml', Object(Varien_Simplexml_Config))

Line 510 correspond to this:

  public function loadString($string)
    {
        if (is_string($string)) {
            $xml = simplexml_load_string($string, $this->_elementClass);

            if ($xml instanceof Varien_Simplexml_Element) {
                $this->_xml = $xml;
                return true;
            }
        } else {
            Mage::logException(new Exception('"$string" parameter for simplexml_load_string is not a string'));
        }
        return false;
    }

Upvotes: 0

Views: 2165

Answers (2)

MagePal Extensions
MagePal Extensions

Reputation: 17656

Since your error is Opening and ending tag mismatch: one of the quickest way to debug this is to disable all custom module/layout.xml modification and then reenable them one by one, until you find the xml that causing this error.

Upvotes: 1

Luis Valencia
Luis Valencia

Reputation: 33978

by editing that config file I was able to ech the path and find the xml failing, the start tag was and the end tag was

I fixed that and then it started to work

Upvotes: 0

Related Questions