php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47582 system(), passthru() do not work online, but work with command line
Submitted: 2009-03-05 22:34 UTC Modified: 2009-03-06 10:42 UTC
From: liangc dot mu at gmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.2.9 OS: RedHat Enterprise 5.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: liangc dot mu at gmail dot com
New email:
PHP Version: OS:

 

 [2009-03-05 22:34 UTC] liangc dot mu at gmail dot com
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/>";

?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-03-06 10:42 UTC] jani@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Dec 01 09:00:01 2025 UTC