From:             RQuadling at GMail dot com
Operating system: Windows XP SP3
PHP version:      5.3SVN-2009-11-23 (SVN)
PHP Bug Type:     Unknown/Other Function
Bug description:  Windows hard coding of CMD / COMMAND.COM rather than 
envvar(COMSPEC)

Description:
------------
In http://lxr.php.net/source/TSRM/tsrm_win32.c#52, the shell to execute is
hardcoded.

This should be retrieved via GetEnvironmentVariable('COMSPEC', ...);

As such, any program called cmd.exe (or command.com for older, and now
unsupported by PHP, versions of windows) in a directory accessible via the
PATH _before_ the actual location of cmd.exe/command.com will be loaded for
the shell.

The environment variable "COMSPEC" (now known as "ComSpec", but is case
insensitive for Windows) by default includes the path.

Whilst this is not a series bug, it does mean PHP conforms to other
languages and applications that can invoke a console shell via COMSPEC,
rather than using a hard-coded name.


Considering that PHP doesn't support older versions of windows any longer,
the whole test on GetVersion() is also redundant.






-- 
Edit bug report at http://bugs.php.net/?id=50271&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=50271&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=50271&r=trysnapshot53
Try a snapshot (PHP 6.0):            
http://bugs.php.net/fix.php?id=50271&r=trysnapshot60
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=50271&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=50271&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=50271&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=50271&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=50271&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=50271&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=50271&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=50271&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=50271&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=50271&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=50271&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=50271&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=50271&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=50271&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=50271&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=50271&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=50271&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=50271&r=mysqlcfg

Reply via email to