[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: PHP4 & Apache



On Wed, Oct 11, 2000 at 02:56:49PM +0000, Steve Simons wrote:
> 
> 
> On Wed, 11 Oct 2000, Liam Ward wrote:
> 
> > I'm currently using PHP3 and my config files have similar stuff to 
> > yours (but without the PHP4 bits, obviously enough).
> > 
> > You're looking in the wrong place here. Netscape does not need to 
> > know anything special to process PHP. It's Apache that spots that the 
> > file is in fact a PHP script and processes it. Netscape just gets 
> > plain old HTML.
> > 
> > I call my scripts scriptname.php3 (I've always done that and it's 
> > always worked). I just tried renaming a script to .php and it didn't 
> > work. So, my guess is that you should name your script .php4.
> > 
> 
> Nope - that doesn't work either, it doesn't want to download it, but
> nothing is displayed.
> 
> Where are your .php3 files kept, somewhere special?
> 
> I'm running out of ideas now.  I'm obviously missing something because
> noone else seems to have had this problem.  If it hasn't been resolved by
> tonight, then I'm ripping out PHP4 and Apache and building them from
> source.  I know what'll happen then - the Apache start will fail with
> syntax errors just like it did when I was using RH6.1!
> 
> Oh well, either it works for you or it doesn't.  Thanks anyway. :-(

to cut down on confusion of what's in which apache config file,
i use this:

	# don't need these -- it's all in this one httpd.conf file
	ResourceConfig /dev/null
	AccessConfig /dev/null

this way everything is in one /etc/apache/httpd.conf file ...

--

are you telling apache to load the php module?

	LoadModule php3_module /usr/lib/apache/1.3/libphp3.so

if you've got /server-info enabled (which you might wanna rename
if you're paranoid about hackers determining what kind of system
you're running) via

	# Allow server info reports, with the URL of http://servername/server-info
	# Change the ".your_domain.com" to match your domain to enable.

	<Location /server-info>
		SetHandler server-info
		order deny,allow
		deny from all
		allow from .your_domain.com
	</Location>

(by default in access.conf, but you can put it anywhere)

then just browse to
	http://localhost/server-info
to see if the php modules are enabled. if not, there's definitely
an obstacle.

--

	$ grep 'php' /etc/apache/httpd.conf
	LoadModule php3_module /usr/lib/apache/1.3/libphp3.so
	AddType application/x-httpd-php3 .phtml
	AddType application/x-httpd-php3-source .phps

if you wanna display your source instead of running it, you can do this:
	AddType text/plain .cgi .ncgi .nph-cgi .pl .perl .nperl .npl .pm .php .php3 .php4 .sh .c .h .man .info .tex

HTH.

-- 
things are more like they used to be than they are now.

will@serensoft.com *** http://www.dontUthink.com/



Reply to: