469,270 Members | 1,764 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

Error running shell script in php

i have some problem to shell script using php...
my script is file is a.sh:::
Expand|Select|Wrap|Line Numbers
  1. #!/bin/sh
  2.  
  3. echo "ATZ0" > /dev/ttyACM0    
  4. echo "AT+CSCA?" > /dev/ttyACM0  
  5. echo "AT+CMGF=1" > /dev/ttyACM0  
  6. echo "AT+CNMI=2,1" > /dev/ttyACM0      
  7. echo "AT+CMGS=\"09924927267\"" > /dev/ttyACM0 
  8. echo "hello\32" > /dev/ttyACM0
  9.  
and my php file is index.php::
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. exec("./a.sh");
  3.  
  4. ?>
  5.  
i cant run this script...pls help me with this
Mar 13 '10 #1
2 1972
Markus
6,050 Expert 4TB
What do you mean "can't run this script"? What happens? What doesn't happen? What errors do you receive? Have you got error_reporting($level) turned on?
Mar 14 '10 #2
Umm your not echoing the output?

Expand|Select|Wrap|Line Numbers
  1. echo exec("./a.sh");
  2.  
Mar 16 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Rob Ristroph | last post: by
11 posts views Thread by LayneMitch via WebmasterKB.com | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.