Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

CGI 500 Error… Help Please
 
Uragai
Jr. Member
 
Total Posts:  1
Joined:  2007-11-06
 

I’m having problems installing magento, my server runs php 5.1.6 so I tryed to use php5-cgi, but it gives me a 500 error.
I’ve used the tutorial on the wiki to make the setup.

Even used this solution http://www.magentocommerce.com/boards/viewthread/804/ but it doesn’t work for me.

My servers log error is : Premature end of script headers: /home/omegatur/public_html/cgi-bin/php5-cgi
I’m using hostmonster.com as a host.

Could anyone help me?

 
Magento Community Magento Community
Magento Community
Magento Community
 
setanta
Member
 
Total Posts:  33
Joined:  2007-11-01
 

Hi there,

I am also using hostmonster with PHP version 5.1.6
After a week of trying everything it finally worked. I am no expert so I’ll try to explain in layman’s terms. (I also installed in a sub domain but I think it should work regardless of location)

so from my root folder I have

.htaccess

#php_flag magic_quotes_gpc off
#php_flag short_open_tag on

Action php5-cgi /cgi-bin/php5-cgi
AddHandler php5-cgi .php

DirectoryIndex index.php

RewriteEngine on

RewriteCond %{REQUEST_URI} !^/media/
RewriteCond %{REQUEST_URI} !^/skin/
RewriteCond %{REQUEST_URI} !^/js/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule .* index.php

I then created a cgi-bin folder and uploaded the php5-cgi file from this link (without editing it)

http://www.magentocommerce.com/support/php5cgi/php5-cgi

Inside the cgi-bin folder I created a new file called php.ini containing one line of code

allow_url_fopen = on

The permissions for these files/folders are as follows

644 .htaccess
755 cgi-bin (folder)
644 php.ini
750 php5-cgi

I really hope this helps some people out. I tried every combination of every solution and this finally worked.

I just finished the install and the only other word of caution is if when set up asks for your “secure connection” information.
If you have not purchased this feature (https) make sure you change BOTH
“secure protocol” to http
“secure port” to 80

I had the misfortune of changing one and not the other so when the install completed I couldn’t access my store admin, which required me to start from scratch.
So very happy this is working and thanks to all the contributors for the information that helped out.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Cubano61
Jr. Member
 
Total Posts:  1
Joined:  2008-02-26
 

setanta,

Thanks for these instructions. I’m close to getting this going. I’ve read so many different explanations, but since I’m on host monster, this should work.

A couple of things I wanted to double-check. I have my domain’s directory inside the home directory (public_html), so is the .htaccess file you are referring to is actually the one inside the /magento subdirectory and did you put that installation at the root level of your domain directory or in a “magento” subdirectory?

Is your cgi-bin directory then on the same level as your magento root directory or is it next to a directory called “magento”. If I wanted to have the cgi-bin directory next to the magento directory inside of my domain directory, would I need to change any of your code?

Thanks in advance!!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top