RE: [PHP-WIN] Re: Apache config syntax error
| From: | Robert Taylor | Date: | Wed, 21 May 2003 10:13:43 +0000 |
| Subject: | RE: [PHP-WIN] Re: Apache config syntax error | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-20022@lists.php.net to get a copy of this message | ||
I confess, I am not an Apache or PHP expert. And I'm sure that there must
be others out there as well.
I read the install.txt thoroughly and it indeed gave examples where
the LoadModule directive was placed before the AddModule directive
LoadModule php4_module c:/php/sapi/php4apache.dll
AddModule mod_php4.c
AddType application/x-httpd-php .php
...but the httpd.conf file has the following:
#
# Apache Modules compiled into the standard Windows build
#
# The following modules are bound into the standard Apache binary
distribution
# for Windows. To change the standard behavior, uncomment the following
lines
# and modify the list of those specific modules to be enabled in the server.
#
# WARNING: This is an advanced option that may render your server
inoperable!
# Do not use these directives without expert guidance.
#
#ClearModuleList
#AddModule mod_so.c mod_mime.c mod_access.c mod_auth.c mod_negotiation.c
#AddModule mod_include.c mod_autoindex.c mod_dir.c mod_cgi.c mod_userdir.c
#AddModule mod_alias.c mod_env.c mod_log_config.c mod_asis.c mod_imap.c
#AddModule mod_actions.c mod_setenvif.c mod_isapi.c
#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO
you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Please read the file README.DSO in the Apache 1.3 distribution for more
# details about the DSO mechanism and run `apache -l' for the list of
already
# built-in (statically linked and thus always available) modules in your
Apache
# binary.
#
# Note: The order in which modules are loaded is important. Don't change
# the order below without expert advice.
#
#LoadModule anon_auth_module modules/mod_auth_anon.so
#LoadModule dbm_auth_module modules/mod_auth_dbm.so
#LoadModule digest_auth_module modules/mod_auth_digest.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
#LoadModule digest_module modules/mod_digest.so
#LoadModule expires_module modules/mod_expires.so
#LoadModule headers_module modules/mod_headers.so
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule rewrite_module modules/mod_rewrite.so
#LoadModule speling_module modules/mod_speling.so
#LoadModule info_module modules/mod_info.so
#LoadModule status_module modules/mod_status.so
#LoadModule usertrack_module modules/mod_usertrack.so
Note exspecially the line:
# To be able to use the functionality of a module which was built as a DSO
you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
To me this implies that, in the httpd.conf file, syntactically; LoadModule
MUST be placed after AddModule.
Oh, and I believe AddType application/x-httpd-php .php must be placed within
<IfModule mod_mime.c>
</IfModule>
Granted, I didn't just copy the following lines and modify the path:
LoadModule php4_module c:/php/sapi/php4apache.dll
AddModule mod_php4.c
AddType application/x-httpd-php .php
I actually inferred where these commands were supposed to go from looking
at the httpd.conf file.
My point was that for others that might do the same, it would be nice to
have a line in the install.txt file that mentioned the significance of the
order of LoadModule php4_module c:/php/sapi/php4apache.dll and
AddModule mod_php4.c and that it is opposite of examples you might see
in the httpd.conf file.
If my expectations are too high, then I apologize, but again, I'm a newbie
to PHP (as was stated in the subject line of the email) and others might
be as ignorant as I am, and therefore I posted the solution in the hopes
that it might help other idiots like myself.
robert
> -----Original Message-----
> From: Neil Smith [mailto:neil@fresh-toast.uklinux.net]
> Sent: Wednesday, May 21, 2003 4:32 AM
> To: php-windows@lists.php.net
> Subject: [PHP-WIN] Re: Apache config syntax error
>
>
> At 06:08 21/05/2003 +0000, you wrote:
> >which was causing Apache to complain and issue the following error
> >messages. Syntax error on line 175 of
> >e:/web_server/apache/apache/conf/httpd.conf:
> >
> >and
> >
> >Cannot add module via name 'mod_php4.c': not in list of
> >loaded modules
> >
> >I simply switched the order And Apache cranked right up and successfully
> >rendered my first
> >php script.This should definitely be in an FAQ some where or in the
> >windows section of install.txt.
>
> What, there should be a FAQ for # please read the manual and make
> sure your
> syntax is correct in httpd.conf or it won't work, and it will
> tell you why
> as well # , something like that ?
>
> Sheesh !
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>