Got a problem with Apache and PHP-files of WordPress.
When I go to any WP’s page, browser try to download PHP-file as a static one. I created test.php with <?php echo 'test'; ?> and it runs normally.
Solved! I found that php5.conf was disebled: /etc/apache2/mods-enabled/php5.conf.disabled. PHP works after renaming it.
I run a clean image of Debian 6, installed Apache and PHP 5.3 (within ISPmanager), made a PHP-enabled domain and copied a WordPress installation from shared hosting. So everything here is from stack, not modified and should work.
There was a similar question, but it wasn’t resolved:
Why browser is trying to download my php script file?.
If anyone knows the answer, I would appreciate it. Thanks.
You have a “space” char between question sign and “php”. Remove it. This should solve the problem.
If this doesn’t help, check that PHP is properly configured. Open your httpd.conf file and check for these lines: