httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Benson <apa...@bensonresearch.com>
Subject Re: [users@httpd] using php in header file
Date Mon, 26 Apr 2004 19:27:30 GMT

> I am sure there is somewhere to tell apache or php which file extensions to
> use as php files but I can't remember where it is.
>
> perhaps someone else out there could tell us?

Hi, I'm not sure what you are trying to do with the template/header stuff but 
I can answer the part about PHP...  There are a few things to check

1. that you are loading the module to enable PHP in Apache...

	LoadModule php4_module libexec/libphp4.so
	AddModule mod_php4.c

2. Apache knows which files to treat as PHP files...

	# Tell Apache to feed all *.php files through the PHP module
	AddType application/x-httpd-php .php

3. If you want to treat index.php as a default (IMO, good idea)

	# If you want to allow index.php to be default...
	DirectoryIndex index.php index.html


I hope that helps...  Maybe someone else can chime in about the template/head 
file issue...  :-)


Regards,
David Benson


On Monday 26 April 2004 12:03 pm, tony wright wrote:
> On Monday 26 April 2004 19:27, Billy Bacon wrote:
> > I'm not sure if I can do what you are suggesting.... I tried putting some
> > php code in an .htm file and the php code never got executed so I stop
> > attempting that route... I think it has to do something with the Perl/CGI
> > scripts and how the 'template' code is sent to the browser and it's not
> > executed on the server, therefore the php code never gets executed :-/
>
> I am sure there is somewhere to tell apache or php which file extensions to
> use as php files but I can't remember where it is.
>
> perhaps someone else out there could tell us?
>
> tony
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message