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

Step 2: Modify the Magento .htaccess file
 
saraladym
Jr. Member
 
Total Posts:  1
Joined:  2008-03-27
 

hello ,
i try to install magneto but i hav ea problem.i have this =
Whoops, it looks like you have an invalid PHP version.

Magento supports PHP 5.2.0 or newer. Find out how to install Magen using PHP-CGI as a work-around.

i upload the php5-cgi file in the cgi-bin foldr.but i dont under stand the step 2 .
?????
please help

Step 2: Modify the Magento .htaccess file

By default, the web server will want to run the Magento application using PHP4, which will not work. In order to point it to the new PHP5 CGI binary, you must modify the .htaccess file in the Magento top-level directory.

Using your FTP client, edit the file .htaccess in your top-level magento directory.

The existing file looks something like this:
<IfModule mod_php5.c>
php_flag magic_quotes_gpc off
php_flag short_open_tag on
</IfModule>

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

Add two lines to it so it looks like this:
<IfModule mod_php5.c>
php_flag magic_quotes_gpc off
php_flag short_open_tag on
</IfModule>

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

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

You’ll want to modify the path in the Action line to point to the location of the php5-cgi binary you uploaded in Step 1.

Now test your Magento installation by visiting it with your web browser. If you see Magento smiling back at you, then you are now happily running on PHP5.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Airforce111
Sr. Member
 
Avatar
Total Posts:  100
Joined:  2008-01-31
 

In your .htaccess file located within /magento/.htaccess, you will be able to find the following lines:

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

You want to change /cgi-bin/php5-cgi to the path and location of your php5-cgi binary file you uploaded.

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