By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,939 Members | 1,684 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,939 IT Pros & Developers. It's quick & easy.

Error running shell script in php

P: 1
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
Share this Question
Share on Google+
2 Replies


Markus
Expert 5K+
P: 6,050
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

P: 50
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.