php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33102 Can't run programs in safe_mode_exec_dir
Submitted: 2005-05-22 14:43 UTC Modified: 2005-07-05 01:00 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: php-bugs at jensthebrain dot de Assigned:
Status: No Feedback Package: Safe Mode/open_basedir
PHP Version: 4.3.11 OS: Windows 2003
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php-bugs at jensthebrain dot de
New email:
PHP Version: OS:

 

 [2005-05-22 14:43 UTC] php-bugs at jensthebrain dot de
Description:
------------
I can't execute binaries which are in safe_mode_exec_dir 
(safe_mode=on)   

Reproduce code:
---------------
<?php 
error_reporting(E_ALL); 
exec('d:\wwwroot\safe_bin\identify.exe', $ret, $error); 
print_r($ret); 
echo $error; 
?>

Expected result:
----------------
The output of identify.exe 

Actual result:
--------------
>d:\programme\php\php -d safe_mode=on -d 
safe_mode_exec_dir=d:/wwwroot/safe_bin/ d:
\wwwroot\www-test.xy.de\htdocs\test.php  
Der Befehl "d:/wwwroot/safe_bin/" ist entweder falsch 
geschrieben oder konnte nicht gefunden werden.  
Content-type: text/html  
Array  
(  
)  
1 
 
 
 
With \ instead of /  
>d:\programme\php\php -d safe_mode=on -d 
safe_mode_exec_dir=d:\wwwroot\safe_bin\ d:
\wwwroot\www-test.xy.de\htdocs\test.php  
Content-type: text/html  
Array  
(  
)  
0 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-05-22 15:28 UTC] tony2001@php.net
And what if you execute "d:/wwwroot/safe_bin/identify.exe" instead of "d:\wwwroot\safe_bin\identify.exe" ?
 [2005-05-22 16:23 UTC] php-bugs at jensthebrain dot de
The same:

<?php 
error_reporting(E_ALL);


exec('d:/wwwroot/safe_bin/identify.exe', $ret, $error);
print_r($ret);
echo $error;
?>


>d:\Programme\php\php -n -d safe_mode=on -d safe_mode_exec_dir=d:\wwwroot\safe_bin\ d:\wwwroot\www-test.xy.de\htdocs\test.php
Content-type: text/html
X-Powered-By: PHP/4.3.11

Array
(
)
0
 [2005-05-22 16:28 UTC] tony2001@php.net
No. Try when slashes in both safe_mode_exec_dir and the command are the same.
 [2005-05-22 16:38 UTC] php-bugs at jensthebrain dot de
Both with /

<?php 
error_reporting(E_ALL);


exec('d:/wwwroot/safe_bin/identify.exe', $ret, $error);
print_r($ret);
echo $error;
?>

>d:\Programme\php\php -n -d safe_mode=on -d safe_mode_exec_dir=d:/wwwroot/safe_bin/ d:\wwwroot\www-test.xy.de\htdocs\test.php
Die Syntax f?r den Dateinamen, Verzeichnisnamen oder die Datentr?gerbezeichnung ist falsch.
Content-type: text/html
X-Powered-By: PHP/4.3.11

Array
(
)
1


It seems that safe_mode_exec_dir with / causes problems: Die Syntax f?r den Dateinamen, Verzeichnisnamen oder die Datentr?gerbezeichnung ist falsch.
-> Syntax for filename, directoryname or partitionname is wrong
 [2005-06-27 20:46 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip


 [2005-07-05 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC