OS X Apache *.php execute when domain is localhost but downloads file otherwise. -


the setup:

on mac os x 10.5.8, original apache 2.2, change uncomment

loadmodule php5_module 

in _documentroot_ dir, /library/webserver/documents/, in file named info.php, write:

<? php phpinfo(); ?> 

the problem:

request http://localhost/info.php , response output function (i.e. php executed file).

however, request domain 127.0.0.1 or 192.168.1.x , response content of file, w/ header of content-type application/x-httpd-php.

the file found via request, it's not hosts mapping problem. however, it's treated executable when request domain localhost. there no virtual hosts set in apache conf, figure behaviour should same regardless of domain.

any idea how remedy use server on lan?

thanks.

not sure if problem, have allow/deny settings on mod_php module's configuration? i'm not sure if allows or not.

the reason ask because today wound tracking down issue preconfigured apache instance mod_proxy set allow on requests localhost. switching allow requests 10.* fixed problem of machine on network correctly proxying.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -