Thanks David for your prompt respond.

I have a Dell Server that pre-loaded
with RedHat 6.2 and Apache. I am not
very sure that if PHP3 is preloaded
but I can see module like "mod_php.so"
in the system.

What I have ensured is that inside
httpd.conf, I have commented the statement
on the following:
#AddType application/s-httpd.php3 .php3
#AddType application/x-httpd-php3-source .phps

I followed the article:
"The Soothingly Seamless Setup of Apache, SSl, MySQL, and PHP" and comipled all
files without problems.

I have created symbolic link to make
sure that the system using the
httpd.conf I have created instead of
the pre-loaded file.

My questions are as follow:
1. How do I make sure that PHP3 is not
running?
2. How do I check that PHP4 is up?
Can I use ps -ef to check?

Thanks a lot.

    ok, a standard install of RH6.2 includes apache with mod perl and mod php3, I don't know if Dell changes that or not, I can't imagine why they would. Check your httpd.conf, which is the only place where any apache config directives should be these days. I have:

    LoadModule php4_module /usr/lib/apache/libphp4.so

    and I have commented out:
    #LoadModule php_module modules/mod_php.so
    #LoadModule php3_module modules/libphp3.so

    Later, in the addmodule sections I have:

    AddModule mod_php4.c

    AddModule mod_php.c

    AddModule mod_php3.c

    the standard RH6.2 httpd.conf has the php3 'AddType' set up in a IfModule directive, so it doesn't load unless you are loading the module.

    Then, finally, I have:
    AddType application/x-httpd-php .php

    The other possibility is that you didn't configure it as a module... my configure directive was:
    ./configure --with-mysql --with-apxs
    the "--with-apxs" is what compiles it as a module.

    Hope this helps.

    D

      I am having a similar issue. I installed apache 1.3.12 and php4...
      The installation instrauctions show that you should look for mod_so.c which I have. Then, everything else looks great...I compiled the PHP the way the INSTALL files says too, and I uncommented the AddType lines in the httpd.conf then restarted apache. Now I get the thing where it wants to download the test.php I created instead of view it. I checked to see if the module was being loaded by doing a httpd -l and it doesnt show any php module. What do I do now?

        Did you make sure the addmodule and loadmodule directives are there for php4?

        go to the apache conf file directory and do:
        cat * | grep php

        make sure that you are doing the loadmodule first, addmodule second, and then the addtype, and that you are only doing it for php4.

          ok for cat * | grep php I got this

          http://www.php.net) will typically use:

          #AddType application/x-httpd-php3 .php3
          #AddType application/x-httpd-php3-source .phps
          #AddType application/x-httpd-php .php
          AddType application/x-httpd-php .php
          AddType application/x-httpd-php-source .phps

          http://www.php.net) will typically use:

          #AddType application/x-httpd-php3 .php3
          #AddType application/x-httpd-php3-source .phps
          #AddType application/x-httpd-php .php
          #AddType application/x-httpd-php-source .phps

          I take it then that I am missing A few statements...what should they look like..(addmodule??? etc)

          Thanks...
          DJ

            I have the following two directives. I imagine that you just need to make sure libphp4.so is in the right path. They probably need to go in this order as well. There is a whole section of the conf files with the LoadModule directives, put the php4 one at the end of that, and there is a section with the addmidule directives, put the php4 one at the end of that one, then anywhere after that, put the addtype directive.

            LoadModule php4_module /usr/lib/apache/libphp4.so
            AddModule mod_php4.c
            AddType application/x-httpd-php .php

            tell me if this works for you.

              Ok....I think I found my problem...I have no libphp4.so ...is this a compilation problem?

              DJ

                If you compiled it, it is somewhere, check the php docs on installation and you may need to use a configure directive to tell where apache is.

                  I followed the instructions in the faq for fixing my apsx script and now I get this when I do make

                  make[1]: Entering directory /storage/php-4.0.1pl2'
                  /bin/sh /storage/php-4.0.1pl2/libtool --silent --mode=link gcc -g -O2 -o libph
                  p4.la -rpath /storage/php-4.0.1pl2/libs -avoid-version -L/usr/local/lib -R /usr
                  /local/lib stub.lo Zend/libZend.la sapi/apache/libsapi.la main/libmain.la regex/
                  libregex.la ext/db/libdb.la ext/gd/libgd.la ext/mysql/libmysql.la ext/pcre/libpc
                  re.la ext/posix/libposix.la ext/session/libsession.la ext/standard/libstandard.l
                  a ext/xml/libxml.la -lgdbm -lpam -ldl -lttf -lgd -lresolv -lm -ldl -lcrypt -lns
                  l -lresolv
                  stub.lo: file not recognized: File truncated
                  collect2: ld returned 1 exit status
                  make[1]: *** [libphp4.la] Error 1
                  make[1]: Leaving directory
                  /storage/php-4.0.1pl2'
                  make: *** [all-recursive] Error 1

                    You got me on that one, I would just try a
                    ./configure --with-mysql --with-apxs

                    just like it has in the INSTALL file, and see if that works. You could dump the mysql, but I would just try to get something working.

                      OK...I just decided to give up and load it as a static module...No problem. Thanks for the help. I will try it Dynamic again later when I have the time.

                        I am also facing similar problem.

                        I did everythig explained in INSTALL. When I compile the PHP4 as a dynamic module. httpd gives core dump ad don't start.

                          9 days later

                          i have been having the same problem all afternoon.

                          i was testing with files with a .php3 extension.. no luck

                          changed it .php.. no luck

                          changed httpd.conf from
                          AddType ... php4 .php

                          to

                          AddType ... php .php

                          made a file with only one thing in it..
                          <?php
                          phpinfo();
                          ?>

                          WORKED !!

                          the file that used to work with php3 doesn't seem to want to load. i will deal with that later. time to go see my kids..

                            2 months later

                            Dear all,
                            I just joined this forum/topic. Sorry for this 'belated'.
                            I am new in Linux and PHP.
                            I selected Apache-1.3.12-2 and PHP3 while I was installing RedHat 6.2.
                            Now I want to upgrade the PHP3 to PHP4.
                            I did these several steps :
                            1) Uncompressed the php4 file (my version is php-4.0.3pl1.tar.gz)
                            2) From the directory of php4 : ./configure --with-mysql --with-apxs.
                            It didn't work. Like David said, the "--apxs" is what compiles it as a module, but I even didn't find apxs file in my computer.
                            Please help me. Any help will be very much appreciated.

                            Thank's in advance,
                            Kiky

                              No problem, I have run into that one before. What you are missing is the apache-devel libraries. Just install the appropriate apache-devel RPM for your apache, and APXS will be there.

                              Good luck!

                                22 days later

                                Installing PHP4 module :
                                When I run ./configure --with-mysql --with-apx under the directory of the PHP4 untar package, a certain number of things goes well apparently but it also says that it can't find ./configure (the one from Apache ?). What's the pb ? I also can only find the httpd.cong, no other .conf and no configuration.tmpl...??
                                Thanks

                                  3 months later

                                  An issue that I'm having is that in Netscape 6, when I try to run a page on the apache server that calls a .php3 file, apache doesn't recognize the file to process and so netscape thinks that it's some mime media type and asks for an application to use to run it. I have the lines in my httpd.conf:

                                  LoadModule php4_module modules/libphp4.so
                                  AddModule mod_php4.c
                                  AddType application/x-httpd-php3 .php3

                                  any ideas? thanks - JOhn

                                    Looking at this:

                                    LoadModule php4_module modules/libphp4.so
                                    AddModule mod_php4.c
                                    AddType application/x-httpd-php3 .php3

                                    I would say it is the addtype command. According to the PHP4 INSTALL file (in the directory of the source code), the addtype command should look like:

                                    AddType application/x-httpd-php .php

                                    That is all...

                                    D

                                      4 months later

                                      Exact same problem here:

                                      stub.lo: file not recognized: File truncated

                                      I may have to just go with the static module as well. sigh

                                      Someone please help. Thanks.

                                      Mike

                                        a month later

                                        I went through the thread and still have the problem. It looks like people are having better luck statically compiling the module into the Apache daemon. Now my PHP is statically compiled into the httpd daemon:

                                        % ./bin/httpd -l
                                        Compiled-in modules:
                                          http_core.c
                                          mod_env.c
                                          mod_log_config.c
                                          mod_mime.c
                                          mod_negotiation.c
                                          mod_status.c
                                          mod_include.c
                                          mod_autoindex.c
                                          mod_dir.c
                                          mod_cgi.c
                                          mod_asis.c
                                          mod_imap.c
                                          mod_actions.c
                                          mod_userdir.c
                                          mod_alias.c
                                          mod_access.c
                                          mod_auth.c
                                          mod_proxy.c
                                          mod_so.c
                                          mod_setenvif.c
                                          mod_perl.c
                                          mod_php4.c
                                        
                                        % ../bin/httpd -v
                                        Server version: Apache/1.3.19 (Unix)
                                        Server built:   Jul 16 2001 14:23:06

                                        Here is the php AddType line in the httpd.conf:

                                        % grep php ./conf/httpd.conf
                                        #AddType application/x-httpd-php .php
                                        AddType application/x-httpd-php .php .phtml
                                        #AddType application/x-httpd-php-source .phps

                                        The php.ini file is
                                        It still wants to download the *.php file.

                                        Any ideas?

                                        Thanks,

                                        Tim

                                        kunau002@email.umn.edu