calling php command line program from perl script

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sjhonny
Forum Newbie
Posts: 1
Joined: Mon Mar 14, 2005 10:10 am

calling php command line program from perl script

Post by sjhonny »

hi,
i'm trying to call a php command-line program from a perl script (like so:
open (PIPE,"/path/to/my_program.php $arg1 $arg2 |");
)
when i run this perl program myself, it works fine. however, when i call it
from within another program, i get only the HTML header (content type:
....).
(of course, the first line in my_program.php contains the -q option, and it
works perfectly when i call it myself)
i've experimented a bit, and found that the same output is produced even if
i replace the previous command with this one:
open (PIPE,"/usr/local/php5/bin/php -v |");
anybody got any clue?
thanks,
Jhonny
Post Reply