Page 1 of 2

Module Manager error

Posted: Fri Nov 18, 2011 3:53 am
by michaywood
Hey CMSMSers,

Doing my first testing of a site with the new 1.10 and ran into an error. I can't access the Module Manager. It spits back the error:

Code: Select all

Server error!

The server encountered an internal error and was unable to complete your request.

Error message: 
Premature end of script headers: systeminfo.php

If you think this is a server error, please contact the webmaster.

Error 500
any ideas?

Thanks in advance!


----------------------------------------------

Cms Version: 1.10.1

Installed Modules:

CMSMailer: 2.0.2
CMSPrinting: 1.0
FileManager: 1.2.0
MenuManager: 1.7.7
MicroTiny: 1.1.1
ModuleManager: 1.5.1
News: 2.12.3
Search: 1.7
ThemeManager: 1.1.4


Config Information:

php_memory_limit:
process_whole_template: false
output_compression: false
max_upload_size: 10000000
default_upload_permission: 664
url_rewriting: none
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true


Php Information:

phpversion: 5.3.6
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 0
E_DEPRECATED: 8192
memory_limit: 128M
max_execution_time: 60
output_buffering: 4096
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 10M
upload_max_filesize: 10M
session_save_path: /tmp (0777)
session_use_cookies: On (True)
xml_function: On (True)


Server Information:

Server Api: cgi-fcgi
Server Db Type: MySQL (mysql)
Server Db Version: 5.0.32


----------------------------------------------

Re: Module Manager error

Posted: Mon Nov 21, 2011 8:45 pm
by michaywood
just upgraded my CMSMS to the new 1.10.2 hoping this would fix my Module Manager error, but it still isn't working! I didn't get any errors during install so I don't know what this could be!

any ideas?

Thanks in advance!

Re: Module Manager error

Posted: Mon Nov 21, 2011 8:53 pm
by calguy1000
Is there anything else (warnings, etc) in the error log?

Re: Module Manager error

Posted: Mon Nov 21, 2011 8:57 pm
by michaywood

Code: Select all

Server error!

The server encountered an internal error and was unable to complete your request.

Error message: 
Premature end of script headers: moduleinterface.php

If you think this is a server error, please contact the webmaster.

Error 500

subdomain.mydomain.com
Mon Nov 21 20:51:47 2011
Apache/2.2.11
That's all that it says.

ideas?

Re: Module Manager error

Posted: Mon Nov 21, 2011 9:05 pm
by calguy1000
no clue.... sounds like there's a problem with your machine making a request to the CMSMS server.. but don't know why.

I would have to be able to reproduce the problem to provide any more feedback.

Re: Module Manager error

Posted: Mon Apr 09, 2012 8:09 pm
by michaywood
I'm still having this problem and it makes it really difficult to update any modules I have installed.

I would be willing to grant limited access to my admin test site so you can see the error i'm getting. But it reads exactly as I've posted before. Does this have anything to do with gzip compression or anything else CMSMS needs/likes?

Re: Module Manager error

Posted: Mon Jul 16, 2012 6:22 pm
by michaywood
I'm still having issues with this! So I can never use the Module Manager and have to always install modules manually and update manually. This is frustrating!

I contacted my host about the issue since this problem only happens on this host. They thought it was cause I was on PHP5.3 so they downgraded me to PHP5.2. The problem still exists... So I contacted them again, and they say it isn't their problem but a problem with the CMS (their exact words were "it's probably a poorly executed script that is taking too much time to load and timing out the server"... he didn't seem like a nice tech support guy!)

Does anyone have any other ideas as to why I could be getting this 500 error when trying to access the Module Manager page??? Please help!!! I'm desperate!

Re: Module Manager error

Posted: Mon Jul 16, 2012 7:17 pm
by Rolf
Do you have access to the error log of that server? It is different as the message at your screen posted above.
http://docs.cmsmadesimple.org/troublesh ... rver-error
The error log will (hopefully) give more info why the error 500 is generated... Without that there is not much we can do.

grtz. Rolf

Re: Module Manager error

Posted: Mon Jul 16, 2012 7:25 pm
by michaywood
Thanks for the reply, Rolf! The error logging feature wasn't turned on in my host so I just had to go turn it on. Must take some time to work cause I recreated the error after turning logging on, and it still didn't show up in the error log. And just cause it says Server Error does that mean the same as that Internal Server Error link you sent? The error it's giving is Premature end of script headers: moduleinterface.php. It probably spends a minute trying to load the Module Manager before spitting that 500 error. And it's ONLY on the Mondule Manager page. All other pages work perfectly both on the website as well as the admin site!

Re: Module Manager error

Posted: Wed Jul 18, 2012 6:26 pm
by michaywood
This issue was starting to drive me crazy so I had my host tech support team forward this to the tech administrators to look at. Here is their response:
The case is caused by the script which you use itself. The processes which you try to execute when you open the modules sections are heavy and the script exceeds the default execution time set on this shared hosting server. Please try to optimize the script performance or contact the script developer in order to find more information if it is possible to optimize the mentioned section which execute heavy processes. Otherwise you could consider a more powerful hosting solution like a VPS with cPanel or Direct Admin control panels where you will have full root access and you will be able to increase the default execution time limits on the server.

So does anyone know if the new CMS about to come out addresses this heavy scripting? or is there a way to optimize the performance of this page? I really like this host's control panel vs. cPanel, so I'm trying my hardest to not have to switch hosts!

Thanks in advance!

Re: Module Manager error

Posted: Wed Jul 18, 2012 7:01 pm
by calguy1000
I don't know what to tell you

ModuleManager is MUCH lighter than it was in the 1.9.x series of CMSMS, and much faster for most people.

I checked the code, the ONLY thing that I think could be causing a problem is that your host doesn't like handling outgoing connections.

With shell access, and an hours time we could debug this... but I would still bet a beer that it's related to something on the host.

Re: Module Manager error

Posted: Wed Jul 18, 2012 8:33 pm
by applejack
I'm pretty sure I had this when I upgrade to v1.10+ because Module Manager had been changed and required a php server component which if I remember correctly was I think xml_reader I am sure Calguy will be able to confirm this.

See
http://forum.cmsmadesimple.org/viewtopi ... =3&t=60485

Re: Module Manager error

Posted: Wed Jul 18, 2012 8:49 pm
by calguy1000
not having XmlReader available would not cause this problem. It would generate an error that is visible in the admin log, the error log, and (if in debug mode) the screen.

This problem is most likely caused by a poorly configured host (somehow)... but there is such little information to go on that all we can do is guess.

I have (today) tested again. ModuleManager works fine for my local VM, and on a couple of remote VPS's running 1.10.3. On my local VM I disabled DNS lookups.... ModuleManager instantly generated an error (correctly) that it was having problems contacting the module server. I re-enabled DNS lookups on the VM but pointed DNS lookups to an invalid address on my local network (i.e: nameserver 192.168.0.244 ... which there is no host at) This took about 5 to 6 seconds but still generated the same error.

I looked at the source code... and ModuleManager is now significantly lighter than any previous version. The ONLY way I can see that there would be a time out is with network connectivity. Admittedly, in versions prior to 1.11 there was a slight inefficiency, where the same request could be made to the CMSMS server 2 or 3 times given a slow connection... but that still should not cause the issue. That minor inefficiency is now fixed in 1.11.

I've now done all of the investigation that I can do. This points absolutely to a host issue. This issue could be absolutely determined with an hours worth of debugging... but shell access would be needed (otherwise it'd prolly be like 3 hours)... and I just don't have the time to invest in this right now.

Re: Module Manager error

Posted: Wed Jul 18, 2012 8:54 pm
by applejack
Check your error logs and google Premature end of script headers php

Re: Module Manager error

Posted: Thu Jul 19, 2012 1:28 am
by michaywood
Got something from the host to try out. Here is what they said:
The default maximum execution time on the server is set around 60 seconds and I assume that the process exceeds it since we receive the error 500 after about 60 seconds of loading, not immediately in case of network troubles as mentioned by the script developer. You could try to increase the 'max_execution_time' option for your accounts PHP settings through the "PHP configuration" menu in the "Advanced" tab of the control panel, but usually the default limit set on the server will not be significantly higher. However, you could test the outgoing connection to particular host by using a fsockopen test script like the following one:
==========================
<?php
$fp = fsockopen("google.com", 80, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br />\n";
} else {
$out = "GET / HTTP/1.1\r\n";
$out .= "Host: www.google.com\r\n";
$out .= "Connection: Close\r\n\r\n";
fwrite($fp, $out);
while (!feof($fp)) {
echo fgets($fp, 128);
}
fclose($fp);
}
?>
==========================

You could ask the script developer to provide you with the necessary connection with the host name your CMS tries to reach, so you could test the connection with the above mentioned script.
I hope this makes sense to y'all. I tried to extend the max execution time already from 60 seconds to 180 seconds and still got the 500 Error with the same error reasons.

Any ideas? I can't say it enough. THANK YOU THANK YOU THANK YOU for working with me on this!