Re: passthru() passing variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, June 16, 2005 11:44 am, Chris Herold said:
> Thanks for the tips;  however, I think I am still missing something.
>
> My perl script is running when called by passthru() because within the
> body of the simple test code I have set it up to:
>
> <code>
> print "Content-type: text/html\n\n";
>
> print "Source ID: $source_id";
> </code>
>
> and when I run the php with the full address to my file (abbreviated
> here and before for brevity):
>
>
> $source_id = "test";
> passthru("/home/.../cgi-bin/passthru_test.cgi $source_id");
>
>
> it prints out
>
>     Content-type: text/html Source ID:
>
> Which is what I expect although missing the printout for the source_id
> value.

Is Perl set with that Tainted mode thing where it won't *LET* you use
arguments from the outside world unless you at least pretend to scrub
them?

To test, what happens when you run "text.cgi test" from the command line
without PHP in the picture?

> Re:Exec()
>
> I have tried exec and it does not seem to be working for me in terms of
> producing an error output.
>
> I set it up for:
>
> exec("/home/httpd/vhosts/omniomix.com/cgi-bin/passthru_test.cgi
> $source_id,$out,$err");
>
> and I get no printout at all.
>
> Is there something obvious that I am doing wrong?

exec won't print anything at all.

You have to take further action to print out $out and/or $err.

Also, move the quote at the end of $err to be after $source_id

As it is now, you are passing 2 more arguments with commas to your
Perl/cgi script, not  providing 2 more arguments to exec.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux