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

PHP5-CGI is working but 500 internal server error
 
davin
Jr. Member
 
Total Posts:  15
Joined:  2007-09-26
 

I uploaded PHP5-Cgi to CGI-Bin directory. Now my PHP4 updated to PHP 5.2.4 but still i am getting “500 internal server error” i also set CGI-BIN Directory

to 755. But after all mentioned steps i am still getting 500 error. Why this 500 error??

Is there any problem with Mod_Rewrite......

This is my configuration:

Now in my cpanel PHP version is 5.2.4
Mysql 4.1.22
apache 1.3.37

Any help guys

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

Do you have URL i can take a look at?

 
Magento Community Magento Community
Magento Community
Magento Community
 
davin
Jr. Member
 
Total Posts:  15
Joined:  2007-09-26
 

Hi Mosche

Here is URL http://www.buylaptop.co.in

If you want more some more information please.

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
davin
Jr. Member
 
Total Posts:  15
Joined:  2007-09-26
 

I contacted my hosting provider they told me there is some problem with .htaccess file. Here is all detail so please give some suggestion

This is my cgi path

http://www.buylaptop.co.in/cgi-bin/php5-cgi/

Here is my .htaccess details

php_flag magic_quotes_gpc off
php_flag short_open_tag on

DirectoryIndex index.php

Action php5-cgi /cgi-bin/php5-cgi
AddHandler php5-cgi .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

 
Magento Community Magento Community
Magento Community
Magento Community
 
essentl
Jr. Member
 
Total Posts:  12
Joined:  2007-08-31
 

I had a similiar issue and i had to erase or comment out:

php_flag magic_quotes_gpc off
php_flag short_open_tag on

You might want to check your error log.

 
Magento Community Magento Community
Magento Community
Magento Community
 
chrischnian
Member
 
Total Posts:  65
Joined:  2007-09-27
Oberfranken => Kronach
 

Sorry my English ist not so good.

In your htaccess you must

php_flag magic_quotes_gpc off
php_flag short_open_tag on

in

#php_flag magic_quotes_gpc off
#php_flag short_open_tag on

PHP_FLAG is no going under PHP in CGI!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
davin
Jr. Member
 
Total Posts:  15
Joined:  2007-09-26
 

I tried but now i am getting long long error page with lot of errors.

No luck

 
Magento Community Magento Community
Magento Community
Magento Community
 
Dirk67
Jr. Member
 
Avatar
Total Posts:  8
Joined:  2007-09-28
near Bremen, Germany
 

got the same…

using php (5.2.1) as CGI-module as well

commented out the first 2 linesof the .htaccess already

 
Magento Community Magento Community
Magento Community
Magento Community
 
mattdirks
Jr. Member
 
Total Posts:  1
Joined:  2007-09-27
 

Had some of the same problems, but a little different configuration.  I am running PHP4 and PHP5.1 and using the CGI-BIN method for Magento.

What I had to do was to add the following to my httpd.conf for the install directory:

<Directory /INSTALL DIRECTORY>
AllowOverride All
</Directory>

and then restart Apache.

I am no Apache expert and cannot verify that this does not open any security concerns, but this worked for me.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Dirk67
Jr. Member
 
Avatar
Total Posts:  8
Joined:  2007-09-28
near Bremen, Germany
 
mattdirks - 28 September 2007 08:30 AM

Had some of the same problems, but a little different configuration.  I am running PHP4 and PHP5.1 and using the CGI-BIN method for Magento.

What I had to do was to add the following to my httpd.conf for the install directory:

<Directory /INSTALL DIRECTORY>
AllowOverride All
</Directory>

and then restart Apache.

I am no Apache expert and cannot verify that this does not open any security concerns, but this worked for me.

We are on shared Hoster,
so we don’t have access to httpd.conf I think ....

 
Magento Community Magento Community
Magento Community
Magento Community
 
davin
Jr. Member
 
Total Posts:  15
Joined:  2007-09-26
 

Yes Dirk you are right we can change httpd.conf file in shared hosting

 
Magento Community Magento Community
Magento Community
Magento Community
 
Dirk67
Jr. Member
 
Avatar
Total Posts:  8
Joined:  2007-09-28
near Bremen, Germany
 

I found another Thing:

Add the line

RewriteBase /
to your “.htaccess”

So the complete modified (!) .htaccess for shared Hoster looks as follows:

#php_flag magic_quotes_gpc off
#php_flag short_open_tag on

DirectoryIndex index.php

RewriteEngine on

RewriteBase 
/

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

Finally this works for me:
in the case you have PHP 5.2.1 as CGI-module on a shared Hoster

 
Magento Community Magento Community
Magento Community
Magento Community
 
davin
Jr. Member
 
Total Posts:  15
Joined:  2007-09-26
 

Hi Dirk

Thanks man its working now....

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