[Nottingham] PHP

Robert Ross rross at dmu.ac.uk
Thu Feb 3 09:39:44 GMT 2005


Hi Godfrey, 

> -----Original Message-----
> From: Godfrey Nix [mailto:godfrey at gnnix.co.uk] 
> Sent: 03 February 2005 08:39
> To: nottingham at mailman.lug.org.uk
> Subject: Re: [Nottingham] PHP

> On apache2 you do not need the mime.type file (well my server 
> is working without it!) Apache2 has a conf.d directory with 
> php.conf in it. This file has just two crucial lines to get 
> php working -
> 
> LoadModule php4_module /path/to/libphp4.so
> AddType application/x-httpd-php  .php
> 
> Note that the AddType line is in place of a line in 
> mime.types, and the LoadModule will provide apache with a 
> method of handling x-httpd-php
 
Yep, got this far, but still get the error...:-(  Also put the lines
directly into the virtual host block and it fell over.

> I have just created a virtual block for myself and it all 
> works OK. I would suggest a few tests - create a plain test 
> file in the same directory and try to browse it; create a 
> simple shell script or perl script and try to fetch those. Do 
> you have any other php-related lines in either your main 
> httpd.conf or within the VirtualHost block? Do you have any 
> .htaccess file ?

The funny thing is, it runs fine when using PHP with the main site.  It
seems to be a problem with virtual servers.  I believe that virtual servers
have to run mod_php 'on the fly' in order to work.  As I spent until 1am
last night trying to sort this out, I think I will have a go at
re-installing php via the command line rather than YaST (I run SLES9) and
see what messages I get.

Thanks for the input and I'll get back to you on the outcome of my labours.

Cheers,

Robb



More information about the Nottingham mailing list