Installing PHP4 on Apache

Installing PHP4 on Apache

Post by μL|W¤p¤ » Tue, 31 Oct 2000 00:21:42



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?
 
 
 

Installing PHP4 on Apache

Post by Glitc » Tue, 31 Oct 2000 06:33:20


you need to configure the MIME type in httpd.conf. The web server
doesn't know what to do with the new MIME type and therefore just prints
it to the screen,through the browser.

I dont know what the MIME type would be but it should be just like PHP3
except with a 4 instead of a 3.....as an experiment rename a php4 file
from .php4 to .php3 and see if it loads properly that way. If it does
you know apache isn't recognizing .php4 as a php file.


> 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?


 
 
 

Installing PHP4 on Apache

Post by Rithba » Wed, 01 Nov 2000 00:04:45


Quote:> 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

 
 
 

1. Problem with Apache + PHP4 DSO : symbol __muldi3: referenced symbol not found

Hi,

I successfully installed apche+php on Linux, but I can do the same

thing on a Solaris 2.6. In fact it works on Solaris in static mode, but
not

in DSO apache mode (and I really need it).

Each time I try to launch my Apache, I obtain the following error :

"Cannot load /usr/apachephp/libexec/libphp4.so into server: ld.so.1:

/usr/apachephp/bin/httpd: fatal: relocation error: file
/usr/apachephp/libexec/libphp4.so: symbol __muldi3: referenced symbol
not found"

I read lots of articles about this error in newsgroup, etc. but with no
solution.

I builded my Apache with the following comand line :

"./configure --prefix= /usr/apachephp --enable-module=so
--enable-rule=SHARED_CORE; make; make install"

I builded my Php module with the following command line :

"./configure --with-apxs=/usr/apachephp/bin/apxs; make; make install"

I don't know if there is a link with the DB Berkeley library, but they
give

a solution to solve this kind of problem :

http://www.sleepycat.com/docs/ref/build_unix/notes.html

So I rebuilded my DB Berkeley library, I rebuilded apache,

and I rebuilded php with the option --with-db3, but without success.

Anybody had this problem (and most important, solved it :-) )

Regards.

Sebastien Brault.

2. Is Cirrus CLM a winModem?

3. Using Apache + PHP4 on AIX 4.2/4.3

4. sshd, httpd and identd called from xinetd

5. Apache 1.3.19 & PHP4: module doesnt seem to start

6. Sendmail hangs on boot

7. PHP4 on Apache trouble

8. Problem compiling kernel 2.2.17

9. PHP4 and Apache

10. Problem to compile Apache with mod_perl and PHP4 on AIX 5L

11. Setting up virtual hosting for apache + FP + SSL + DAV + PHP4

12. Apache 1.3.19 and PHP4 errors

13. Apache / PHP4 not serving .php files