RE: RE: Re: [PHP] exec() Error

From: Date: Thu, 26 Jun 2008 13:55:08 +0000
Subject: RE: RE: Re: [PHP] exec() Error
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-275977@lists.php.net to get a copy of this message
> -----Original Message----- > From: Per Jessen [mailto:per@computer.org] > Sent: Thursday, June 26, 2008 1:11 AM > To: php-general@lists.php.net > Subject: RE: Re: [PHP] exec() Error > > Boyd, Todd M. wrote: > > >> > >> Well, "http://www.mysite.com/calculate.php" > >> is not an executable. > >> Try this instead: > >> > >> exec("php <path>/calculate.php"); > > > > I still don't think this is how exec() should be used when executing > > remote PHP scripts via HTTP, since the web server is not going to > give > > you the underlying code simply because you're calling the URL from > PHP > > and not your web browser. User-Agent tags do not a secure connection > > make. > > That's not what Alice asked for though. She did mention that a remote > call would be made somewhere, but her question was: > > >Has anyone tried using exec() successfully in PHP to execute files > from > >PHP or other programming languages? For example, C, Python, or Perl. > > And that works just fine using exec(). Well... if she was trying to execute *LOCAL* PHP code from within a PHP script that was already running (which she was not), why would you suggest that she use exec() instead of include()? I think the issue has been obfuscated. Nevertheless, she's on the right track to making her program do what she wants to. Win-win. Todd Boyd Web Programmer

« previous php.general (#275977) next »