I am by all means a Magento beginner so please bear with me. A magento setup I am working on and took on from another developer is very slow. When I try to store Magento Mega Menu extension items I often get a premature end of header.
[Tue Sep 15 02:26:29 2015] [error] [client xx.xxx.xxx.xxx] client denied by server configuration: /home/user/prelaunch.domain.com/app/etc/local.xml
This seems to be a general security message that access to local.xml was denied. See https://stackoverflow.com/questions/4360574/magento-client-denied-by-server-configuration
[Tue Sep 15 02:33:35 2015] [error] [client xx.xxx.54.211] Premature end of script headers: index.php, referer: http://prelaunch.domain.com/index.php/megamenuadmin/adminhtml_megamenu/new/key/7cf1b32b81e34985672110ff82385750/
[Tue Sep 15 02:52:11 2015] [error] [client xx.xxx.54.211] Premature end of script headers: index.php, referer: http://prelaunch.domain.com/index.php/megamenuadmin/adminhtml_megamenu/new/key/7cf1b32b81e34985672110ff82385750/
This is often when there is another error or lack of RAM and this .phprc
; {{{ The following lines were automatically added by DreamHost
extension=xcache.so
; }}} That's all from DreamHost
max_execution_time = 18000
max_input_time = 120
memory_limit = 512M
. I do have plenty of RAM.. Perhaps another configuration change needed?
I turned on error logging and this error came to my attention:
2015-09-15T09:52:42+00:00 ERR (3): Recoverable Error: Object of class
Mage_Catalog_Model_Resource_Product_Collection could not be converted to string in
/home/user/prelaunch.domain.com/app/design/frontend/rwd/default/template/page/custom.phtml on line 20
On that line I have
echo ' ' . '<a href="' . $_categoryChildModel->getUrl() . '"' . $bold . '>' . $_categoryChild->getName() . '' . $_categoryChildModel->getProductCollection() . '</a>';
Working out what the data being echoed is at the moment. Full code here https://gist.github.com/jasperf/5ed4a6d835c876b1c0e8
Other notices/warnings I see are:
2015-09-15T09:56:22+00:00 ERR (3): Notice: Undefined variable: cookieParams in
/home/user/prelaunch.domain.com/includes/src/__default.php on line 7693
referring to this block of code with some commented out data:
// session cookie params
/* $cookieParams = array(
'lifetime' => $cookie->getLifetime(),
'path' => $cookie->getPath(),
'domain' => $cookie->getConfigDomain(),
'secure' => $cookie->isSecure(),
'httponly' => $cookie->getHttponly()
);
*/
if (!$cookieParams['httponly']) {
unset($cookieParams['httponly']);
if (!$cookieParams['secure']) {
unset($cookieParams['secure']);
if (!$cookieParams['domain']) {
unset($cookieParams['domain']);
}
}
}
and this warning
2015-09-15T09:56:22+00:00 ERR (3): Warning: call_user_func_array() expects parameter 2 to be array, null given in
/home/user/prelaunch.domain.com/includes/src/__default.php on line 7707
referring to
call_user_func_array('session_set_cookie_params', $cookieParams);
Not sure if these errors are directly related to the issue at hand with the site being really slow in storing data and loading frontend, but would love to debug this error and or sort the notices and warnings and could use some help.