I have the same problem with both OpenSuse 10.1 and SLES 10. I go into Yast and set up everything for apache2. I try to open a php page, and it wants to open in a program such as gedit or save to the disk.
Now here's the strange part.
If I put a php page in my Default Host, it works. I can get phpinfo and everything. But if I put the same file in any other virtual host, it prompts me to open or save the document.
Below is the Virtual Host setup for one of my hosts. Yast only wanted to let me add one AddHandler, so I had to manually add the others. Then I ran SuSEconfig and restarted apache.
This VirtualHost is for internal use only. Hence, the strange address.
I'm running the 64 bit Suse, if that makes a difference. It seems to me that it is probably a problem with how I have my virtual hosts set up since it works with my Default Host, but even if I copy my virtual hosts from my existing SuSE 10.0 production server, it does the same thing. It works on SuSE 10.0, but not 10.1 or SLES 10.
I've read all the posts on this list, and many others, about getting php to work, and tried practically everything -- but this seems to be a new twist on it.
If anyone could help shed some light on what in the world is going on here, I would *greatly* appreciate it. I've been fighting with this for several days.
<VirtualHost 192.168.0.50>
DocumentRoot /srv/www/htdocs/dormitionskete.org.ds/
ServerName dormitionskete.org.ds
ServerAdmin
dsadmin@dormition.ds
ScriptAlias /cgi-bin/ /srv/www/htdocs/dormitionskete.org.ds/cgi-bin/
<Directory /srv/www/htdocs/dormitionskete.org.ds/cgi-bin/>
AllowOverride None
Options Indexes FollowSymLinks Includes ExecCGI MultiViews
Order allow,deny
Allow from all
DirectoryIndex index.shtml index.html index.php
AddHandler send-as-is asis
AddHandler cgi-script .cgi
</Directory>
# YaST created entry
<Directory "/srv/www/htdocs/dormitionskete.org.ds/">
Options Indexes FollowSymLinks Includes ExecCGI MultiViews
AllowOverride All
Order allow,deny
Allow from all
DirectoryIndex index.shtml index.html index.php
AddHandler php-script .php
AddType text/html .shtml
AddHandler server-parsed .shtml
AddHandler send-as-is asis
</Directory>
</VirtualHost>