[asterisk-users] Getting Exec Format Error when running AGI call
Tilghman Lesher
tilghman at mail.jeffandtilghman.com
Mon Mar 24 11:28:11 CDT 2008
On Monday 24 March 2008 04:02, mark morreny wrote:
> 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.
> 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
More information about the asterisk-users
mailing list