ID:               21261
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Feedback
 Bug Type:         Scripting Engine problem
 Operating System: linux 2.4.18 - slack 8.1
 PHP Version:      4.3.0
 New Comment:

I have a theory, but I need you to run one more test:

1) Create a CGI shell script "/var/www/htdocs/shenv.sh" with the
following content:

#!/bin/sh
set


2) Be sure to chmod it so that it can be executed by the webserver then
browse to it (i.e.: http://localhost/shenv.php )

Post the results here.


My theory is that Apache is not setting the CGI environment variables
"SCRIPT_NAME" or "PATH_INFO" correctly.  But I can at least tell you
one thing for sure...  The "ocs" in "ocs/env.php" is comming from the
last three characters in the file's true path "/var/www/htdocs/env.php"


Previous Comments:
------------------------------------------------------------------------

[2002-12-29 14:05:27] [EMAIL PROTECTED]

A strace dump for the following page content:     
<?php    
echo $_SERVER['PHP_SELF'];     
?>     
called from url: http://localhost/test.php can be found    
at: http://www.undream.com/php/bug-21261.log   
The PHP_SELF result for that one was :PHP/4.3.0 
 
I also have a phpinfo dump of my setup at:  
http://www.undream.com/php/env.html 
This last one was called using http://localhost/env.php 
url. As you can see, the PHP_SELF result is equally weird.

------------------------------------------------------------------------

[2002-12-28 22:51:32] [EMAIL PROTECTED]

1) What webserver are you running? (and what version?)

2) Since you are running as a CGI can you please do an strace on this
page?

Example (correct the file paths as necessary, you may need to install
strace first):

strace /usr/local/bin/php -f /var/www/env.php 2>
/var/www/bug-21261.log

Provide a URL to this strace so that the problem can be further
diagnosed.

------------------------------------------------------------------------

[2002-12-28 22:05:09] [EMAIL PROTECTED]

A call to http://localhost/env.php  with env.php  
containing a phpinfo() call returns this for  
$_SERVER['PHP_SELF'] = ocs/env.php  
 
I have no idea what 'ocs' is. This is run on a Konqueror 
3.1 browser. PHP is ran as CGI. Previous php (4.2.3) 
compiled using the _exact_ same setup gives the correct 
info (localhost/env.php)  

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=21261&edit=1

Reply via email to