LinuxQuestions.org
Review your favorite Linux distribution.
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 09-22-2005, 12:43 AM   #1
saf4
Member
 
Registered: Sep 2005
Location: Netherlands
Distribution: kubuntu
Posts: 33

Rep: Reputation: 15
Installing PHP4


I was was trying to use apache in combination with mysql and php, it's just that only apache works, and the php pages are seen as files. I have been searching for a while and also had some help of a friend, but we have not able to solve it yet. I put the full content of httpd.conf, php4.conf and php4.load. Has anyone ever had these troubles before, or knows how to solve them?

>/etc/apache2/httpd.conf<
# This is here for backwards compatability reasons and to support
# installing 3rd party modules directly via apxs2, rather than
# through the /etc/apache2/mods-{available,enabled} mechanism.
#
#LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so
AddType application/x-httpd-php .php


>/etc/apahce2/mods-enabled/php4.conf<
<IfModule mod_php4.c>
AddType application/x-httpd-php .php .phtml .php3
AddType application/x-httpd-php-source .phps
</IfModule>

>/etc/apache2/mods-enabled/php4.load<
LoadModule php4_module /usr/lib/apache2/modules/libphp4.so
 
Old 09-22-2005, 07:44 AM   #2
mrog
Member
 
Registered: Jul 2003
Location: Ontario, Canada
Distribution: Debian, Ubuntu
Posts: 39

Rep: Reputation: 15
By "the php pages are seen as files" do you mean icons of the php files or the code is displayed?

At any rate, I can think of two possible things here.

1. The apache2.conf (or httpd.conf depending on the distro) has a line starting with "DirectoryIndex". Does this line include index.php?
(i.e. DirectoryIndex index.html index.php index.xhtml)

2. The php.ini file (perhaps /etc/php4/apache2/php.ini) should contain the following:
;;;;;;;;;;;;;;;;;;;;
; Language Options ;
;;;;;;;;;;;;;;;;;;;;

; Enable the PHP scripting language engine under Apache.
engine = On

Last edited by mrog; 09-22-2005 at 07:45 AM.
 
  


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
installing PHP4 viperkt400 Linux - Software 1 02-13-2005 12:45 PM
Installing GDlib2 on php4 not working smoerre Linux - Newbie 0 04-28-2004 03:20 PM
installing PHP4 and PHP5 on apache jerry_redhat Linux - Software 2 07-08-2003 10:27 PM
Installing php4 mindstormsguy Linux - Software 0 05-29-2003 05:59 PM
Trouble installing PHP4 on RHL Thinkgeekness Programming 5 03-19-2003 01:17 PM


All times are GMT -5. The time now is 03:28 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration