Reply to Re: exec returns -1

Your name:

Reply:


Posted by d on 04/16/06 17:43

"inetquestion" <inetquestion@hotmail.com> wrote in message
news:1145162738.962086.291750@v46g2000cwv.googlegroups.com...
> I've narrowed the code to a problem with php/iplanet on linux. When I
> run the following code from the command line "$status" comes back as
> "0" as it should. However when I hit it with a browser, status is "-1".
> Im guessing it has something to do with the way iplanet is invoking
> php, or how php was compiled. Oddly enough I have the same setup
> running on windows with php 4&5 and it always returns "0". Lucky for me
> I suppose... Anyone know how to fix this? Is it as simple as
> recompiling with additional options?
>
> You can view my results here: http://www.69camaro.us/test/go.php
>
> OS: fedora C4
> PHP: 4.4.2
> Iplanet: 6.1 sp5
>
> <?php
>
> $command='echo "hello world"';
> $results = array();
> $Output = exec($command, $results, $status);
>
> print " Output: $Output<br><br>";
> print "command: $command <br>";
> print "results: $results <br>";
> print " status: $status <br>";
>
> ?>

There is no reason to use eval. It's evil.

"If eval is the answer, you're asking the wrong question"

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация