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 _______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
