This is a discussion on Newbie: Apache 2.0.50/Win2K executes PHP 4.3.8 as CGI instead of module? within the PHP Language forums, part of the PHP Programming Forums category; Hi there, I can´t get PHP 4.3.8 to work with apache 2.0.50 on Windows 2000. ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi there,
I can´t get PHP 4.3.8 to work with apache 2.0.50 on Windows 2000. I followed the instruction that I found on http://de3.php.net/manual/en/install...ws.apache2.php. The files php4apache2.dll and php4ts.dll are located in "C:\Programme\PHP", together with the php.ini. In the php.ini, I have the entry ============================== extension_dir = "C:\Programme\PHP". ============================== In the httpd.conf, I inserted the following entries ============================== LoadModule php4_module "C:\Programme\PHP\php4apache2.dll" AddType application/x-httpd-php .php PHPIniDir "C:\Programme\PHP" ============================== When I start apache and go to the apache startup page (http://localhost:8080 in my case), everything is fine. When I insert the line http://localhost:8080/cgi-bin/index.php in the browser, I get an error. In the error log I have the following entry: [Sat Sep 18 11:28:52 2004] [error] [client 127.0.0.1] C:/Programme/Apache/Apache2/cgi-bin/index.php is not executable; ensure interpreted scripts have "#!" first line [Sat Sep 18 11:28:52 2004] [error] [client 127.0.0.1] (9)Bad file descriptor: don't know how to spawn child process: C:/Programme/Apache/Apache2/cgi-bin/index.php The index.php looks like this: ============================== <?php phpinfo(); ?> ============================== When I change the index.php like that ============================== #! <?php phpinfo(); ?> ============================== I get the following error: [Sat Sep 18 11:25:13 2004] [error] [client 127.0.0.1] (OS 193)%1 ist keine zulässige Win32-Anwendung. : couldn't create child process: 720193: index.php [Sat Sep 18 11:25:13 2004] [error] [client 127.0.0.1] (OS 193)%1 ist keine zulässige Win32-Anwendung. : couldn't spawn child process: C:/Programme/Apache/Apache2/cgi-bin/index.php [Sat Sep 18 11:25:48 2004] [error] [client 127.0.0.1] (OS 193)%1 ist keine zulässige Win32-Anwendung. : couldn't create child process: 720193: index.php [Sat Sep 18 11:25:48 2004] [error] [client 127.0.0.1] (OS 193)%1 ist keine zulässige Win32-Anwendung. : couldn't spawn child process: C:/Programme/Apache/Apache2/cgi-bin/index.php Apparently, apache is trying to execute the index.php as a CGI script with an external interpreter and not as an apache module. I went through the documentation of both apache and php, but that wasn´t successful, maybe because I do not know what I am looking for exactly. I know that the support of apache2 by PHP is experimental, but I believe that it should at least work? Are there any more hints about "hidden" parameters to be set to get the configuration successfully to work? I posted this message already on php.windows, but this group seems to be very rarely visited. Many thanks |
|
|||
|
Piet <Piet <pit.grinja@gmx.de>> wrote:
> Apparently, apache is trying to execute the index.php as a CGI script > with an external interpreter and not as an apache module. I went > through the documentation of both apache and php, but that wasn´t > successful, maybe because I do not know what I am looking for exactly. > I know that the support of apache2 by PHP is experimental, but I > believe that it should at least work? Everything in cgi-bin is considered as CGI script and therefore handled as one. Instead, put your PHP scripts in your normal htdocs, where your static files are and the scripts should work. -- Simon Stienen <http://dangerouscat.net> <http://slashlife.de> »What you do in this world is a matter of no consequence, The question is, what can you make people believe that you have done.« -- Sherlock Holmes in "A Study in Scarlet" by Sir Arthur Conan Doyle |
|
|||
|
Simon Stienen <simon.stienen@news.slashlife.de> wrote in message news:<saav9c7loz38$.dlg@news.dangerouscat.net>...
> Piet <Piet <pit.grinja@gmx.de>> wrote: > > Apparently, apache is trying to execute the index.php as a CGI script > > with an external interpreter and not as an apache module. I went > > through the documentation of both apache and php, but that wasn´t > > successful, maybe because I do not know what I am looking for exactly. > > I know that the support of apache2 by PHP is experimental, but I > > believe that it should at least work? > Everything in cgi-bin is considered as CGI script and therefore handled as > one. Instead, put your PHP scripts in your normal htdocs, where your static > files are and the scripts should work. That was the whole mistake...I don´t believe it. Many thanks Piet |