Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 2593 bytes Desc: not available Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20050620/a0fda201/attachment.jpeg
On 06:11, Mon 20 Jun 05, Jeromy Grimmett wrote:> hi all, > > im trying to get a php file to run thru AGI...but when i run it through > *....this is what i get.... > > i have the latest php installed ver. 5...had ver 4.3.11...but had this > problem so i figured an upgrade to the highest would resolve it... > > im running CVS Head and so far its worked great...we are attempting to use > ver 2 of the agiphp.php...which is why we upgraded to ver 4.3.11 in the > first place... > > i replaced the files in agi-bin with the latest versions, modified the > agiphp.conf, reloaded * and i THINK thats all i have to do... > > very new to all this...but...i think i have it right...:-S.... > > any help is appreciated.... > > -------------First few lines of my PHP------------------ > > #!/usr/bin/php -q > <?php > > > require "phpagi.php"; > $agi = new AGI(); >Hi, Get rid of the -q on the first line. That param should only be used when running the cgi version. And it looks like you are running the CLI version of php, and that one doesn't have a -q. Have fun Michiel van Baak> _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
Jeromy Grimmett wrote:> hi all, > > im trying to get a php file to run thru AGI...but when i run it through > *....this is what i get.... > > i have the latest php installed ver. 5...had ver 4.3.11...but had this > problem so i figured an upgrade to the highest would resolve it... > > im running CVS Head and so far its worked great...we are attempting to > use ver 2 of the agiphp.php...which is why we upgraded to ver 4.3.11 in > the first place... > > i replaced the files in agi-bin with the latest versions, modified the > agiphp.conf, reloaded * and i THINK thats all i have to do... > > very new to all this...but...i think i have it right...:-S.... > > any help is appreciated.... > > -------------First few lines of my PHP------------------ > > #!/usr/bin/php -q > <?php > > > require "phpagi.php"; > $agi = new AGI(); > > --------------CLI AGI Debug Output------------------- > > AGI Rx << Usage: php [options] [-f] <file> [args...] > AGI Tx >> 510 Invalid or unknown command > AGI Rx << php [options] -r <code> [args...] > AGI Tx >> 510 Invalid or unknown command > AGI Rx << php [options] [-- args...] > AGI Tx >> 510 Invalid or unknown command > AGI Rx << -a Run interactively > AGI Tx >> 510 Invalid or unknown command > AGI Rx << -c <path>|<file> Look for php.ini file in this directory > AGI Tx >> 510 Invalid or unknown command > AGI Rx << -n No php.ini file will be used > AGI Tx >> 510 Invalid or unknown command > AGI Rx << -d foo[=bar] Define INI entry foo with value 'bar' > AGI Tx >> 510 Invalid or unknown command > AGI Rx << -e Generate extended information for > debugger/profiler > AGI Tx >> 510 Invalid or unknown command > AGI Rx << -f <file> Parse <file>. > AGI Tx >> 510 Invalid or unknown command > AGI Rx << -h This help > AGI Tx >> 510 Invalid or unknown command > AGI Rx << -i PHP information > AGI Tx >> 510 Invalid or unknown command > AGI Rx << -l Syntax check only (lint) > AGI Tx >> 510 Invalid or unknown command > AGI Rx << -m Show compiled in modules > AGI Tx >> 510 Invalid or unknown command > AGI Rx << -r <code> Run PHP <code> without using script tags <?..?> > AGI Tx >> 510 Invalid or unknown command > AGI Rx << -s Display colour syntax highlighted source. > AGI Tx >> 510 Invalid or unknown command > AGI Rx << -v Version number > AGI Tx >> 510 Invalid or unknown command > AGI Rx << -w Display source with stripped comments and > whitespace. > AGI Tx >> 510 Invalid or unknown command > AGI Rx << -z <file> Load Zend extension <file>. > AGI Tx >> 510 Invalid or unknown command > AGI Rx << > AGI Tx >> 510 Invalid or unknown command > AGI Rx << args... Arguments passed to script. Use -- args > when first argument > AGI Tx >> 510 Invalid or unknown command > AGI Rx << starts with - or script is read from stdin > AGI Tx >> 510 Invalid or unknown command > > <http://www.comuniquemonos.com/> Global reach, local touch... > >Run your PHP script from command line and see what errors it contains. Seems like it does. -Matthew
Looks familiar. Since AGI files are hash-banged, try to run it from shell. If it still fails, check the file for windows-style LF/CR and correct the file-format. -----Original Message----- From: Jeromy Grimmett [mailto:jeromy@voipempire.com] Sent: Monday, June 20, 2005 6:11 AM To: 'Asterisk Users Mailing List - Non-Commercial Discussion' Subject: [Asterisk-Users] AGI/PHP errors hi all, im trying to get a php file to run thru AGI...but when i run it through *....this is what i get.... i have the latest php installed ver. 5...had ver 4.3.11...but had this problem so i figured an upgrade to the highest would resolve it... im running CVS Head and so far its worked great...we are attempting to use ver 2 of the agiphp.php...which is why we upgraded to ver 4.3.11 in the first place... i replaced the files in agi-bin with the latest versions, modified the agiphp.conf, reloaded * and i THINK thats all i have to do... very new to all this...but...i think i have it right...:-S.... any help is appreciated.... -------------First few lines of my PHP------------------ #!/usr/bin/php -q <?php require "phpagi.php"; $agi = new AGI(); --------------CLI AGI Debug Output------------------- AGI Rx << Usage: php [options] [-f] <file> [args...] AGI Tx >> 510 Invalid or unknown command AGI Rx << php [options] -r <code> [args...] AGI Tx >> 510 Invalid or unknown command AGI Rx << php [options] [-- args...] AGI Tx >> 510 Invalid or unknown command AGI Rx << -a Run interactively AGI Tx >> 510 Invalid or unknown command AGI Rx << -c <path>|<file> Look for php.ini file in this directory AGI Tx >> 510 Invalid or unknown command AGI Rx << -n No php.ini file will be used AGI Tx >> 510 Invalid or unknown command AGI Rx << -d foo[=bar] Define INI entry foo with value 'bar' AGI Tx >> 510 Invalid or unknown command AGI Rx << -e Generate extended information for debugger/profiler AGI Tx >> 510 Invalid or unknown command AGI Rx << -f <file> Parse <file>. AGI Tx >> 510 Invalid or unknown command AGI Rx << -h This help AGI Tx >> 510 Invalid or unknown command AGI Rx << -i PHP information AGI Tx >> 510 Invalid or unknown command AGI Rx << -l Syntax check only (lint) AGI Tx >> 510 Invalid or unknown command AGI Rx << -m Show compiled in modules AGI Tx >> 510 Invalid or unknown command AGI Rx << -r <code> Run PHP <code> without using script tags <?..?> AGI Tx >> 510 Invalid or unknown command AGI Rx << -s Display colour syntax highlighted source. AGI Tx >> 510 Invalid or unknown command AGI Rx << -v Version number AGI Tx >> 510 Invalid or unknown command AGI Rx << -w Display source with stripped comments and whitespace. AGI Tx >> 510 Invalid or unknown command AGI Rx << -z <file> Load Zend extension <file>. AGI Tx >> 510 Invalid or unknown command AGI Rx << AGI Tx >> 510 Invalid or unknown command AGI Rx << args... Arguments passed to script. Use -- args when first argument AGI Tx >> 510 Invalid or unknown command AGI Rx << starts with - or script is read from stdin AGI Tx >> 510 Invalid or unknown command Global reach, local touch... Jeromy Grimmett CEO Comuniqu?monos, Inc. / SA 1212 South Hampton Drive Alexandria, LA 71301 jeromy@comuniquemonos.com IM: MSN: jeromy@comuniquemonos.com http://www.comuniquemonos.com tel: fax: mobile: +593 (4) 287 3854 (501) 646-0680 +593 (9) 366 6521 Add me to your address book...Want a signature like this?