I got a problem starting apache with php4 in Win98. Apache had problem when loading the php4apache.dll module. Funny thing is I install apache,php4,mysql on Win2K with the same setting, without any problem. But in windows 98, just it just wont work! Why!!! ????

Thank you for any help, Please..

    Wyang,

    You'll have to give us a little more info about your current setup if you want to get more specific help. That being said..... here's my suggestion (I'll assume that you've installed Apache into c:\apache and PHP into c:\php):

    1. Make sure you've followed the instructions for installing PHP:

      • copy php.ini to c:\windows and make the changes you deem necessary
      • copy all the librarys from c:\php\dlls to c:\windows\system
    2. Copy php4apache.dll to c:\apache\modules and php4ts.dll to c:\windows\system

    3. Edit your autoexec.bat file, adding c:\apache to your %PATH% statement

    4. Add the following line to httpd.conf:

      LoadModule php4_module modules/php4apache.dll

    5. Restart Apache.

    You may also need to restart Windows. If Apache still won't load the module, try moving php4ts.dll to c:\windows\system. This is the setup I use to run PHP as an Apache module on Win98. HTH,

    Cheers,

    Geoff A. Virgo

      2 months later

      I just got this same message after doing the install.txt steps that Geoff outlined... except for one problem.

      php4apache.dll was not included in the binary distribution...doh!

      wondering now what else is missing.

      Geoff A. Virgo wrote:

      Wyang,

      You'll have to give us a little more info about your current setup if you want to get more specific help. That being said..... here's my suggestion (I'll assume that you've installed Apache into c:\apache and PHP into c:\php):

      1. Make sure you've followed the instructions for installing PHP:

        • copy php.ini to c:\windows and make the changes you deem necessary
        • copy all the librarys from c:\php\dlls to c:\windows\system
      2. Copy php4apache.dll to c:\apache\modules and php4ts.dll to c:\windows\system

      3. Edit your autoexec.bat file, adding c:\apache to your %PATH% statement

      4. Add the following line to httpd.conf:

        LoadModule php4_module modules/php4apache.dll

      5. Restart Apache.

      You may also need to restart Windows. If Apache still won't load the module, try moving php4ts.dll to c:\windows\system. This is the setup I use to run PHP as an Apache module on Win98. HTH,

      Cheers,

      Geoff A. Virgo

        ok, so i found that from the SAMS book, I needed to use the zip file vs. the msi install file. the msi was not complete.

        the php4apache.dll file was in there, but as noted by Geoff, you must point httpd.conf to the path. if you receive a "load module" error. make sure that this line:

        LoadModule php4_module modules/php4apache.dll

        is quoted:

        LoadModule php4_module "modules/php4apache.dll"

        I believe there was a type on the install.txt which the apache daemon catches upon parsing.

          3 months later

          I have this problem of not having this file, can you explain how to manage to get this file in detail and the installation process?
          thanks

            As I noted previously, if you're trying to use the .msi file, dont πŸ™‚

            use the zipfile , you can get it here:

            http://www.php.net/downloads.php

            use THIS one:


            PHP 4.0.6 zip package [4,859Kb] - 23 June 2001
            (CGI binary plus server API versions for Apache, AOLserver, ISAPI and NSAPI. MySQL support built-in, many extensions included, packaged as zip)


            Do NOT use pl versions. only use stable versions.

            also, i will assume you are saying that you want to install it on a windows machine, no?

            Please list all your specs, etc, i.e., where is APache installed, what does your current httpd.conf file look like (have you made changes) etc etc etc.

              hmm, ok, i guess i cannot edit, but i forgot to add, the zip file "should" have that dll file. hell, all packages released should have that file, but oh well, some are omitted...whatcha gonna do? its free πŸ™‚

                Actually..... they are in the process of updating that silly installer so it will have a full copy of all the extensions. It's still not going to configure Apache though. Really when it all comes down to it, if you want to use the language on a real server (ie Apache), you're going to have to learn how to do a real installπŸ™‚

                -geoff

                  Aye tis true, tis true. I wouldnt even consider the IIS route myself. When the Nimbda or Sircam (cant remember which) was around, it was trying to access me, but I just put a blank file in the base dir and problem solved, thx apache πŸ™‚

                  command line and .conf editing should and will probably remain the best way of maintaining an http daemon.

                  Geoff A. Virgo wrote:

                  Actually..... they are in the process of updating that silly installer so it will have a full copy of all the extensions. It's still not going to configure Apache though. Really when it all comes down to it, if you want to use the language on a real server (ie Apache), you're going to have to learn how to do a real installπŸ™‚

                  -geoff

                    a month later

                    i still get that error. I have apache 1.3 running on win200 pro, and I'm trying to load that php4 module. I have the following string in my config file:

                    LoadModule php4_module "modules/php4apache.dll"

                    yet i'm still getting the load module error.
                    any suggestions?

                    TIA
                    -- A

                      are you sure the DLL is there?

                      Not only does the line have to be quoted correctly as i stated, the dll has to BE there too =)

                        also, can you please copy verbatim any and all msg errors on the screen.

                        also goto err.log <-- i think that's the file and that also gives you a little more info on troubleshooting.

                          #uname -s
                          CYGWIN_NT-5.0

                          #cd /cygdrive/c/users/php/SAPI/
                          #ls -l php4apache.dll
                          -rwxr-xr-x 1 ashah None 24576 Dec 30 13:27 php4apache.dll*

                          so, i'm pretty sure that the file IS there (c:

                          -- A

                            // ...httpd.conf
                            LoadModule php4_module "c:/php/sapi/php4apache.dll"

                            // ...after restarting apache
                            Syntax error on line 803 of c:/program files/apache group/apache/conf/httpd.conf
                            :
                            Cannot load c:/php/sapi/php4apache.dll into server: (126) The specified module c
                            ould not be found:

                            also, i couldn't find any "err.log".

                            thanks,
                            -- A

                              OK, we're going to assume that you've installed Apache into c:\apache and extracted the PHP zip into c:\php for the sake of this example... modify to fit your actual paths. Follow these steps:

                              1. Copy php4apache.dll into c:\apache\modules.
                              2. Copy php4ts.dll into the SYSDIR (c:\windows\system or c:\winnt\system32).
                              3. Copy all the dll's from the c:\php\dlls folder to the SYSDIR.
                              4. Copy php.ini into the WINDIR (c:\windows or c:\winnt).
                              5. Make sure the extension_dir directive in php.ini is set to: "c:\php\extensions"
                              6. Add the following lines to your httpd.conf:

                              &nbsp;&nbsp;LoadModule php4_module modules/php4apache.dll

                              &nbsp;&nbsp;AddType application/x-httpd-php .php .php3 .phtml
                              &nbsp;&nbsp;AddType application/x-httpd-php-source .phps

                              1. Restart Apache.

                              When you restart Apache, do it from the command line if you're on NT, 2K, or XP. The Services applet doesn't give you useful error messages should something fail. Apache should now be quite happily running with PHP as a module.

                              -geoff

                                Yeah, i think the shotgun approach will definitely cover all the bases...

                                but I think I saw a problem in Ankur posted

                                I previously said watch for the "quotes" but now after looking at my paths, etc....

                                My install is working as intended now, so ill just give you what I see

                                I have php4ts.dll in the sysdir as Geoff is saying...but I have php4apache.dll in the /sapi directory same as Ankur.

                                so i have the line

                                LoadModule php4_module "C:\program files\apache group\apache\php\sapi\php4apache.dll"

                                and of course i have the Addtype lines in there, just as Geoff is saying...

                                I think the problem after looking at it again and again and not seeing it previously is that if you look, Ankur, at your post, you have listed:


                                // ...httpd.conf
                                LoadModule php4_module "c:/php/sapi/php4apache.dll"

                                // ...after restarting apache
                                Syntax error on line 803 of c:/program files/apache group/apache/conf/httpd.conf
                                :
                                Cannot load c:/php/sapi/php4apache.dll into server: (126) The specified module c
                                ould not be found:


                                It's the Unix vs. Win thing...you have to change your path's backslashes...

                                Its not that you are copying anything to a wrong directory or that you are "typing" anything incorrectly other than the slashes...

                                caveat...I hope....

                                πŸ™‚

                                I hope that does it

                                  4 days later

                                  thanks for your help geoff. I got up to the point where I dont see apache complaining about finding the library anymore, but now I get a windows dialog saying:
                                  "invalid library maybe not a php library (php4apache.dll)"

                                  from searching the archive, I get the feeling that I need to upgrade pdflib(??)

                                  thanks again to you and Richard for your help.

                                  -- A

                                    18 days later

                                    I have a similar problem. When I use php4apache.dll from an older PHP distribution (i.e. copy over the new one with the old one) Apache doesn't complain at all. Everything goes well, but phpinfo() shows the older version number etc.

                                    When I replace the old php4apache.dll with the new one, Apache complains again at startup. So, it can't be a problem with path, backslashes, quotes, etc. It is a problem with the new php4apache.dll

                                    Any clues?

                                    Sameer

                                      have you tried installing Apache 1.3.22 and PHP 4.1.1?

                                      I have found no problems w/ a default install, except those listed above... gotta go to work, but ill check back.

                                      also, make sure you are NOT using a pl(x) version.

                                      those screw up seemingly a bit more than the "stable releases"

                                      Post your versions, OS etc. is this prod, dev, home localhost test?

                                        3 months later

                                        I have the same problem.
                                        Running Apache 2.0.35 and PHP 4.2.0 in Windows XP, i have the same :

                                        Syntax error on line 948 of C:/Apache2/conf/httpd.conf:
                                        Cannot load C:/Apache2/modules/php4apache.dll into server: The specified module
                                        could not be found.

                                        I have all c:\php\dlls and php4ts.dll copied to c:\windows\system32
                                        and php4apache.dll copied to c:\apache2\modules

                                        I'm pretty sure too, that the configuration files and paths are ok in both, Apache and PHP.
                                        Looks like if there are a problem whith "old" third party modules.
                                        Whith the same configuration and using Apache 1.3.23 instead, all works fine.
                                        Maybe the new 2.0 API of Apache doesn't works at all with the last release of PHP and we need wait a while for the next release to see it working together.

                                        Anyway if someone knows a workaround to this, please post it.