Re: Bug #12990 Updated: Problems with system/exec after upgrade

From: Date: Wed, 29 Aug 2001 06:57:20 +0000
Subject: Re: Bug #12990 Updated: Problems with system/exec after upgrade
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-64562@lists.php.net to get a copy of this message
system(); doesn´t return anything and PHP was recompiled during the upgrade. Can it be that some path has changed? /Daniel O At 09:53 2001-08-28 +0000, you wrote:
ID: 12990 Updated by: lyric Reported By: daniel@eldata.se Status: Feedback Bug Type: Program Execution Operating System: Redhat 7.1 PHP Version: 4.0.6 New Comment: 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 Previous Comments: ------------------------------------------------------------------------ [2001-08-28 04:51:04] lyric@php.net 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 02:42:30] daniel@eldata.se Hello 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.
      if(system($cmd))
        $Msg.="The command was successful.";
      else
        $Msg.="Nope it didnt worked.";
------------------------------------------------------------------------ ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=12990&edit=2
---- Daniel Olsson, E-ell-Data, http://www1.eldata.se daniel@eldata.se, +46 150 66 5000, +46 (0)736 - 266 105 Köpmangatan 14, 641 30 Katrineholm, SWEDEN

« previous php.dev (#64562) next »