[Asterisk-Users] Is there a right place for a include_oncestatement in a PHP AGI script?

Chris Thompson chris at flamegreen.com
Fri Aug 5 07:53:59 MST 2005


agree with all written below - additionally use php -l  to lint/check the 
syntax of the file (and the include)

if needed - do a include_once 'bleh.php || die "some message";

to see if thats an issue.

my $0.02
----- Original Message ----- 
From: "Moises Silva" <moises.silva at gmail.com>
To: "Asterisk Users Mailing List - Non-Commercial Discussion" 
<asterisk-users at lists.digium.com>
Sent: Friday, August 05, 2005 3:49 PM
Subject: Re: [Asterisk-Users] Is there a right place for a 
include_oncestatement in a PHP AGI script?


its kind of difficult to say if we dont know what the included php script 
has.

i think that the wrap function that Christoph propouse it may work for
debuggin purposes, but i dont think it will solve the problem. Until
you tell us, or show us, the content of the scripts we will be doing
our best to guess the problem. I think you have parse error in the
included script, try turning on the log errors directives in php.ini,
turn off the output errors stuff, so Asterisk will not get confused
with php warnings and other stuff. Let us know what happen...

best regards

On 8/5/05, Christoph Eicke <cei at inmedias.it> wrote:
> On Friday 05 August 2005 14:04, Leo Burd wrote:
> > Hello there,
> >
> > I'm new to PHP AGIs and I'm having problems with a particular script
> > that has a "include_once" statement on it.  If I remove that stament,
> > the script runs until the section of the code that depends on the
> > include and then returns.  If I include that statement, the script does
> > not seem to run at all. What shall I do?
>
> Leo,
>
> wrap a function around whatever is in the included script, make your
> include_once() statement at the top of the AGI and then simply call the
> function at the place where it's necessary for that code to be executed.
>
> Christoph
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at 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
>


-- 
"Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org"
_______________________________________________
Asterisk-Users mailing list
Asterisk-Users at 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




More information about the asterisk-users mailing list