[Gllug] Urgent Silly question

John Edwards john_ed at cornerstonelinux.co.uk
Mon Dec 10 19:43:03 UTC 2001


On Mon, Dec 10, 2001 at 01:49:20PM -0000, Allen Wayne wrote:
> Hi All,
> 
> I'm running out of hair from all this hair pulling, but I have a problem
> with Apache and PHP scripts. I can run a php script from the mail htdocs
> root directory, but can't from either users public_html or any sub
> directories under htdocs.... In fact it actually downloads the scripts
> themselves. ouch
> 
> I have some idea it is due to directives????
> 
> Any ideas?? 
> 
> Wayne
> (Its Wayne Allen not Allen Wayne)

Well sounds like the MIME type for .php files is only set for certain 
directories. This could have been done by a restrictive web administrator 
for security purposes.


In the httpd.conf there should be a couple of lines that set the 
types for PHP:
------------------------------------------------------------------------
  AddType application/x-httpd-php .php4 .php3 .phtml .php
  AddType application/x-httpd-php-source .phps
------------------------------------------------------------------------
(this might be wrapped in an <IfModule> directive)

Make sure that this is in the main section and not wrapped in 
a <Location>, <Directory> or <VirtualHost> section. 

Also check any .ht* files in the htdocs directory, as they may 
have additional directives in them.

-- 
#------------------------------------------------------------#
|      John Edwards    Email: John.Edwards at uk.com            |
|                                                            |
|     "Security vulnerabilities are here to stay."           |
|   Scott Culp, Manager, Microsoft Security Response Center  |
#------------------------------------------------------------#

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list