Magento Forum

   
Page 1 of 2
Premature end of script headers: php5-cgi
 
Bluenix
Jr. Member
 
Total Posts:  4
Joined:  2007-11-12
 

Hi!

I’m trying to run Magento on a server that uses PHP4 . Therefore, I followed the instructions on using the php5-cgi. However, after placing the php5-cgi in the right directory and creating the right .htaccess file, my browser gives me the following error when surfing to the Magento root directory:

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

My Apache-log states:

Premature end of script headersphp5-cgi

Any ideas on this?

Thank you very much in advance!

 
Magento Community Magento Community
Magento Community
Magento Community
 
ramirors
Jr. Member
 
Total Posts:  9
Joined:  2007-09-04
 

Same problem, any help please....

Plesk 8.3 on solarvps

thanks!!!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
phrench
Member
 
Total Posts:  65
Joined:  2007-11-10
 

same problem… host is using php 5.1.6
:-(

 
Magento Community Magento Community
Magento Community
Magento Community
 
suls
Jr. Member
 
Total Posts:  2
Joined:  2008-03-17
 

I have the the same problem also, spent some time trying to resolve it a couple of weeks ago with no joy at all. Love to know if anyone has any ideas.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Chaffey
Jr. Member
 
Total Posts:  1
Joined:  2008-04-18
 

I’ve got the same problem too, anyone found a solution? I’m running Plesk 8.1 with PHP 5.0.4. Trying to avoid upgrading to PHP 5.2.

Cheers.

 
Magento Community Magento Community
Magento Community
Magento Community
 
phrench
Member
 
Total Posts:  65
Joined:  2007-11-10
 

i fixed it by using an older version of php5-cgi i had downloaded earlier, the one i downloaded recently seems to be corrupt.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Yakumo
Jr. Member
 
Total Posts:  11
Joined:  2008-04-10
 

I came across this with my local testing too, and fixed it, though your cause might be different, see : http://www.magentocommerce.com/boards/viewreply/23917/

 
Magento Community Magento Community
Magento Community
Magento Community
 
pauljg1
Sr. Member
 
Avatar
Total Posts:  179
Joined:  2008-02-22
 
phrench - 18 April 2008 09:18 AM

i fixed it by using an older version of php5-cgi i had downloaded earlier, the one i downloaded recently seems to be corrupt.

Where can i get this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Whity
Jr. Member
 
Total Posts:  5
Joined:  2008-05-18
 

Hello,

I think i have the solution for the problem running php as a cgi module on a plesk server.

Plesk uses a modified version of suexec. There are some problems that can occur:

1. You simply have false permissions/owner for your “php5-cgi” in your cgi-bin (The permissions HAVE TO be set to 755, owner same as the cgi-bin’s directory user and the group HAS TO be psacln and NOT psaserv)

(That was the problem in my case)

2. An update on the server has overwritten the modified suexec version from plesk installation.
If you have root access to the server you can compare the file sizes of the two suexec executables:

ls -/usr/local/psa/suexec/psa-suexec
ls 
-/usr/sbin/suexec

If they don’t match you can restore the plesk version by copying it back from plesk’s directory:

cp /usr/local/psa/suexec/psa-suexec /usr/sbin/suexec

If you still have problems have a look into suexec’s log file at /var/log/httpd/suexec_log if possible.

Urs

 
Magento Community Magento Community
Magento Community
Magento Community
 
itay
Jr. Member
 
Avatar
Total Posts:  30
Joined:  2008-04-20
Israel
 

where and how i can change the group “psaserv” to “psacln”

 
Magento Community Magento Community
Magento Community
Magento Community
 
njwood60
Jr. Member
 
Total Posts:  25
Joined:  2008-09-16
 

Hi

My host is running PHP 5.2.4 and I also got “Premature end of script headers” errors trying to install. I was using the downloader version and the installation instructions said set the install directory permissions to 777, however I found I needed to set them to 755 to avoid the message.

After the downloader finished I got the same message when I clicked on “continue installation”.

To resolve that I had to change the permissions on index.php to 644. I also changed the directories: app, var, media and app/etc to 755 but don’t know if that was actually necessary.

Hope this helps someone with their install

 
Magento Community Magento Community
Magento Community
Magento Community
 
mcjohn87
Jr. Member
 
Total Posts:  1
Joined:  2009-08-10
 

thanks so much for useful info
script install

 
Magento Community Magento Community
Magento Community
Magento Community
 
justin00
Jr. Member
 
Total Posts:  28
Joined:  2009-02-20
 

same problems here.i’m using the lastest magento.works fine after upgrated.but a few days later has the sampe problem as per the error log.i’m trying
njwood60’s aprroach,god bless me!

update:no use.so frustrated with magento.i’m thinking about stopping using it.:(

 
Magento Community Magento Community
Magento Community
Magento Community
 
jan212
Guru
 
Avatar
Total Posts:  407
Joined:  2008-01-03
 

If you are getting a Premature end of script headers in Magento Backend(only) using a Plesk based Server:
Could be caused by Plesk itself if you are running php as cgi/fcgi under it. The firewall doesn’t allow the communication with the magentoserver to fetch the admin notifications, this causes trouble with some functions which are running 4min in a loop(on one of my machines) trying to get a server connection. Even rules doesn’t work in my case (yes, they are activated wink). With a standard setup the fcgi max execution times will be overrun by this loop which is causing the premature end…

To avoid this you’ll have disable admin notifications by deactivating it in the backend configuration and write a small module, you can use this code
here http://mystic-one.com/2009/03/12/magento-how-to-disable-update-notifications/.

After that Magento backend should work as expected.

 
Magento Community Magento Community
Magento Community
Magento Community
 
apatruduque
Jr. Member
 
Total Posts:  10
Joined:  2010-02-24
 

Hi All.

In my case, the site was working perfectly, except when I try to upgrade magento through Magento_Connect fron version 1.4.0.0 to 1.4.0.1. When I was trying to do it, I was allways getting premature end of script headers.

I checked the permissions of the folders and executables and everything was OK… Then I thought “well.. maybe my script is ending prematurely somehow, or not the script but the process which is supposed to receive the output of the script\”. I checked mod_fcgi documentation and used the following options:

<IfModule mod_fcgid.c>
ProcessLifeTime 7200
IPCCommTimeout 7200
IPCConnectTimeout 300
</IfModule>

Problem solved!! I could update my magento instalation without problems!!

I’m using plesk, so I put these directives in the file conf/vhost.conf of my domain and run websrvmng to reconfigure my post.

Hope it helps.

 
Magento Community Magento Community
Magento Community
Magento Community
 
thewronggrape
Jr. Member
 
Total Posts:  1
Joined:  2010-04-08
 
njwood60 - 16 September 2008 09:57 PM

Hi

My host is running PHP 5.2.4 and I also got “Premature end of script headers” errors trying to install. I was using the downloader version and the installation instructions said set the install directory permissions to 777, however I found I needed to set them to 755 to avoid the message.

After the downloader finished I got the same message when I clicked on “continue installation”.

To resolve that I had to change the permissions on index.php to 644. I also changed the directories: app, var, media and app/etc to 755 but don’t know if that was actually necessary.

Hope this helps someone with their install

Thanks. This was exactly what I needed to do to get it to work, though to clarify, I had to change the permissions on index.php in the magento folder, not the downloader folder.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 1 of 2