Downloading Php Files (WordPress-Virtual Host)
Now I'm installing wordpress. Things seemed to go okay, process went through just fine, brought me to the admin login page, yay. However, when I attempt to go to mysite.com, a file (download.php) is downloaded. If I try to to IPAddress/mysite I download the same file. IPAddress/mysite/index.php, it downloads index.php.
I've done some googling and seen other people with the same problem, so I added the following to the end of my apache2.conf file:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Restarted apache and….no difference. If I go to my regular site (IPAddress or the Linodename), I get the temporary index.html file I put up
After working on this for several hours, I'm just plain confused. I haven't really had issues with this before on a past server, so I'm assuming it's just a configuration option I messed up. Any thoughts/suggestions that can point me in the right way?
Thanks
H
2 Replies
Instead of````
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
try this````
AddHandler php5-script .php .html .htm
AddType text/html .php .html .htm
and restart apache. It's what I have at the end of my U 12.04 apache2.conf file.
I've never used the -source or .phps extensions, so if my suggestion works - and you want/need the .phps extension - you may just have to find a syntax that matches.
I did notice that if I turn on the userdir mod, it attempts to grab the php files as well. Turns out userdir mod had the php engine turned off. Simply commented out the code (as per
Thanks for the suggestion though.