[asterisk-users] AGI doesn't execute PHP5 script [SOLVED]

Stefan-Michael. Guenther (in-put GbR) asterisk at in-put.de
Wed Aug 9 02:13:19 MST 2006


Hi,

I have solved it (but don't understand yet, why it works)!!!

SuSE 10.1 uses different configuration files for the cli version and the cgi 
version of PHP5.

When I modify the first line in the script from 

#! /usr/bin/php5

to

#! /usr/bin/php5 -c /etc/php5/cli/

the php scripts gets executed! I guess I have to compare the parameters in the 
two configuration files to get the important detail.

>> AGI Tx >> agi_accountcode:
>> AGI Tx >> LI>
>>     -- AGI Script test.php completed, returning 0
>>     -- Executing Hangup("OSS/dsp", "") in new stack
>>  << Hangup on console >>
>>
>> And it doesn't make a difference whether I use the dial command or a sip 
>>phone
>> to call extension 111 in context [guenther]. Strange, isn't it?

>Yeah.  That response is usually when things are not happening properly.
>
Matt,  the ouput hasn't changed, although ist script is executed properly. Why 
do you thing that this output shows a failure?

>Also are you using php -q?
>
No, this isn't required for php5 (taken from README.CLI):

* CLI is started up in quiet mode by default.
  (-q switch kept for compatibility)

Thanks for your help and suggestions,

Stefan
-- 

********************************************
in-put GbR - Das Linux-Systemhaus
Stefan-Michael Guenther
Moltkestrasse 49     D-76133 Karlsruhe
Tel./Fax : +49 (0)721 / 83044 - 98/93
http://www.in-put.de
********************************************
     Schulungen  Installationen  
         Beratung   Support
      Voice over IP - Lösungen
********************************************



More information about the asterisk-users mailing list