Do you have the following line in your apache config file?
AddType application/x-httpd-php .php .phtml .php3
This is usually the problem when .php file are being offered for download.
Main Topics
Browse All TopicsHi,
I'm sorry for these questions. They are obvious rookie problem.
I installed apache2 and php5 on ubuntu 7.10 using instructions at: http://www.howtoforge.com/
Per instructions, I made the following change to /etc/apache2/mods-availabl
<IfModule mod_dir.c>
commented out-->>> #DirectoryIndex index.html index.cgi index.pl index.php index.xhtml
added this line -->>> DirectoryIndex index.html index.htm index.shtml index.cgi index.php index.php3 index.pl index.xhtml
</IfModule>
1. When I try to execute a php program, such as phpinfo.php, apache2 wants to save the program to disk instead of executing it?
2. How to I change my DocumentRoot FROM: /var/www/apache2-default/ TO: /var/www?
3. The apache2 throws the following message when it starts:
* Starting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName [ OK ]
Can I fix what's this irritating message?
Could someone please shed some expertise on the 3 issues.
I'm assigning 300 points since I have 3 questions.
Thanks much!!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
1) PHP:
In addition to the AddType you need to verify that you have:
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#
LoadModule php5_module modules/libphp5.so
#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddHandler php5-script .php
AddType text/html .php
Normally under Linux these directives are included in a file called php.conf that is put in one of the directories that is included in the Apache setup.
2) Either setup a virtual host, as you seem to have done and code the directive DocumentRoot and point it to /var/www or if you don't want to do VirtualHosting find the DocumentRoot statement and change it.
3) Can't reliably reslove host name:
In one of your httpd conf files look for the directive "ServerName" and code the IP host name of the box you are running Apache on.
Business Accounts
Answer for Membership
by: IT79637Posted on 2008-01-09 at 17:55:05ID: 20624280
More info...
/000-defau lt contains:
File /etc/apache2/httpd.conf is empty.
File /etc/apache2/sites-enabled
Select allOpen in new window