Tugger the SLUGger!SLUG Mailing List Archives

Re: Can't get output from passthru() in PHP. was Re: [SLUG] Can't get PHP4 to run on Debian

Jobst Schmalenbach wrote:
about Mikes problem
> > > <?php
> > > $command="cat myemail | spamfooler";
> > > echo ("Command is: $command");        <--- this is a test line
> > > passthru($command);
> > > echo " end";                          <-- test line
> > > ?>
> why not
> $rc = `$command`;
> echo $rc;

I tried that and it also gives no output.
ie echo 'Test $rc"; gives

I am expecting a long funny string. It works from the command line OK.
If I write a perl script called hello that JUST says print "hello"; and
`hello` I get no output. So its something to do with the script.
Permissions or executable status or something. Soething very very

If I get to to work OK I can give a little SLUGomatic 15min talk on what
it does :-

Michael Lake
University of Technology, Sydney
Email: mailto:Mike.Lake@xxxxxxxxxx Ph: 02 9514 1724 Fx: 02 9514 1628 
Linux enthusiast, active caver and interested in anything technical.

CRICOS Number:  00099F

This email message and any accompanying attachments may contain
confidential information.  If you are not the intended recipient, do not
read, use, disseminate, distribute or copy this message or attachments.
If you have received this message in error, please notify the sender
immediately and delete this message. Any views expressed in this message
are those of the individual sender, except where the sender expressly,
and with authority, states them to be the views the University of
Technology Sydney. Before opening any attachments, please check them for
viruses and defects.