Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: php and apache?

From: Zach <netrek(at)gmail.com>
Date: Tue Feb 19 2008 - 19:58:32 EST


2008/2/19, Sergio <herrsergio@gmail.com>:
>
>Hello,
>
>do you have a line like this in your config files:
>
>AddType application/x-httpd-php .php .phtml .php3
>
>I think it is in the file: /etc/apache2/mods-enabled/php5.conf
>
>That should do the trick.

Hello Sergio,

Yes everything seems fine yet it still doesn't work - very perplexing. Here is what I know so far:

When I try to load one locally such as /var/www/phpsysinfo/index.php it opens a dialog box asking me whether I'd like to download it or open with an editor, it never renders the PHP script. I also tried remotely by loading http://www.club.cc.cmu.edu/~chaos/foo.php in my browser and it just prints out the file contents.

I verified that apache2 has the php module loaded:

netrek:~# a2enmod php5
This module is already enabled!

I also confirmed that in /etc/apache2/mods-available/dir.conf DirectoryIndex has an entry for index.php: <IfModule mod_dir.c>

         DirectoryIndex index.html index.cgi index.pl index.php index.xhtml ind ex.htm

Do you need help?X

</IfModule>

And I also confirmed that in /etc/apache2/mods-available/php5.conf it has as apropriate AddType entry:
<IfModule mod_php5.c>
 AddType application/x-httpd-php .php .phtml .php3  AddType application/x-httpd-php-source .phps </IfModule

Also I confirmed /etc/apache2/mods-enabled/php5.conf has: <IfModule mod_php5.c>
  AddType application/x-httpd-php .php .phtml .php3   AddType application/x-httpd-php-source .phps </IfModule>

And /etc/apache2/mods-enabled/dir.conf has: <IfModule mod_dir.c>

          DirectoryIndex index.html index.cgi index.pl index.php index.xhtml ind ex.htm

</IfModule>

Here are the packages I have installed:

ii  libapache2-mod-php5                                     5.2.4-2+b1
                  server-side, HTML-embedded scripting languag
ii  php5                                                    5.2.4-2
                  server-side, HTML-embedded scripting languag
ii  php5-cgi                                                5.2.4-2+b1
                  server-side, HTML-embedded scripting languag
ii  php5-cli                                                5.2.4-2+b1
                  command-line interpreter for the php5 script
ii  php5-common                                             5.2.4-2+b1
                  Common files for packages built from the php
ii  apache2                                                 2.2.6-3
                  Next generation, scalable, extendable web se
ii  apache2-common                                          2.0.55-4
                  next generation, scalable, extendable web se
ii  apache2-mpm-prefork                                     2.2.6-3
                  Traditional model for Apache HTTPD
ii  apache2-utils                                           2.2.6-3
                  utility programs for webservers
ii  apache2.2-common                                        2.2.6-3
                  Next generation, scalable, extendable web se
ii  iceweasel                                               2.0.0.11-1
                   lightweight web browser based on Mozilla

Must I change /etc/apache2/apache2.conf somehow to get this working?

Do you need more help?X

Running Debian lenny. So apache is passing the php files as if they were just normal text files or something. They are never passed off to the php module and executed for some reason. Any help would be greatly appreciated. As far as I can tell it *should* work but doesn't obviously.

Regards,
Zach

-- 
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Received on Tue Feb 19 20:15:27 2008

This archive was generated by hypermail 2.1.8 : Mon Mar 17 2008 - 19:41:16 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library