0

So, when I put in my .htaccess file which contains the following:

# Use PHP5 php.ini as default
AddHandler application/x-httpd-php5 .php

AcceptPathInfo On

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [L,QSA]

The server tries to download the PHP file instead of executing it. When I remove the .htaccess file, everything works fine and the PHP files execute.

3 Answers 3

5

I'd remove the AddHandler directive. Leave this to the server config.

Everything else looks fine.

Sign up to request clarification or add additional context in comments.

1 Comment

+1 the AddHandler for .php force the download instead of executing. I've tried to remove that line and everything works fine. Ciao!
0

It could very well be the

AddHandler application/x-httpd-php5 .php

Are you including this because your server is setup to not run PHP5 by default?

Comments

0

I found the issue in the end, I had the entire thing set up correctly. There is a bug in PHP5, that had happened due to some of the discontinuing support of $_SERVER['ORIG_PATH_INFO']. This is not true in windows servers, however in PHP 5.4.2 (Linux Distro) ORIG_PATH_INFO is not supported any more, only PATH_INFO. A report has been made about this. But all is up and running. Thanks for your guys' help and responses.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.