#47582 [NEW]: system(), passthru() do not work online, but work with command line
| From: | liangc dot mu at gmail dot com | Date: | Thu, 05 Mar 2009 22:34:40 +0000 |
| Subject: | #47582 [NEW]: system(), passthru() do not work online, but work with command line | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-134451@lists.php.net to get a copy of this message | ||
From: liangc dot mu at gmail dot com
Operating system: RedHat Enterprise 5.2
PHP version: 5.2.9
PHP Bug Type: *General Issues
Bug description: system(), passthru() do not work online, but work with command line
Description:
------------
Basically, my test.php contains:
<?php
#$cmd="/usr/local/genome/gmap/gmap-2009-02-04/bin/gmap -v";
$cmd="/usr/local/genome/gmap/gmap-2009-02-04/bin/gmap -d
oryza_sativa_rap_4 -n 1000 -k 2000 -A -B 2 sample_chlamy.fasta.valid
>out";
system($cmd,$exeReturn);
#exec($cmd);
echo $cmd."<br/>";
echo $exeReturn."<br/>";
?>
(1) In command line, when I type "php test.php", I met success in
executing the gmap program and get the out result.
(2) However, through the web server, the system command is always not
executed.
I have another server that have the identical settings (such as the
same httpd.conf, php.ini), the test.php code can be executed
through the Internet and the command line.
Reproduce code:
---------------
<?php
#$cmd="/usr/local/genome/gmap/gmap-2009-02-04/bin/gmap -v";
$cmd="/usr/local/genome/gmap/gmap-2009-02-04/bin/gmap -d
oryza_sativa_rap_4 -n 1000 -k 2000 -A -B 2 sample_chlamy.fasta.valid
>out";
system($cmd,$exeReturn);
#exec($cmd);
echo $cmd."<br/>";
echo $exeReturn."<br/>";
?>
--
Edit bug report at http://bugs.php.net/?id=47582&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47582&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47582&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47582&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=47582&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47582&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=47582&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=47582&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=47582&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=47582&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=47582&r=support
Expected behavior: http://bugs.php.net/fix.php?id=47582&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=47582&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=47582&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=47582&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47582&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=47582&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=47582&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=47582&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=47582&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=47582&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=47582&r=mysqlcfg