I am not finding anything relating to this on Google, so I thought I'd pose the question here... I am running Asterisk 1.4 on a CentOS 5 Linux box. I needed to use a custom built PHP5.2.10 install to interconnect with our Firebird SQL database, which I've done. But I noticed that the default install path for PHP5 on this box appears to be /usr/local/bin/php rather than the path that the default PHP5.16 path of /usr/bin/php. To be certain that the correct PHP binaries are being called, is there a conf setting somewhere that I can tell Asterisk AGI where the PHP binary is that I want to use for this? I noticed that most AGI PHP scripts begin with: #!/usr/bin/php -q which I would assume I simply need to change to: #!/usr/local/bin/php -q for my build, but is this enough? Is there somewhere else that needs to be updated in order for AGI to correctly find the PHP build I've done? Myles P.S. I did try and change the PHP configure options to install in /usr/bin but that didn't work because it won't install the man pages and headers in there for some reason. But its installing fine in /usr/local/bin which appears to be its default install location anyway, so I'd prefer to go with that and keep this simple if I can. -- ======================Myles Wakeham Director of Engineering Tech Solutions USA, Inc. Scottsdale, Arizona USA http://www.techsolusa.com Phone +1-480-451-7440
On 6 Aug 2009, at 15:21, Myles Wakeham wrote:> #!/usr/bin/php -q > > which I would assume I simply need to change to: > > #!/usr/local/bin/php -q > > for my build, but is this enough?You could always test it..
On Thu, 6 Aug 2009, Myles Wakeham wrote:> I am running Asterisk 1.4 on a CentOS 5 Linux box. I needed to use a > custom built PHP5.2.10 install to interconnect with our Firebird SQL > database, which I've done. But I noticed that the default install path > for PHP5 on this box appears to be /usr/local/bin/php rather than the > path that the default PHP5.16 path of /usr/bin/php. > > To be certain that the correct PHP binaries are being called, is there a > conf setting somewhere that I can tell Asterisk AGI where the PHP binary > is that I want to use for this? I noticed that most AGI PHP scripts > begin with:There is no conf setting. Asterisk does not know nor care what language you write your AGI in, as long as you follow the AGI protocol.> #!/usr/bin/php -q > > which I would assume I simply need to change to: > > #!/usr/local/bin/php -qThis should work. Did you try it? -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000
Steve writes: >> #!/usr/bin/php -q > > > > which I would assume I simply need to change to: > > > > #!/usr/local/bin/php -q >This should work. Did you try it? Yes, its working fine. The only problem is that when I went to 'uninstall' the standard PHP installation that came with CentOS 5 on this box, it de-registered PHP from executing correctly but left all the old files still in place. So when I re-installed a new PHP build, I can't see what version is actually running from AGI. I'll get AGI to do a phpinfo() call and see if I can pipe the results to a file so I can see what is going on here. From what I can tell, however, it would appear that the php executable at /usr/local/bin is running.... I was just hopeful that a conf setting somewhere could tell AGI what language/host is to be used for executing its calls. But if I can rely on the #! setting in the file, that's good enough for me. Myles -- ======================Myles Wakeham Director of Engineering Tech Solutions USA, Inc. Scottsdale, Arizona USA http://www.techsolusa.com Phone +1-480-451-7440