Re: Running CLI from a web page

From: Date: Mon, 10 Nov 2003 23:56:25 +0000
Subject: Re: Running CLI from a web page
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-169101@lists.php.net to get a copy of this message
There are already plenty of echo statements in foo! They DO show up when I run php foo. It's when I try to use system("php foo") that I don't get anything. "Jay Blanchard" <jay.blanchard@niicommunications.com> wrote in message news:C8F323573C030A448F3E5A2B6FE2070B01AFAA88@nemesis... [snip] I have a php cli that creates a file. It works fine when I execute it from the Linux command line as "php foo > bar". I'm trying to also execute this by clicking a form button on a web page via "system('php foo > bar')". I can see that the file bar gets created but it's always empty. I've tried executing "system('php foo')" (directly to STDOUT) but get no output. I've tried "exec('php foo',$output)" but there's nothing in the array when it's done. Suggestions??? [/snip] Put something in script foo that will echo out some information echo "foo is running\n"; and then run it from the command line. If that works then run it from your form.

« previous php.general (#169101) next »