I have RH7.3 Installed, with the defualt install of APACHE / PHP...

For some reason... Apache does not seem to be parsing the PHP files. All I can see is PHP code?

Help!

Glen

    Make sure you have the following statements in httpd.conf with the other LoadModule statements:

    <IfDefine HAVE_PHP>
    LoadModule php_module modules/mod_php.so
    </IfDefine>
    <IfDefine HAVE_PHP3>
    LoadModule php3_module modules/libphp3.so
    </IfDefine>
    <IfDefine HAVE_PHP4>
    LoadModule php4_module modules/libphp4.so
    </IfDefine>

    ...and these statements with the other AddModule statements:

    <IfDefine HAVE_PHP>
    AddModule mod_php.c
    </IfDefine>
    <IfDefine HAVE_PHP3>
    AddModule mod_php3.c
    </IfDefine>
    <IfDefine HAVE_PHP4>
    AddModule mod_php4.c
    </IfDefine>

    (change the paths to the modules to the paths on your box)

    If you have this in already (and it is uncommented) and it is still not working, then ensure you have index.php & index.php3 added to the DirectoryIndex (an example of mine is below)

    <IfModule mod_dir.c>
    DirectoryIndex index.htm index.html index.php index.php3 default.html index.cgi index.cfml
    </IfModule>

    HTH. This works fine on my box, which is the same as yours; RH7.3, running Apache & PHP 4.2.3

    Jonathen

      5 days later

      Thank you for the reply, I actually soved what the issue was, Though this may be strictly related to my setup, I thought I would share just in case.

      In the httpd.conf , I changed these lines to what you see below

      Reconstruction of the complete module list from all available modules

      (static and shared ones) to achieve correct module execution order.

      [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO]

      #ClearModuleList
      #AddModule mod_mmap_static.c
      #AddModule mod_vhost_alias.c
      <IfDefine HAVE_BANDWIDTH>
      AddModule mod_bandwidth.c
      </IfDefine>
      <IfDefine HAVE_THROTTLE>
      AddModule mod_throttle.c
      </IfDefine>
      #AddModule mod_env.c
      #AddModule mod_log_config.c
      #AddModule mod_log_agent.c
      #AddModule mod_log_referer.c
      #AddModule mod_mime_magic.c
      #AddModule mod_mime.c
      #AddModule mod_negotiation.c
      #AddModule mod_status.c
      #AddModule mod_info.c
      #AddModule mod_include.c
      #AddModule mod_autoindex.c
      #AddModule mod_dir.c
      #AddModule mod_cgi.c
      #AddModule mod_asis.c
      #AddModule mod_imap.c
      #AddModule mod_actions.c
      #AddModule mod_speling.c
      #AddModule mod_userdir.c
      #AddModule mod_alias.c
      #AddModule mod_rewrite.c
      #AddModule mod_access.c
      #AddModule mod_auth.c
      #AddModule mod_auth_anon.c
      #AddModule mod_auth_db.c
      #AddModule mod_auth_any.c
      #AddModule mod_auth_dbm.c
      #AddModu#AddModule auth_ldap.c
      #AddModule mod_auth_mysql.c
      #AddModule mod_auth_pgsql.c
      #AddModule mod_digest.c
      #AddModule mod_proxy.c
      #AddModule mod_cern_meta.c
      #AddModule mod_expires.c
      #AddModule mod_headers.c
      #AddModule mod_usertrack.c
      #AddModule mod_example.c
      #AddModule mod_unique_id.c
      #AddModule mod_so.c
      #AddModule mod_setenvif.c
      <IfDefine HAVE_PERL>
      #AddModule mod_perl.c
      </IfDefine>
      <IfDefine HAVE_PHP>
      AddModule mod_php.c
      </IfDefine>
      <IfDefine HAVE_PHP3>
      AddModule mod_php3.c
      </IfDefine>
      <IfDefine HAVE_PHP4>
      #AddModule mod_php4.c
      </IfDefine>
      <IfDefine HAVE_DAV>
      #AddModule mod_dav.c
      </IfDefine>
      <IfDefine HAVE_ROAMING>
      AddModule mod_roaming.c
      </IfDefine>
      <IfDefine HAVE_SSL>
      #AddModule mod_ssl.c
      </IfDefine>
      <IfDefine HAVE_PUT>
      AddModule mod_put.c
      </IfDefine>
      <IfDefine HAVE_PYTHON>
      AddModule mod_python.c
      </IfDefine>

      You will notice two primary things, I have commented out the
      ClearModuleList

      and the

      <IfDefine HAVE_PHP4>
      #AddModule mod_php4.c
      </IfDefine>

      , As soon as I commented out the ClearModuleList, it worked (PHP), it also complained that php was already loaded, and a bunch more modules.

      I simply commented out all the modules it complained about and everything is now workign fine.

      Apparently, The ClearModuleList directive is there to make sure you only have the modules loaded that you need, and it reload the modules by the internal name such as mod_php4.c

      This wasn't working...

      I don't know if this is right or wrong. But either way, it worked for me

        Write a Reply...