Linux Today: Linux News On Internet Time.

More on LinuxToday

Asterisk Gateway Interface Scripting with PHP

Jan 28, 2009, 04:04 (0 Talkback[s])

[ Thanks to Ramsai Karri for this link. ]

Most Linux distributions include both versions of PHP when installed, especially if you are using a modern distribution such as CentOS or Mandriva. When writing AGI scripts with PHP, it is imperative that you use PHP-CLI, and not PHP-CGI.

"Why is this so important? The main issue is that PHP-CLI and PHP-CGI handle their STDIN (standard input) slightly differently, which makes the reading of channel variables via PHP-CGI slightly more problematic.

"The php.ini configuration file
The PHP interpreter includes a configuration file that defines a set of defaults for the interpreter. For your scripts to work in an efficient manner, the following must be set—either via the php.ini file, or by your PHP script:

error_log = filename;

Complete Story

Related Stories: