Hi all,

I have installed Redhat 7.1 with Apache 1.3.20 and php 4.0.6. My apache server couldn't recognise my php pages.

Then i tried to place the following statement into httpd.conf,
"LoadModule php4Module /usr/lib/apache/libphp4.so"

The following error appears when i tried to restart my apache server,
"Syntax error on Line 207 of /usr/local/apache/conf/httpd.conf:
Invalid command 'LoadModule', perhaps mis-spelled or defined by a module not
included in the server configuration
/apachectl start: httpd could not be started"

Should i uninstall apache and install again?
helpp... please advise 🙂

    assuming the libphp4.so is indeed located in:
    /usr/lib/apache/libphp4.so
    then try:
    LoadModule php4_module modules/libphp4.so
    and:
    AddModule mod_php4.c

    and last:
    <IfModule mod_php4.c>
    AddType application/x-httpd-php .php
    </IfModule>

      Hi brandon,

      I have already tried your solution,
      it can't work, its still giving me the same error as before.

      The Error message message was "Invalid command 'LoadModule'".

      I reckon there are some settings that i didn't configure properly during the apache installation, thus the function LoadModule couldnt be executed.

      cracking my brains

      By any chance do u know how to un-install aparch webserver?

      Thanks very much for your help.

        run:

        "/usr/sbin/httpd -l"

        if you see mod_so.c as a compiled-in module then dso modules are enabled in apache. otherwise you'll need to compile apache with dso support and just reinstall apache over the current install.

          i have ran that and here are the results:

          Compiled-in modules:
          http_core.c
          mod_so.c

          suexec: enabled; valid wrapper /user/sbin/suexec

          I have it but the LoadModule function can't work. argh

            try to recompile apache making sure to "make clean" first and configure with the "--enable-module=so" option.

            if that fails check the search engines for other fixes. i found a couple of other possible fixes on yahoo.

              Hi,

              Thanks for your help.
              LoadModule works, but i have another error now.

              i didnt place in the 2 statements:
              "LoadModule module_php4 modules/libphp4.so
              AddModule mod_php4.c"
              as my libphp4.so doesnt reside in modules directory. What are the reasons for placing the 2 statements in?

              I placed in the following statement instead.
              "LoadModule module_php4 /usr/lib/apache/libphp4.so"

              but i got another error which is as follow:


              Syntax error on line 207 of /usr/local/apache/conf/httpd.conf:
              API module structure 'php4_module' in file /usr/lib/apache/libphp4.so is
              garbled

              - perhaps this is not an Apache module DSO?

              Please advise, thanks very much

                a year later

                Hi,

                did you ever get this working? I'm getting the same error.

                thanx,
                -mike

                  Write a Reply...