ID:               21154
 Comment by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Open
 Bug Type:         Other web server
 Operating System: mac osx
 PHP Version:      4.3.0RC4
 New Comment:

I should note that the cgi and cli are both being run by 
hand from a shell (not exec'd from a webserver).


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

[2002-12-22 21:31:12] [EMAIL PROTECTED]

<?php
print_r($_SERVER);
?>

returns:

22:28:26(george@ool-18bced28)[~/Advanced PHP/examples]> php 
a.php               
Content-type: text/html                                                
        
X-Powered-By: PHP/4.3.0-dev                                            
        
                                                                       
        
Array                                                                  
        
(                                                                      
        
    [HOME] => /Users/george                                            
        
    [SHELL] => /bin/tcsh                                               
        
    [USER] => george                                                   
        
    [LANG] => en                                                       
        
    [PATH] => /sw/bin:/sw/sbin:/bin:/usr/bin:/Users/george/
bin:/usr/sbin:/opt/GN
Upgcc/bin:/opt/GNUxemacs/bin:/usr/local/bin:/usr/local/
sbin:/usr/openwin/bin:/us
r/dt/bin:/usr/ccs/bin:/usr/proc/bin:/usr/ucb:/usr/X11R6/
bin:/sw/bin:/sw/sbin:.:/
usr/X11R6/bin                                                          
        
    [__CF_USER_TEXT_ENCODING] => 0x1F5:0:0                             
        
    [TERM] => vt100                                                    
        
    [PWD] => /Users/george/Advanced PHP/examples                       
        
    [HOSTTYPE] => macintosh                                            
        
    [VENDOR] => apple                                                  
        
    [OSTYPE] => darwin                                                 
        
    [MACHTYPE] => powerpc                                              
        
    [SHLVL] => 1                                                       
        
    [LOGNAME] => george                                                
        
    [GROUP] => staff                                                   
        
    [HOST] => ool-18bced28.dyn.optonline.net                           
        
    [HOSTTAG] => maya [Omniti/mobile]                                  
        
    [MANPATH] => /usr/share/man:/usr/openwin/share/man:/
usr/man:/usr/local/man:/
opt/SUNWwabi/man:/usr/local/lib/perl5/man:/opt/GNUpgcc/
man:/opt/GNUxemacs/man   
    [INFOPATH] => /sw/share/info:/sw/info:/usr/local/share/
info:/usr/local/lib/i
nfo:/usr/local/info:/usr/share/info                                    
        
    [PERL5LIB] => /sw/lib/perl5                                        
        
    [EDITOR] => vi                                                     
        
    [VISUAL] => vi                                                     
        
    [DISPLAY] => :0.0                                                  
        
    [CVS_RSH] => ssh                                                   
        
    [OPENWINHOME] => /usr/openwin                                      
        
    [XFILESEARCHPATH] => /usr/dt/lib/%T/%N%S                           
        
    [XGLHOME] => /opt/SUNWits/Graphics-sw/xgl                          
        
    [LD_LIBRARY_PATH] => /usr/lib:/usr/dt/lib:/usr/openwin/
lib:/usr/ucblib:/usr/
local/lib:.                                                            
        
    [XILHOME] => /opt/SUNWits/Graphics-sw/xil                          
        
    [MOTIFHOME] => /usr/dt                                             
        
    [UIDPATH] => /opt/SUNWmfdm                                         
        
    [XMBINDDIR] => /usr/dt/lib/bindings                                
        
    [GUIDEHOME] => /opt/SUNWguide                                      
        
    [PHP_SELF] =>                                                      
        
    [argv] => Array                                                    
        
        (                                                              
        
            [0] => a.php                                               
        
        )                                                              
        
                                                                       
        
    [argc] => 1                                                        
        
)         

note PHP_SELF is unset.  Running the same under cli yields 
correct result:

22:31:00(george@ool-18bced28)[~/Advanced PHP/examples]> ~/
src/php4-STABLE-200212
210230/sapi/cli/php ~/Advanced\ PHP/examples/a.php                     
        
Array                                                                  
        
(                                                                      
        
    [HOME] => /Users/george                                            
        
    [SHELL] => /bin/tcsh                                               
        
    [USER] => george                                                   
        
    [LANG] => en                                                       
        
    [PATH] => /sw/bin:/sw/sbin:/bin:/usr/bin:/Users/george/
bin:/usr/sbin:/opt/GN
Upgcc/bin:/opt/GNUxemacs/bin:/usr/local/bin:/usr/local/
sbin:/usr/openwin/bin:/us
r/dt/bin:/usr/ccs/bin:/usr/proc/bin:/usr/ucb:/usr/X11R6/
bin:/sw/bin:/sw/sbin:.:/
usr/X11R6/bin                                                          
        
    [__CF_USER_TEXT_ENCODING] => 0x1F5:0:0                             
        
    [TERM] => vt100                                                    
        
    [PWD] => /Users/george/Advanced PHP/examples                       
        
    [HOSTTYPE] => macintosh                                            
        
    [VENDOR] => apple                                                  
        
    [OSTYPE] => darwin                                                 
        
    [MACHTYPE] => powerpc                                              
        
    [SHLVL] => 1                                                       
        
    [LOGNAME] => george                                                
        
    [GROUP] => staff                                                   
        
    [HOST] => ool-18bced28.dyn.optonline.net                           
        
    [HOSTTAG] => maya [Omniti/mobile]                                  
        
    [MANPATH] => /usr/share/man:/usr/openwin/share/man:/
usr/man:/usr/local/man:/
opt/SUNWwabi/man:/usr/local/lib/perl5/man:/opt/GNUpgcc/
man:/opt/GNUxemacs/man   
    [INFOPATH] => /sw/share/info:/sw/info:/usr/local/share/
info:/usr/local/lib/i
nfo:/usr/local/info:/usr/share/info                                    
        
    [PERL5LIB] => /sw/lib/perl5                                        
        
    [EDITOR] => vi                                                     
        
    [VISUAL] => vi                                                     
        
    [DISPLAY] => :0.0                                                  
        
    [CVS_RSH] => ssh                                                   
        
    [OPENWINHOME] => /usr/openwin                                      
        
    [XFILESEARCHPATH] => /usr/dt/lib/%T/%N%S                           
        
    [XGLHOME] => /opt/SUNWits/Graphics-sw/xgl                          
        
    [LD_LIBRARY_PATH] => /usr/lib:/usr/dt/lib:/usr/openwin/
lib:/usr/ucblib:/usr/
local/lib:.                                                            
        
    [XILHOME] => /opt/SUNWits/Graphics-sw/xil                          
        
    [MOTIFHOME] => /usr/dt                                             
        
    [UIDPATH] => /opt/SUNWmfdm                                         
        
    [XMBINDDIR] => /usr/dt/lib/bindings                                
        
    [GUIDEHOME] => /opt/SUNWguide                                      
        
    [PHP_SELF] => /Users/george/Advanced PHP/examples/a.php            
        
    [SCRIPT_NAME] => /Users/george/Advanced PHP/examples/
a.php                  
    [SCRIPT_FILENAME] => /Users/george/Advanced PHP/
examples/a.php              
    [PATH_TRANSLATED] => /Users/george/Advanced PHP/
examples/a.php              
    [DOCUMENT_ROOT] =>                                                 
        
    [argv] => Array                                                    
        
        (                                                              
        
            [0] => /Users/george/Advanced PHP/examples/
a.php                    
        )                                                              
        
                                                                       
        
    [argc] => 1                                                        
        
)   



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


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

Reply via email to