VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
tilghman at mail.jeffa... Guest
|
Posted: Mon Mar 24, 2008 11:28 am Post subject: [asterisk-users] Getting Exec Format Error when running AGI |
|
|
On Monday 24 March 2008 04:02, mark morreny wrote:
Quote: | Dear friends,
I am having problem with running a sample php and I can't figure out why.
I can run the sample.php using CLI but when I run it inside the dialplan it
does not work. Can someone please suggest the config problem that I may
have made?
dommy:/var/lib/asterisk/agi-bin# php sample.php
#!/usr/bin/php5 -q
|
There seems to be an extra space at the beginning of the topmost line.
Quote: | AGI Rx << verbose "Failed to execute
'/var/lib/asterisk/agi-bin/sample.agi': Exec format error" 2
== sample.agi: Failed to execute '/var/lib/asterisk/agi-bin/sample.agi':
Exec format error
AGI Tx >> 200 result=1
-- AGI Script sample.agi completed, returning 0
|
Either that space is the issue or else you've failed to set the execute bit in
the permissions on that file (chmod 755 sample.php).
--
Tilghman |
|
Back to top |
|
|
davies147 at gmail.com Guest
|
Posted: Tue Mar 25, 2008 5:21 am Post subject: [asterisk-users] Getting Exec Format Error when running AGI |
|
|
Alternatively...
On 24/03/2008, Tilghman Lesher <tilghman at mail.jeffandtilghman.com> wrote:
Quote: | On Monday 24 March 2008 04:02, mark morreny wrote:
Quote: | Dear friends,
I am having problem with running a sample php and I can't figure out why.
I can run the sample.php using CLI but when I run it inside the dialplan it
does not work. Can someone please suggest the config problem that I may
have made?
dommy:/var/lib/asterisk/agi-bin# php sample.php
|
|
Here you use an interpreter called "php"
Quote: | Quote: | #!/usr/bin/php5 -q
|
|
Here you use an interpreter called "php5"
I assume you have verified that /usr/bin/php5 does exist on your system?
Cheers,
Steve |
|
Back to top |
|
|
jra at baylink.com Guest
|
Posted: Wed Mar 26, 2008 10:34 am Post subject: [asterisk-users] Getting Exec Format Error when running AGI |
|
|
On Tue, Mar 25, 2008 at 06:31:50PM +0800, mark morreny wrote:
Quote: | Yes, it is that silly space!!! Thanks for all your help.
|
The origin of the she-bang, the
#!/usr/bin/whatever
command interpreted by the general loader on most *nixes, is that it
was a magic number, just like the ones on binary files, and that was
what the loader used to decide how to run it.
That's why you can get some pretty odd errors, like this one, from
screwing up that particular bit o' syntax.
Cheers,
-- jra
--
Jay R. Ashworth Baylink jra at baylink.com
Designer The Things I Think RFC 2100
Ashworth & Associates http://baylink.pitas.com '87 e24
St Petersburg FL USA http://photo.imageinc.us +1 727 647 1274
Those who cast the vote decide nothing.
Those who count the vote decide everything.
-- (Joseph Stalin) |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|