LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   Apache PHP Configuration Problem (https://www.linuxquestions.org/questions/suse-opensuse-60/apache-php-configuration-problem-484665/)

Br. Nicholas 09-18-2006 11:06 AM

Apache PHP Configuration Problem
 
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>

mattl 09-19-2006 07:12 PM

i am not an expert , but i do use virtual hosts with apache on suse as well with no probs - so since youve no replies yet, here goes ...as i recall from my setups i have never had to make any reference to php in my virtual host sections and it works. id try removing the addhandler and p
hp specific lines in your virtual host. all i ever had to do was make sure that the apache-php module was loaded and that was that. i do recall having to specify the filetype on another web server i used briefly a few yrs ago but dont think thats your issue here.

Br. Nicholas 09-19-2006 08:45 PM

When I hadn't received any replies by late this afternoon, I finally gave up and blew away my SLES 10 install and put 10.1 back on it. I tried to put Suse 10.0 on it, but my hardware is too new. I figure I'll try to install apache, php and perl from the 10.0 dvd on it and see if that works better. It works on my two 10.0 production servers. If it won't let me put the 10.0 packages on it, I'll try your suggestion with the 10.1 packages. If it still doesn't work, I'll either have one of the other servers run apache and not bother with it on this machine anymore, or set up a virtual server on this machine and run redhat on it just for apache. It's just for internal use only anyway. I'm tired of fighting with it. I want to get this box out of my office and get on with my life.

Thanks very much for your post, though.

Br. Nicholas 09-20-2006 03:59 PM

Never mind. I thought I found the problem. I was wrong.


All times are GMT -5. The time now is 07:23 AM.