472,101 Members | 1,471 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,101 software developers and data experts.

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 2048
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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.