Cant get php to work
I have apache 2.2 on a debian server. I have installed php5 as module and have:
libphp5.so in usr/lib/apache2/modules php5.conf (in mods-enabled): <IfModule mod_php5.c> AddType application/x-httpd-php .php .phtml .php3 AddType application/x-httpd-php-source .phps </IfModule> php5.load (-//-): LoadModule php5_module /usr/lib/apache2/modules/libphp5.so In httpd.conf I have: AddHandler php5-script php AddType text/html php The module is loaded and I have restarted the server, but php files dont work in the browser, they are just downloaded. Any ideas? |
Did you upgrade to apache 2.2 from apache 1? And did you upgrade php 4 to php 5, or were they already installed. I found with slackware if you upgrade apache 1 to apache 2 and with it php 4 to php 5 instead of uninstalling the previous versions and then installing the new ones you get problems. Or at least I did.
DragonM15 P.S. I had problems with apache 2.2 anyways. I kicked it down to 2.0 and it works great. Just a thought |
The apache is a new install but I started out with php4. At one point I accidentally deleted the httpd.conf and I tried to reconstruct it, so I have a notion it has something to do with that:confused:
O. Current httpd.conf: # Use for PHP 5.x: #LoadModule php5_module modules/libphp5.so AddHandler php5-script php # Add index.php to your DirectoryIndex line: DirectoryIndex index.html index.php AddType text/html php # PHP Syntax Coloring # (optional but useful for reading PHP source for debugging): AddType application/x-httpd-php-source phps |
Solved
Well, my setup seems to work after all.
I cleared the cache in my browser and the php files are executed just fine!:rolleyes: |
Quote:
DragonM15 |
All times are GMT -5. The time now is 01:05 AM. |