apache 2.0.42
php 4.2.3
win2k

I cant seem to install the two together, the apache server just will not start up after following php install instructions - and adding the php httpd.conf lines.

Any1 who has gotten this to work and may shead some light as to how to go about installing please let me know, i appreciate it.

DRB

    ok i have solved my problem after long searching. if you are having probs installing both php 4.2.3 and apache 2.0.42 you should get the latest version of php here (php4.3.0-dev):

    NOTE: download is for php 4.3.0-dev
    http://snaps.php.net/win32/php4-win32-latest.zip

    the following is my installation procedure:

    1. install apache 2.0.42 binary
    2. extract latest php files
    3. place php4ts.dll in C:\WINNT\system32
    4. place php.ini in C:\WINNT
    5. add following lines to apache httpd.conf file:
      LoadModule php4_module c:/php/sapi/php4apache2.dll
      AddType application/x-httpd-php .php

    below were the errors i was getting in event manager prior to fixing my problem installation:

    The Apache service named reported the following error:

    Apache.exe: module "c:\php4build\snap\sapi\apache2filter\sapi_apache2.c" is not compatible with this version of Apache (found 20020628, need 20020903).

    I hope the above helps people, if you have found other methods that also have worked or if the above did not work for you please continue to post.

    DRB

      If you want to simply use php4.2.3 not the dev version, just take php4apache2.dll from php4.3.0-dev (10-01-02) version and replace the php4.2.3 version (09-06-02) - and restart apache.

      this also worked for me. YEEHAA

        5 days later

        I am trying to install PHP 4.2.3 on Apache 2.0.43, and I have tried the above suggestion of using the .dll file from the PHP 4.3 download rather than the one from PHP 4.2.3, however I am still receiving a problem loading the Apache server.

        This scenario works:
        #LoadModule php4_module d:/php/sapi/php4apache2.so

        however when I uncomment that line, Apache throws the following error when I try to start the service:

        The requested operation has failed!

        php4apache2.so is simply the php4apache2.dll file but renamed... this step was included in the php installation.txt file that came with my download.

        My OS is Windows XP.

        This is my first time manually installing php and any help is much appreciated. Thx

          check your event logs and your apache error logs, see what the error message is there, might be a httpd.conf syntax error...

            I have checked the Apache logs.... the only records they hold are the few times that I started the Apache server WITHOUT PHP module included. These records simply show the server starting then stopping. But, when I attempt to load the PHP module, the server never actually starts running, and no error log entries are created.

              not sure what to say, XP and win2k should be the same to install my installation as above:

              1. install apache 2.0.42 binary
              2. extract latest php files
              3. place php4ts.dll in C:\WINNT\system32 or C:\WINDOWS\system32
              4. place php.ini in C:\WINNT or C:\WINDOWS
              5. add following lines to apache httpd.conf file:
                LoadModule php4_module c:/php/sapi/php4apache2.dll
                AddType application/x-httpd-php .php

              make sure the php.ini file and php4ts.dll are from the php4.2.3 zip archive, only the php4apache2.dll file is needed from php4.3.0 dev archive.

              I just upgraded to apache 4.0.43 just to make sure it was working ok with the above instructions and everything did.

                Dear frustrated friends:

                After nearly two years, I finally felt compelled to upgrade Apache from 1.3 (I think) to 2.0.43, as well as upgrade my PHP build (last update in June).

                Anyway - like many others, I was having major problems with Apache loading the module. I tried all of the suggestions in this thread, as well as from other sites, but to no avail (but they certainly lead me in the right direction.)

                The following is what I ended up getting to work:

                • Uninstalled old Apache
                • Removed old PHP
                • Installed Apache 2.0.43 (c:/servers/Apache2) - performed basic static server configuration
                • Installed/Configured PHP 4.2.3 (c:/php)
                • Added the following to Apache's httpd.conf

                LoadModule php4_module c:/php/sapi/php4apache2.dll
                AddType application/x-httpd-php .php

                • Tried running apache (it failed)
                • Replaced c:/php/sapi/php4apache2.dll (from 4.2.3 build) with php4apache2.dll (4.3.0 pre build)
                • Tried running apache (it failed)
                • Replaced %SYSTEMROOT%/php4ts.dll (4.2.3 build) with php4ts.dll (4.3.0 pre build)
                • Tried running apache (it failed)
                • Removed %SYSTEMROOT%/php4ts.dll
                • Copied the 4.3.0 pre build of php4ts.dll to c:/php/sapi
                • Tried running apache (it worked!!)

                All I can figure is that Apache was not searching for the php4ts.dll dependency properly, but I don't really know. However, I am sure that neither php4apache2.dll nor php4ts.dll from the 2.4.3 build worked in any configuration. I only had luck after replacing those files with the ones from the 4.3.0 pre build.

                I'd be interested to hear if someone had the same situation as myself, and found my method to work... maybe I'm just odd ;-)

                Good luck!

                -Aaron

                  yeah, i had that problem this morning trying to set my box up. the install doc said this:

                  " Whereever you load php4apache.dll from, php4apache.dll also
                  needs the php4ts.dll also included in the PHP4 distribution.
                  php4apache.dll depends on php4ts.dll which is loaded as soon as
                  Apache loads php4apache.dll. If php4ts.dll can't be found, you
                  usually get an error like (also see the "Problems?" section at
                  the end of the file):

                  Cannot load c:/php/sapi/php4apache.dll into server"

                  so i just copied the php4apache2.dll to the c:\php folder where the php4ts.dll file was and everything worked beautifully.

                  I of course changed the httpd.conf file to read:

                  LoadModule php4-module "c:\php"

                  and everything worked beautifully.

                    I'm having the same problems. I'll try the suggestions to see if they help, but so far it's just been 24 hours of frustration. This doesn't leave me with much appreciation for PHP or Apache, although Apache is working fine without the PHP configuration.

                    I posted this at php-forum.com:

                    I'm trying to do the "Build your own Database Driven Website using PHP & MySQL" tutorial by Kevin Yank located here:
                    http://www.webmasterbase.com/article.php?aid=228&pid=0

                    I've installed mySQL 3.23.52, PHP 4.2.3, and Apache 2.0.43 on my WinXP Home computer. The Apache server is working fine. However, when I add the following lines to httpd.conf as directed in the tutorial Apache will not restart.

                    LoadModule php4_module c:/PHP/sapi/php4apache.dll
                    AddType application/x-httpd-php .php .php3 .phtml
                    AddType application/x-httpd-php-source .phps

                    Apache gives an error saying, "The requested operation has failed!". As soon as I comment those lines, Apache starts fine again. I verified that the module path is correct. I checked my log file, and it tells me the following:

                    [Mon Oct 14 16:55:15 2002] [notice] Parent: Created child process 1400
                    [Mon Oct 14 16:55:15 2002] [notice] Child 1400: Child process is running
                    [Mon Oct 14 16:55:15 2002] [notice] Child 1400: Acquired the start mutex.
                    [Mon Oct 14 16:55:15 2002] [notice] Child 1400: Starting 250 worker threads.
                    [Mon Oct 14 16:57:57 2002] [notice] Parent: Received restart signal -- Restarting the server.
                    [Mon Oct 14 16:57:57 2002] [notice] Child 1400: Exit event signaled. Child process is ending.
                    [Mon Oct 14 16:57:57 2002] [warn] (720995)The I/O operation has been aborted because of either a thread exit or an application request. : winnt_accept: Asynchronous AcceptEx failed.
                    [Mon Oct 14 16:57:58 2002] [notice] Child 1400: Released the start mutex
                    [Mon Oct 14 16:57:59 2002] [notice] Child 1400: Waiting for 250 worker threads to exit.
                    [Mon Oct 14 16:57:59 2002] [notice] Child 1400: All worker threads have exited.
                    [Mon Oct 14 16:57:59 2002] [notice] Child 1400: Child process is exiting

                    I'm not sure what to do at this point. Please dont tell me to RTFM. I just want to get this development environment setup temporarily so I can learn a little PHP before buying a webhost. If anybody could point me in the right direction, I'd really appreciate it. Until then I'll keep banging my head against the wall trying to figure it out.

                      "I'd be interested to hear if someone had the same situation as myself, and found my method to work... maybe I'm just odd ;-) "

                      No, you're not odd!!! I followed your instructions, and that was the ONLY thing that worked for me. This is the first time I've ever tried to install Apache or PHP, and what a PITA! I'm confused as hell, but at least now I can forget about this installation crap and get on with learning PHP!

                      Thank you Aaron!
                      Thank you Aaron!
                      Thank you Aaron!

                        8 days later

                        I have the same problems installing on windows2k. I tried using the dll from php4.3.0 and my LoadModule directive is exactly what you all recommend. I still cannot run PHP scripts. In desperation I installed Apache1.3 and now my scripts work.
                        Any ideas what I can try to get the php parser work with apache2? I am new to the forum and simply trying to learn how to use apache/php/mysql

                          like every1 else, i have the same problem. Apache 2.0.43 + PHP4.2.3 ... tried all the solutions ... even tried replacing the php4apache2.dll from the 4.3.0 pre build. Getting the following error with the pre build.

                          C:\Program Files\Apache Group\Apache2\bin>apache -t
                          Syntax error on line 174 of C:/Program Files/Apache Group/Apache2/conf/httpd.conf:
                          Cannot load C:/php/sapi/php4apache2.dll into server: The specified procedure cou
                          ld not be found.

                            9 days later

                            abockover is right. I replaced my 4.2.3 PHP installation with 4.3 and copied php4ts.dll to the sapi directorty. Voilla! Seems like it should be easier...

                              5 days later

                              Hello together !

                              I tried to fix this bug, too.
                              But I'm not able to compile the binaries.

                              Could anyone post the
                              php4apache2.dll
                              and
                              php4ts.dll

                              or send them via eMail ?

                              Tx in advance,
                              pheidrias

                                4 days later

                                After reading this thread, I realized I was in the same boat as everyone else in regards to the errors that were manifesting themselves attempting to get this setup to work correctly. Here's my setup:

                                • M$ Windoze 2K Advanced Server (SP3)
                                • Apache 2.0.43 (M$ Installer version - binary)
                                • PHP 4.2.4 Dev (latest development snapshot)
                                • Tomcat 4.1.12 (binary release version)

                                This combination worked quite well. I've experienced every type of error described in this thread prior to this and they all went away when I used the above. Just read and follow this tutorial:

                                http://geekforums.co.uk/index.php?act=ST&f=17&t=9

                                Pretty cut and dried when it comes right down to it. Hope this helps all those troubled souls trying to get this to mix of technologies to play together nicely...

                                However, here it comes...
                                [Insert Standard Disclaimer Here]
                                "Your actual mileage may vary..."

                                Peace - out...

                                --
                                The Doktor

                                "I drank what?!?" - Socrates

                                  Here are the steps i took to install everything, and it worked...

                                  Files

                                  Apache 2.0.43
                                  Mysql MAX 2.23.53
                                  Php 4.2.3 installer and zip
                                  Php4-win32-latest

                                  Im running win2k with sp3

                                  1. installed apache and rebooted
                                  2. used php4.2.3 installer to install php
                                  3. then unzipped the php4.2.3 zip install into the php dir to get
                                    all the files needed.
                                  4. copied the php4ts.dll to my system32 dir
                                  5. used the php4ts.dll, php4apache.dll, and php4apache2.dll files from the dev release, and copied them into my php dir.
                                  6. put the php4ts.dll file in the sapi dir.

                                  so, you have the 4.2.3 php4ts.dll file in the system32, and the dev dll files in the php dir

                                  everything worked...

                                    great link doktor13, found a few useful tips in that one. Its great this thread has been active for so long, everyones comments, I am sure have been very helpful to many... keep posting if you have further useful insight...

                                      4 days later

                                      Thanks all for the above tips....but...still not working.

                                      I am trying to install Apache 2.0.43 with PHP 4.2.3 on Windows XP, it didn't work, then I follow all the suggestions above, too sad, it still didn't work...what I get is always the "The requested operations has failed!". .sigh..

                                      Any more solutions???? plsssss...

                                        Angelene and all-

                                        This by far was the most hopeful realistic thread. I think I've tried every combination of different versions in either the CGI or module options.

                                        I've spent 25+ hours trying to get PHP to work with Apache 1.3 from various materials (nushpere CDs and instructions, kevin yank book/instructions, php/mySQL for dummies CDs and instructions, actual web site download and instructions, and forum emails). Yet, these "open source" tools arent getting me anywhere close to the end objective. As of now, Conclusion is that PHP SEEMS TO BE THE PROBLEM CHILD not wanting to play.

                                        I've tried Aarons outline....not work for me yet, but provided some option ideas.

                                        I have XP. Currently Apache 2.0 working and MySQL version 3.2.3. No scripts run...either as partial html or html and php. Although, scripts ran under apache 1.3 just not executed php portion.

                                        I do get the Apache "successful" web page when run local host in I.E. browser. HOwever, now does not recognize any *.php scripts within the defined directory....C:apache group/apache/htdocs. However, under 1.3 version it did without a hitch - would run the .html portion but not the .php portion. Now, does neither.

                                        • I deinstalled all previous evidence of PHP 4.1.1 and Apache 1.3.
                                        • I downloaded the Apache 2.0.? Binary File .exe and installed, since I have XP.
                                        • Had some intial errors of sharing port info....I uncommented the line that references an IP address above line "port 80". That worked. But, then later had to undo.
                                        • Added the 2 lines
                                          LoadModule php4_module c:/php/sapi/php4apache2.dll
                                          AddType application/x-httpd-php .php
                                        • Downloaded the 2 PHP files: win32 zip package and the installer package (someone said together in the thread). Unzipped the package then ran the installer package. Earlier tried each individually, but seemed incomplete when alone.
                                        • Edited the php.ini to update the doc root to apache/htdocs and to update extension_dir to c:php/extension.
                                        • Also, copied the php4ts.dll to the system32, windows, php and sapi directories. Threads seem to have success in one of these so I put in all. Did the same for the php4apache2.dll file.
                                        • Apache didnt work at all with both httpd.conf and php.ini changed.
                                        • Went back to initial download version (virgin file).
                                        • Apache is only working now. Have readded the LoadModule and AddType application lines...apache still working. Have copied the PHP 4.3 DEV version files of php4apache.dll, php4apache2.dll and php4ts.dll to following folders system32, windows, php, sapi. Have not yet tweeked the php.ini file again.

                                        This in plans for future troubleshooting.

                                        I dont know if this makes sense or helps anyone....3am where I am and long few days.

                                        please keep suggestions or final solutions to situation coming.

                                        aka Tessa

                                        This should not be this difficult.