[PHP] How to get exec() to display output from UNIX Shell Environemnt?
Hi! How do I get the php function exec() to spit out the data from the Unix Shell Environment onto the webpage? I mean, I can create a script in bash shell environment using the terminal on the Unix machine and it would spit out the background information from the O/S along with the shell script. I can do that with cURL. So, for the PHP, I would need to use exec() but it only executed the script without a problem but no shell output from the unix shell onto the webpage. How can I do that? It is very helpful for troubleshooting purpose. Thanks, Scott F. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to get exec() to display output from UNIX Shell Environemnt?
I have read the manual but haven't seen anything that work with system, passthru, exec for this command code. Here's the example that I use for exec() and curl with one example script and it work. --snip-- exec(curl -d \$XP_ECALS_STR\ 21 .TARGET_URL, $result_array, $res_code); --snip-- But with this one, it doesn't work. As you can see, this is not really much different from the 1st example. --snip-- exec(curl -u \$BASIC_AUTH\ -d \$XML_REQ_STR\ 21 .TARGET_URL, $result_array, $res_code); --snip-- Thanks, Scott F. Reuben D. Budiardja [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Tuesday 05 August 2003 05:20 pm, Scott Fletcher wrote: Hi! How do I get the php function exec() to spit out the data from the Unix Shell Environment onto the webpage? I mean, I can create a script in bash shell environment using the terminal on the Unix machine and it would spit out the background information from the O/S along with the shell script. I can do that with cURL. So, for the PHP, I would need to use exec() but it only executed the script without a problem but no shell output from the unix shell onto the webpage. How can I do that? It is very helpful for troubleshooting purpose. Use the second argument of exec(), or use system(), depending on your need. Read The Manual for exec() and system(). It's pretty clear. RDB -- - /\ ASCII Ribbon Campaign against HTML \ / email and proprietary format X attachments. / \ - Have you been used by Microsoft today? Choose your life. Choose freedom. Choose LINUX. - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to get exec() to display output from UNIX Shell Environemnt?
On Tuesday 05 August 2003 05:20 pm, Scott Fletcher wrote: Hi! How do I get the php function exec() to spit out the data from the Unix Shell Environment onto the webpage? I mean, I can create a script in bash shell environment using the terminal on the Unix machine and it would spit out the background information from the O/S along with the shell script. I can do that with cURL. So, for the PHP, I would need to use exec() but it only executed the script without a problem but no shell output from the unix shell onto the webpage. How can I do that? It is very helpful for troubleshooting purpose. Use the second argument of exec(), or use system(), depending on your need. Read The Manual for exec() and system(). It's pretty clear. RDB -- - /\ ASCII Ribbon Campaign against HTML \ / email and proprietary format X attachments. / \ - Have you been used by Microsoft today? Choose your life. Choose freedom. Choose LINUX. - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php