🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.linux.networking
Article #850

Re: Installing PHP4 on Apache

#850
From: Rithban
Date: Mon, 30 Oct 2000 15:04
34 lines
2552 bytes
> I have downloaded the php4.0.3pl1 rpm package from www.php.net and have
> already installed it. However I still can't run php files. When I type
> the url of the php file in netscape, the text editor will open the file
> instead. I am using KDE. Do I have to configure anything to get it work?

Off the top of my head:

Yes. /etc/httpd/conf includes several configuration files. httpd.conf
needs 

LoadModule php4_module modules/libphp4.so

You'll probably want to change DirectoryIndex to something like 

DirectoryIndex index.html index.htm index.shtml index.php index.php4
index.php3 index.cgi

And you'll need

AddType application/x-httpd-php .php4 .php3 .phtml .php

to tell Apache which extensions should trigger PHP.

There may be other things that need to be tweaked.

You didn't mention which distro you're using. In upgrading my RH system
to version 7, it includes Apache, PHP4, and MySQL all together.
Everything was automatically set up, it appears. (I've only run
phpinfo(); through it so far. Further testing will happen later this
week.) This is a nice change since settng up Apache+PHP+MySQL in the
past was a little bothersome.

HTH
James
Technical Details
Message-ID: <39FD8E0D.FF669DF5@yahoo.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!logbridge.uoregon.edu!xmission!nnrp.xmission!not-for-mail
References: <39FC4086.D0CED12E@pacific.net.sg>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f798d,77b29aa626e7cbbf
X-Google-Attributes: gidf798d,public
X-Google-Thread: f9825,77b29aa626e7cbbf
X-Google-Attributes: gidf9825,public
X-Google-Thread: 10669a,77b29aa626e7cbbf
X-Google-Attributes: gid10669a,public
X-Google-Thread: f9b51,77b29aa626e7cbbf
X-Google-Attributes: gidf9b51,public
X-Google-Thread: 11024c,77b29aa626e7cbbf
X-Google-Attributes: gid11024c,public
X-Google-ArrivalTime: 2000-10-30 07:06:02 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!logbridge.uoregon.edu!xmission!nnrp.xmission!not-for-mail
From: Rithban <rithban@yahoo.com>
Newsgroups: comp.os.linux.networking,comp.os.linux.setup,hk.comp.os.linux,it.comp.linux,linux.help
Subject: Re: Installing PHP4 on Apache
Date: Mon, 30 Oct 2000 08:04:45 -0700
Organization: XMission http://www.xmission.com/
Lines: 34
Message-ID: <39FD8E0D.FF669DF5@yahoo.com>
References: <39FC4086.D0CED12E@pacific.net.sg>
NNTP-Posting-Host: kaa.dsl.xmission.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: news.xmission.com 972918284 24005 166.70.14.172 (30 Oct 2000 15:04:44 GMT)
X-Complaints-To: abuse@xmission.com
NNTP-Posting-Date: 30 Oct 2000 15:04:44 GMT
X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.16-22 i686)
X-Accept-Language: en