|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12990 Problems with system/exec after upgrade
Submitted: 2001-08-28 02:42 UTC Modified: 2001-10-02 19:15 UTC
From: daniel at eldata dot se Assigned:
Status: Closed Package: Program Execution
PHP Version: 4.0.6 OS: Redhat 7.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
41 - 37 = ?
Subscribe to this entry?

 [2001-08-28 02:42 UTC] daniel at eldata dot se

Then we made a upgrade fr?n Redhat 7.0 and PHP 404 this syntax stopped to work. It keep tellning me that the command failed. 

        $Msg.="The command was successful.";
        $Msg.="Nope it didnt worked.";


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-08-28 04:51 UTC]
What does $cmd actually return?  system() returns the last line of output from the command, which will evaluate to false for things like "0" or "".  Try using exec() and printing the output from there if you are unsure. 
 [2001-08-28 05:53 UTC]
User replied:
The problem is that I used exec() before the update and it worked fine. I have another script that does the same thing that script doesnt work anymore either.

No other employee at my work have changed the file so the update is the only thing I can think of to blame.

Plenty of things changed, including a lot of stuff with Redhat 7.0 -> 7.1.  Did you recompile PHP after the upgrade?

Again, what does $cmd actually return?  Also, try :
   $line = system($cmd,$retvar);
   $msg = "system($cmd) --> $retvar, $line";
and tell me what it says
 [2001-10-02 19:15 UTC]
No feedback and not enough information.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Feb 25 11:01:27 2024 UTC