RE: php files displayed as 'text'

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

 



You should not need the AddModule. I suspect your PHP files were appearing
as text as you have not associated the .php extension with the PHP
interpreter.

The following should be enough to get you going (taken from CentOS):
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#

LoadModule php4_module modules/libphp4.so

#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddType application/x-httpd-php .php
# AddType application/x-httpd-php-source .phps

#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php

----file ends-------

Note the path on LoadModule, you probably want to change it to
libexec/httpd/libphp4.so. Double check where your module is stored on your
particular setup.

Dave Hartburn




> At 02:37 PM 3/15/2007, Mark Lavi wrote:
>>You should insure that PHP module available and loaded.
>>
>>If you compiled it in as a static module, you can look at the httpd -l
>>option to see if it is there.
>>Otherwise, you can enable mod_status to check your configuration in real
>>time.
>
> Ok, I think I found part of the problem. Following directions at
> http://www.php.net/manual/en/install.macosx.php
>
> In the section with all the other LoadModules:
>    LoadModule php4_module       libexec/httpd/libphp4.so</div>
>
> Directly below that section should be the AddModules; you need:
>    AddModule mod_php4.c
>
>
> The LoadModule is fine, but when I uncomment AddModule, I get
>
> Syntax error on line 159 of /Library/Apache2/conf/httpd.conf:
> Invalid command 'AddModule', perhaps misspelled or defined by a
> module not included in the server configuration
>
> Is this no longer correct?
>
> Now it no longer shows a php as text, but just 'hangs' when I load a php
> page.
>
>
> ---------------------------------------------------------------------
> 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@xxxxxxxxxxxxxxxx
>    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>
>


-- 


---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux