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

will php 5.1.6-12 work with the cgi for php 4? 
 
Melinda
Member
 
Total Posts:  49
Joined:  2007-08-31
 

Hi,

I have now php 5.1.6-12 which I know is below the requirements but was wondering if I could use the php5-cgi to get it to work?

Since I use Plesk for a server administration the cgi-bin is outside the httpdocs/ directory:
cgi-bin/httpdocs/etc.

I uploaded the file and put these lines in the .htaccess fie:
Action php5-cgi ../../../cgi-bin/php5-cgi
AddHandler php5-cgi .php

The permissions and ownerships are correct.

When I go here I get a totally blank page:
http://www.designhosting.us/cgi-bin/php5-cgi

I tried the install page here:
http://www.designhosting.us/magento/testMelinda/magento/
and get:
Bad Request
Your browser sent a request that this server could not understand.

Client sent malformed Host header
==============================

Is there a way to install on the php 5.1.6-12 I have now on my server or not?

CentOS doesn’t have php 5.2 in their mirrors.

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Melinda
Member
 
Total Posts:  49
Joined:  2007-08-31
 

will that cgi deal work with php 5.1.6?

I may upgrade, I am checking with my server owner now.

Yes, the CGI version is independent of your regular PHP install so the version you have shouldn’t make any difference.

I see this in another post so can you please tell me what the problem is as posted in the previous post?

Thank you!

This is from the error log:
[Sat Sep 08 08:13:39 2007] [error] [client 75.41.160.141] Invalid URI in request GET /magento/testMelinda/magento/ HTTP/1.1

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brandon
Sr. Member
 
Avatar
Total Posts:  76
Joined:  2007-08-31
Web Developer
 

Can you post your entire .htaccess file, Melinda?  Also, you can try restarting your server.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Melinda
Member
 
Total Posts:  49
Joined:  2007-08-31
 

The .htaccess file:

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 restarted apache but it doesn’t make any difference.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brandon
Sr. Member
 
Avatar
Total Posts:  76
Joined:  2007-08-31
Web Developer
 

I think your Action line is incorrect/invalid.  What is the path to your .htaccess file (the root magento folder), and where is your cgi-bin located?

A quick test to see if the path is wrong is to make a typo in your Action line and see if the error message changes.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Melinda
Member
 
Total Posts:  49
Joined:  2007-08-31
 

I have tried different paths in the action line but it doesn’t make any difference.  I still get the same error message.

The path to the .htaccess is:
http://www.designhosting.us/magento/testMelinda/magento/.htaccess

The cgi-bin is like this in plesk:
/var/www/vhosts/domain.com/conf/cgi-bin

The httpdocs where the root files are is here:
/var/www/vhosts/domain.com/httpdocs

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brandon
Sr. Member
 
Avatar
Total Posts:  76
Joined:  2007-08-31
Web Developer
 

Try using this in your htaccess

php_flag magic_quotes_gpc off
php_flag short_open_tag on

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

DirectoryIndex index
.php 

....

Also, have you chmodded the cgi-bin directory and php5-cgi file?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Melinda
Member
 
Total Posts:  49
Joined:  2007-08-31
 

The cgi-bin is:
drwxr-x--- 3 designus psaserv 4096 Sep 7 12:17 cgi-bin
I have tried setting this to 755 and 777 and still same error.

The php5-cgi is:
-rwxr-xr-x 1 designus psacln 18440550 Aug 31 13:15 php5-cgi
chmod +x or 755.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Melinda
Member
 
Total Posts:  49
Joined:  2007-08-31
 

ahhh at least the error changed:
Not Found
The requested document was not found on this server.

when using:
Action php5-cgi /conf/cgi-bin/php5-cgi

This is not the correct path because on the server the cgi-bin is not inside the conf folder.  The listing is like this:
/var/www/vhosts/domain.com/
bin
cgi-bin
conf
error_docs
httpdocs
httpsdocs
etc…

 
Magento Community Magento Community
Magento Community
Magento Community
 
Melinda
Member
 
Total Posts:  49
Joined:  2007-08-31
 

I put up a test page with the test.cgi script Plesk puts in there when you setup a new account and it works:

http://www.designhosting.us/cgi-bin/test/test.cgi

-rwxr-xr-x 1 designus psacln 662 Sep 6 15:12 test.cgi

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