Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 03-02-2005, 01:05 PM   #1
LQ Newbie
Registered: Feb 2005
Posts: 6

Rep: Reputation: 0
Php support with apache

Hi, I installed Debian 3 woody today and can't seem to php to work.

After Debian was installed I typed...
apt-get install php4
apt-get install mysql-server
apt-get install php4-mysql

Once those were installed I added the line below to httpd.conf
LoadModule php4_module /usr/lib/apache/1.3/

and then I restarted apache which gave no warnings or allerts, but php still does not work. I can run scripts by typing php4 -q /var/www/index.php but the scripts are not run by typing in the url.

What am I doing wrong or have not done properly?

Old 03-02-2005, 01:23 PM   #2
Registered: Nov 2004
Location: Canada
Distribution: Ubuntu
Posts: 44

Rep: Reputation: 15
Do your scripts are in the cgi-bin directory?
Old 03-02-2005, 01:37 PM   #3
LQ Newbie
Registered: Feb 2005
Posts: 6

Original Poster
Rep: Reputation: 0
no, but I dont think that would matter as I am trying to load php as a module not from cgi.
Also I added these lines to httpd.conf but again it does not seem to make a difference

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Old 03-02-2005, 01:40 PM   #4
Registered: Aug 2004
Location: Hull - England
Distribution: Ubunto and slowly switching to debian
Posts: 308

Rep: Reputation: 30
dont you have to tell apache to treat the extention as a php script?

try adding this to your httpd.conf

AddType application/x-httpd-php .php

also try adding this

AddModule mod_php4.c

then restart apache and it should work i think
Old 03-02-2005, 04:30 PM   #5
LQ Newbie
Registered: Feb 2005
Posts: 6

Original Poster
Rep: Reputation: 0
ok, after a restart it seems to work

anyways for anyone else having the same problem inseart the below in your php.ini

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
LoadModule php4_module /usr/lib/apache/1.3/

and if it still doesnt work just restart the computer

Thanks for your help guys


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache + PHP (with GD+MySQL support)... non-compiled? matrixcubed Linux - Software 2 11-09-2005 01:19 PM
configuring apache to load with php support jomy Linux - Networking 1 03-06-2005 08:38 AM
Apache 2 Configuration in Webmin -- and PHP support vharishankar Linux - General 4 02-10-2005 04:06 AM
reinstalled apache, php, still no php support SuSE 8.2 hindenbergbaby Linux - Software 1 10-14-2003 01:42 PM
PHP, Apache reconfigure to support Databases aaronsols Programming 0 04-20-2002 02:36 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:49 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration