Hey guys, this isn't my first time installing PHP, although it is pretty my first time doing it on a Windows machine. I have done it on Mac and Linux machines more than a few times.

Anyways, I had installed Apache Server 2.2.3, and also installed PHP 5.2.1. For some reason, PHP never worked on my Windows machine, and I couldn't figure out why. Today I decided I would download PHP 5.2.3 and upgrade, and see if it would work, but once again it did not.

So, determined to get PHP to work, I decided to uninstall PHP and Apache completely, and do a fresh install. So I did.

First I installed Apache (same version), and then I installed PHP 5.2.3 (using the Win32 MSI installer). I installed both to their default directories that the installer wants to use.

When I try to run a PHP script, however, I still get the exact same errors as I was beforehand. This is what happens:

I open my browser, and I go to the address: localhost/info.php

When I do this, it thinks for a few seconds, and then brings up a nice little error message:

[ATTACH]3102[/ATTACH]

This error has really befuddled me....so I decided to also try running PHP from the command line....When I do so, this happens:

[ATTACH]3103[/ATTACH]

After I press okay, this turns up:

[ATTACH]3104[/ATTACH]

I know the Apache .conf file is fine...the PHP .ini file is fine...it seems that it can't find some DLL files, which is pretty strange....I've googled around for help, but so far haven't found anything really similar to my problem.

Anyone got a clue what I can do to get this solved?

    Do you need the "php_netools.dll" extension? Try commenting out the "extension=php_netools.dll" line in your php.ini file.

    Also, if that doesn't work, try installing PHP by downloading the .zip package and integrating it with Apache manually. IMO, this is the best method of installing PHP.

      okay i tried commenting out that line of the php.ini file. That specific error goes away, but it still crashes. When I run it on the command line (without any input files), it hangs. When I run it on the command line with phpinfo.php as the input file, it first declares that that I am using an undefined function, and then crashes (instead of exiting gracefully).

      When I use it in the web browser it still gives me the same error as before.

      I guess I can try doing it manually and seeing how it goes. But any other ideas as to what it could be?

        Are ALL of the extension lines commented out?

        In Apache's httpd.conf file, does it point to the php5apache2_2.dll file (and NOT "php5apache2.dll")?

          These are the lines directly from the httpd.conf:

          #BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
          PHPIniDir "C:\Program Files\PHP\"
          LoadModule php5_module "C:\Program Files\PHP\php5apache2_2.dll"
          #END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

          The paths and filenames seem to be correct. I went into the PHP directory and verified it is the correct DLL.

          What do you mean by ALL of the extension lines? I did comment out the lines of the offending DLL file...I haven't been notified by the browser or the command line of any other offending DLL files. Here is that segment of the php.ini file:

          [PHP_LDAP]
          extension=php_ldap.dll
          [PHP_MYSQL]
          extension=php_mysql.dll
          [PHP_OPENSSL]
          extension=php_openssl.dll
          [PHP_PDO]
          extension=php_pdo.dll
          [PHP_SHMOP]
          extension=php_shmop.dll
          [PHP_SOCKETS]
          extension=php_sockets.dll
          [PHP_SQLITE]
          extension=php_sqlite.dll
          [PHP_HTSCANNER]
          extension=php_htscanner.dll
          [PHP_JAVA]
          extension=php_java.dll
          ;[PHP_NETOOLS]
          ;extension=php_netools.dll
          [PHP_POP3]
          extension=php_pop3.dll
          [PHP_PRINTER]
          extension=php_printer.dll
          [PHP_SMTP]
          extension=php_smtp.dll
          [PHP_SSH2]
          extension=php_ssh2.dll
          [PHP_THREADS]
          extension=php_threads.dll

          I just got around to downloading the .zip package, but I haven't actually done anything with it yet, so I can't get back to you on that part yet.

            Try commenting out all of the extension lines and see if PHP works that way.

            EDIT: I should note that I've never used the MSI installer (nor any of the pre-built packages such as XAMP/WAMP/etc. - I've only ever used the manual installation method).

              Okay I tried commenting out all of the extensions, and I found some success. I discovered that the only other offending extension is the Threads extension...so I left that one commented out.

              With those two extensions commented out, PHP seems to work. I whipped up a simple script and tried it both on the command line and in the browser, and it worked, so that's good.

              The phpinfo() function also returned all the appropriate information.

              So I guess we can call the problem solved...but why would the threads library be causing such a problem you think?

                Not sure... could be that some of these extensions require 3rd party software to work... dunno.

                  9 days later

                  change the code in the HTTPD.conf file. it's the offending issue

                  #BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
                  PHPIniDir "C:\Program Files\PHP\"
                  LoadModule php5_module "C:\Program Files\PHP\php5apache2_2.dll"
                  #END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
                  

                  the double \ was causing my similar install to pop up saying none of the DLL's were found

                    Write a Reply...