can't serve php files in apache2
Running Debian testing, I installed libapache2-mod-php5, php5, php5-common, php5-cgi, php-pear and created a test file info.php which is 1 line ?php phpinfo(); ? However when I go to http://myserver.org/info.php it prompts me to download the PHP file instead of executing it and displaying the result. I've tried with firefox and IE and get the same result. Any idea how to get this working? Zach http://www.fidei.org -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlktinqeofzztc0x+cygqwk14vemyc2dd_wqqysc...@mail.gmail.com
Re: can't serve php files in apache2
AddType application/x-httpd-php .php 2010/11/12 Zachary Uram net...@gmail.com: Running Debian testing, I installed libapache2-mod-php5, php5, php5-common, php5-cgi, php-pear and created a test file info.php which is 1 line ?php phpinfo(); ? However when I go to http://myserver.org/info.php it prompts me to download the PHP file instead of executing it and displaying the result. I've tried with firefox and IE and get the same result. Any idea how to get this working? Zach http://www.fidei.org -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlktinqeofzztc0x+cygqwk14vemyc2dd_wqqysc...@mail.gmail.com -- esta es mi vida e me la vivo hasta que dios quiera -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlktinutemn8-aw-qrfrcea1l-pt2cnma88taskm...@mail.gmail.com
Re: can't serve php files in apache2
On Fri, Nov 12, 2010 at 7:13 AM, emmanuel segura emi2f...@gmail.com wrote: AddType application/x-httpd-php .php To which file do I add this? Zach -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlkti=mmouobr6ommwgh_sazpssnvir3ooexxvgd...@mail.gmail.com
Re: can't serve php files in apache2
if using apache2 look in -l /etc/apache2/mod-enable/*.conf 2010/11/12 Zachary Uram net...@gmail.com: On Fri, Nov 12, 2010 at 7:13 AM, emmanuel segura emi2f...@gmail.com wrote: AddType application/x-httpd-php .php To which file do I add this? Zach -- esta es mi vida e me la vivo hasta que dios quiera -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlkti=objjuadm1j55ib6jv9pfkrkfrqwm_x=l-7...@mail.gmail.com
Re: can't serve php files in apache2
On Fri, Nov 12, 2010 at 8:02 AM, emmanuel segura emi2f...@gmail.com wrote: if using apache2 look in -l /etc/apache2/mod-enable/*.conf Adding AddType application/x-httpd-php .php to /etc/apache2/mods-available/php5.conf and restarting apache2 worked! Thanks :) Zach -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlktik_y4gozho7doau6fmgweswf8ygpjkffp0wk...@mail.gmail.com
Re: can't serve php files in apache2
Zachary Uram wrote: Running Debian testing, I installed libapache2-mod-php5, php5, php5-common, php5-cgi, php-pear and created a test file info.php which is 1 line ?php phpinfo(); ? However when I go to http://myserver.org/info.php it prompts me to download the PHP file instead of executing it and displaying the result. I've tried with firefox and IE and get the same result. Any idea how to get this working? It reads as if the module is not enabled. The module is enabled by default after installation in the postinst script but in your case there seems to have been a problem with that step. Is your /etc/apache2/apache2.conf missing? Enable the module. $ sudo a2enmod php5 $ sudo /etc/init.d/apache2 restart The a2enmod and a2dismod utilities manage the symlinks in /etc/apache2/mods-enabled. Those symlinks point to the contents of the files in /etc/apache2/mods-available. It is similar to the a2ensite and a2dissite utilities. Bob signature.asc Description: Digital signature
Re: can't serve php files in apache2
Zachary Uram wrote: emmanuel segura wrote: if using apache2 look in -l /etc/apache2/mod-enable/*.conf Adding AddType application/x-httpd-php .php to /etc/apache2/mods-available/php5.conf and restarting apache2 worked! Thanks :) You shouldn't have needed to add it since the default is that it is already configured there. Perhaps the contents had become munged up somehow? In which case I recommend purging the package and reinstalling to get a known good copy of the file. Or possibly you don't have the mime-support package installed? That supplies /etc/mime.types which is included into apache by the mime module (which should also be enabled but might have been disabled). $ grep TypesConfig /etc/apache2/mods-enabled/mime.conf TypesConfig /etc/mime.types $ grep php /etc/mime.types application/x-httpd-php phtml pht php application/x-httpd-php-source phps application/x-httpd-php3php3 application/x-httpd-php3-preprocessed php3p application/x-httpd-php4php4 application/x-httpd-php5php5 Bob The /etc/apache2/mods-available/php5.conf file from 5.3.3-2. IfModule mod_php5.c FilesMatch \.ph(p3?|tml)$ SetHandler application/x-httpd-php /FilesMatch FilesMatch \.phps$ SetHandler application/x-httpd-php-source /FilesMatch # To re-enable php in user directories comment the following lines # (from IfModule ... to /IfModule.) Do NOT set it to On as it # prevents .htaccess files from disabling it. IfModule mod_userdir.c Directory /home/*/public_html php_admin_value engine Off /Directory /IfModule /IfModule signature.asc Description: Digital signature