From:             markus at cultcom dot de
Operating system: Linux 2.4.x
PHP version:      4.3.8
PHP Bug Type:     Filesystem function related
Bug description:  is_executable does not honor the safe_mode!

Description:
------------
Seems to be a common problem nobody complains about...
"is_executable()" does not work in safe_mode!

Some PHP-Projects check for sendmail using this function and don't work in
safe_mode even if sendmail acutally IS executable (i.e. PEAR: Mail.php).

is_executable() should at least honor the safe_mode_exec_dir directive!

Reproduce code:
---------------
<?php
if( is_executable( "/usr/sbin/sendmail" ) ) {
   print ("no probs!\n");
}
else {
   print ("this really sucks!\n");
}
?>

Try with PHP/CGI and suexec + safe_mode
where example-UID != sendmail-UID


Expected result:
----------------
true, what else?

Actual result:
--------------
false.

-- 
Edit bug report at http://bugs.php.net/?id=29840&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=29840&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29840&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29840&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=29840&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=29840&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=29840&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=29840&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=29840&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=29840&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=29840&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=29840&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=29840&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=29840&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=29840&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=29840&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=29840&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=29840&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=29840&r=float

Reply via email to