[phpsoa] Re: problem with require_once and global

2007-03-20 Thread mbertazz
Thank you very much Matthew! It's ok. Good night, Matteo On Mar 15, 12:37 pm, "Matthew Peters" <[EMAIL PROTECTED]> wrote: > Hi mbertazz, > > Well, it was solved pretty simply by putting > require_once('config.php') at the top of pippo.php, before the include > for SCA.php. > > When pippo.php get

[phpsoa] Re: problem with require_once and global

2007-03-15 Thread Matthew Peters
Hi mbertazz, Well, it was solved pretty simply by putting require_once('config.php') at the top of pippo.php, before the include for SCA.php. When pippo.php gets called as the target of a web service request, the lines of code at the top of pippo.php are running at the very top level, so config.

[phpsoa] Re: problem with require_once and global

2007-03-14 Thread mbertazz
hi Matthew, thank you very much for your help. > I haven't checked what will happen when we use the pippo.php as the > target of a webservice call, when it will be being called at the top > level again. I will try that tomorrow. yes, this is the real problem i found: i'm calling it as the target

[phpsoa] Re: problem with require_once and global

2007-03-14 Thread Matthew Peters
Hi mbertazz, This is a tricky little problem. The essence of the problem is that config.php only expects to find itself called from the very top level script, where all variables are global. That is why it does not bother to do global $CFG itself. However, when we call pippo.php for the first time