DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I can access my webserver when I type http://localhost. I can see the default HTML page that is placed in the root directory of webserver. Unfortunately I am not able to run any PHP files. When I try to type the URL in my browser like this: http://localhost/apache2-default/info.php
The file just downloads (I get the firefox download box) instead of actually running on the websever.
Did you update your .conf file as the following recommends?
Code:
If you want to allow the different index files types check for the following line in /etc/apache2/apache2.conf file:
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.shtml
Also, in your .conf files after all of the installs are there lines like these (I'm using PHP 5)?
Did you update your .conf file as the following recommends?
Code:
If you want to allow the different index files types check for the following line in /etc/apache2/apache2.conf file:
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.shtml
Ok, I added the above line in my apache2.conf file
Quote:
Originally Posted by gilead
Also, in your .conf files after all of the installs are there lines like these (I'm using PHP 5)?
I just re-read the linked info in your original post. It seems like the directives should already be there. You could confirm it by using grep recursively on the directory containing apache2.conf and its sub-directories. The page also talks about a2enmod which enables module functionality.
If it's there, based on the info here you may be able to run a2enmod php5 to enable it. If it's not there, I'd search for files near apache2.conf containing LoadModule or AddType and add it there.
Note, what I know about Debian would fit in a mouse's ear without touching the sides. I'm used to the manual approach because that's what I do in other distros...
Note, what I know about Debian would fit in a mouse's ear without touching the sides. I'm used to the manual approach because that's what I do in other distros...
What do you mean by manual approach? Is there any other way to install it?
You should be able to use Debian's package manager to install the packages. The listing of Debian Stable's packages shows packages for Apache 2 (2.2.3-4+etch4) and PHP 5.
I know this is an old post. However, I have the same problem. I can not use any of the php files. I could not find anything called 'DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.shtml' in the /etc/apache2/apache2.conf file. And, the httpd.conf file appears to be empty.
I do have all of the packages and modules I could find listed for using PHP5 in Debian with the Apache 2.2 Server installed. The only response I can get is "The requested URL http://localhost/home/ande/ was not found on this server.'
The only clear instructions I have found so far are only dealing with installing onto a server on the internet. Everything for using the localhost are one or two word phrases and no help.
I would surely appreciate some actual information on the configuration required for using PHP5 on the LocalHost. Especially since it was installed using the Package Manager with no errors and everything indicates PHP5 is installed and available.
Thanks
Quote:
Originally Posted by gilead
Did you update your .conf file as the following recommends?
Code:
If you want to allow the different index files types check for the following line in /etc/apache2/apache2.conf file:
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.shtml
Also, in your .conf files after all of the installs are there lines like these (I'm using PHP 5)?
2.- where exactly are you putting the .php file in the filesystem? i think you are putting the file in the wrong directory, apache's document root directory is in /var/www not /home/ande.
Check that and tell me if that work
Last edited by pliqui; 10-01-2009 at 04:41 PM.
Reason: typo
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.