Hello all

I am still pulling my hair out. I have tried numerous times to get apache 2.0.43 and php 4.3.0 to work on my Windows NT4 workstation machine. The apache monitor program shows that apache and php are loaded.

Here is my error message when I try to access my php file,

[Thu Jan 23 22:22:22 2003] [error] [client 192.168.1.1] C:/apache2/webdocs/test.php is not executable; ensure interpreted scripts have "#!" first line
[Thu Jan 23 22:22:22 2003] [error] [client 192.168.1.1] (9)Bad file descriptor: don't know how to spawn child process: C:/apache2/webdocs/test.php

And, Here is my test.php file,

<?php phpinfo();?>

Now, I have php set up as a module, or so I believe. My php directory is c:\php and I have the following lines in my apache httpd.conf file.

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

I have also copied the php4ts.dll file into the c:\winnt\system32 directory and I have the php.ini-recommended file in my c:\winnt directory as php.ini. I tried the following 4 configuration changes to the php.ini file.

[1]
doc_root = "c:\apache2\webdocs"
extension_dir = "c:\php\extensions"

[2]
doc_root = "c:\apache2\webdocs"
extension_dir = "c:\php\sapi"

[3]
doc_root =
extension_dir = "c:\php\extensions"

[4]
doc_root =
extension_dir = ./

All of these configurations still give me the error I listed above. If anyone has been through this hellish nightmare please help....

Thanks
Frank

    According to this guy, removing your PHP files from your CGI directory will solve this problem.

      I had a problem similar to what you are experiencing when I setup Apace/PHP on XP - what I did that corrected is changed these lines in my c:\windows\php.ini file:

      ;;;;;;;;;;;;;;;;;;;;;;;;;
      ; Paths and Directories ;
      ;;;;;;;;;;;;;;;;;;;;;;;;;

      ; UNIX: "/path1:/path2"

      ;include_path = ".:/php/includes"
      ;
      ; Windows: "\path1;\path2"
      ;include_path = ".;c:\php\includes"
      Windows: "c:\windows"
      include_path = ".;c:\php\includes"

      If you are running NT4 you will want to put c:\winNT instead of c:\windows

      I cannot find documentation on this anywhere, but it works -Pat

        Thanks Pat

        I tried your suggestion, unfortuneatly it didn't work. I am still getting the same error. I am so confused... I also read something about a MDAC. I tried to look at microsofts website but it has like 7 different files. If I'm supposed to download one for my machine, how do I know which one to choose? If anyone has an idea or a solution please post.

        Thanks again
        Frank

          Frank, I looked up the error message in google and came up with a reference to it in http://www.phpbuilder.com/mail/php-install/2000111/0050.php

          Essentially they said that this is a NT NTFS Security issue. Assuming that there is no other installation issues, NTFS requires 1) The installer to have the id of IUSR_MACHINENAME, where MACHINENAME in your case will be whatever you
          called your machine (eg IUSR_FRANKSERVER). , 2) the directory where the php.exe file is located and the exe itself must have read/execute permissions.

          -Check that thread out - lots more suggestions -Pat

            Thanks again Pat

            I finally got it working. I am new at this so my problems were stupid mistakes.

            (1) I didn't have the loadfile statement in my httpd.conf file for the php4ts.dll. I saw this in another help file but I'm not sure if this is needed because a different help file claims that when you load the module php4apache2.dll it will call that file.

            (2) I had a line in my httpd.conf file that said 'AddHandler cgi-script .php'. I was confused because some help files claim you need this to run php scripts. At this time I am assuming that if you have this statement then apache will try to run .php files as a cgi using the php.exe file.

            Anyway, I'm happy to get it working.
            Thanks for the all the help...

            Frank

              Write a Reply...