473,395 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 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 2094
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

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

Similar topics

3
by: Rob Ristroph | last post by:
I'm helping someone who is running a server with Debian testing, which only has PHP 4.2.3, not higher. He wants to run php from the command line, which I think is only supported starting with 4.3....
9
by: Erik Geiger | last post by:
Hi, sorry, my english ist not that got but I'll try. I have a running python script (capisuit incoming.py). This script shall start a linux shell script. If I start this script like...
7
by: Mark DuPrey | last post by:
I've got a script in an ASP page that is supposed to extract certain files from a zip file, move them, create a new zip with the moved files and then make a self-extracting archive out of the new...
5
by: Patrice FRITSCH | last post by:
I'm trying to run a batch file from an asp page using WScript.Shell object. Dim oWSH set oWSH= Server.CreateObject("WScript.Shell") call oWSH.Run("cmd.exe /c " & szCmd , 0, true) szCmd...
5
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As...
2
by: Curtiosity | last post by:
I have done a create or replace view called creditcard1. If I do a "select * from creditcard1" it retrieves the data just fine. If I try to do a statement where I am listing the column names it...
2
by: Michael George Lerner | last post by:
Hi, (Python 2.5, OS X 10.4.10) I have a program called pdb2pqr on my system. It is installed so that "pdb2pqr" is in my path and looks like: #\!/bin/zsh -f /sw/share/pdb2pqr/pdb2pqr.py "$@"...
2
by: smitanaik | last post by:
i have a java file which i am running through shell script. the syntax that i have used is #! /bin/bash javac Copy.java
11
by: LayneMitch via WebmasterKB.com | last post by:
Hello. This is a reference file from a book I read in which the core subject is the use of 'event listeners'. I'm trying to load the file in Firefox and it's giving me an error message: ...
2
by: kevinr | last post by:
Hi, I am brand new to VB, and I am trying to deploy Office 2007 on my network here at work. We used part of this script to do another deployment, and I have taken pieces and tried to edit for this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.