PHP 4.0 Bug #5679 Updated: PHP dies when call from Apache/CGI
| From: | Bug Database | Date: | Tue, 25 Jul 2000 13:39:48 +0000 |
| Subject: | PHP 4.0 Bug #5679 Updated: PHP dies when call from Apache/CGI | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-25988@lists.php.net to get a copy of this message | ||
ID: 5679
User Update by: werner.stegbauer@de.abb.com
Status: Open
Bug Type: Reproduceable crash
Description: PHP dies when call from Apache/CGI
Hi there, me again, some more comments on my problem
I have now something like the ultimate solution/workaround to the 'No input file
specified' problem!
I have done my homework and studied a little bit of PHP3 source code. I found that the environment
variables PATH_INFO and PATH_TRANSLATED play an important role when it comes to the above error
situation. In addition, I read a little CGI docu and found that Apache does not use these variables.
I decided to define these two variables before starting php and it worked out perfectly - on all
plattforms and with PHP3 and PHP4. So the wellknown PHP4 bug 'OleMainThreadWndName: ..
0x1007d14e' also dissapeared and PHP4 on NT runs perfectly.
I summarize my workaround:
1: Define in an HTML-Form as CGI-ACTION an NT batchfile, say od.bat.
2: od.bat containes these lines:
@echo off
set PATH_INFO=c:\apache\cgi-bin (i.e. your cgi-bin path)
set PATH_TRANSLATE=od.php3 (i.e. your cgi-bin script)
c:\primos\php3\php.exe (i.e. NO input file)
3: PHP3 comes up nicely and processes od.php3
If you omit the lines 'set PATH_..=' you will see the familar 'No input file
specified' from PHP3 and the accessvio from PHP4. On UNIX you write a script and use
setenv/export for 'set ..'.
That was it, Werner
Full Bug description available at: http://bugs.php.net/?id=5679