LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 03-02-2005, 01:05 PM   #1
c00l
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/libphp4.so

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?



Thanks
 
Old 03-02-2005, 01:23 PM   #2
houdelou
Member
 
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
c00l
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
berrance
Member
 
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
c00l
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/libphp4.so

and if it still doesnt work just restart the computer


Thanks for your help guys
 
  


Reply


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:59 PM.

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