[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: [LI] PHP Configuration



>I am trying to get PHP running on my machine but am unable to do so.
>I got a few sample PHP scripts from the net and tried to run them, but they
dont work, instead when ever accessed they print out the whole content of
the file.
>
>Please help vis-a-vis the configuration changes which might me needed.
>
u have to load mod-php as a module with apache, tell apache that .php3 are
type application, read the apache documentation

relevant portions of httpd.conf
##
## httpd.conf -- Apache HTTP server configuration file
##

<snip>
LoadModule config_log_module  modules/mod_log_config.so
LoadModule agent_log_module   modules/mod_log_agent.so

<snip> a lot of modules

# Extra Modules
#LoadModule php_module         modules/mod_php.so
LoadModule php3_module        modules/libphp3.so
LoadModule perl_module        modules/libperl.so

<snip>
# Extra Modules
#AddModule mod_php.c
AddModule mod_php3.c
AddModule mod_perl.c

##
## srm.conf -- Apache HTTP server configuration file
##

# With this document, you define the name space that users see of your http
# server.  This file also defines server settings which affect how requests
are
# serviced, and how results should be formatted.

<SNIP>

# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index.  Separate multiple entries with spaces.

DirectoryIndex index.html index.shtml index.cgi index.php3

<SNIP>
# For example, the PHP3 module (not part of the Apache distribution)
# will typically use:
AddType application/x-httpd-php3 .php3 .inc .php .xml
AddType application/x-httpd-php3-source .phps
# The following is for PHP/FI (PHP2):
#AddType application/x-httpd-php .phtml

<SNIP>
# To use server-parsed HTML files
AddType text/html .shtml
AddHandler server-parsed .shtml


###   hope this helps
----------------------------------------------------------------------------
----------
Jiju Thomas Mathew
see my jpeg post cards based on linux : http://digitel.webjump.com/cards.htm
Linux registered user #154193


--------------------------------------------------------------------
The Linux India Mailing List Archives are now available.  Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.