Hi everybody,
to be clear i will explain my problem using the code below.

My problem is: when i use "m1" i obtain this error:

[Wed Mar 14 01:20:37 2007] [error] PHP Notice:  Fatal: CFG is not
configured! Exiting. in /home/messe318/setup.php on line 93
/home/messe318/setup.php(93) : Notice - Fatal: CFG is not configured!
Exiting.

why "global $CFG" doesn't wok into setup.php using SCA (if i call
setup.php directly it work) ?

the problem is i can't change config.php and setup.php, i can chage
pluto.php and pippo.php.

thank you in advance.
mbertazz


<?php
/* pippo.php */

include "SCA/SCA.php";

/**
 *
 * @service
 * @binding.ws
 *
 */
class pippo
{

        /**
         *
         * @reference
         * @binding.php Pluto.php
         */
         public $pluto;

        /**
         *
         * @param string $a
         * @param string $b
         * @return string
         */
        function m1($a,$b){
                return $this->pluto->m2($a,$b);
        }
}
?>


<?php
/* Pluto.php */

require_once('config.php');

class Pluto
{
        function m2($a, $b){
                global $CFG;
                m3();
                return $a.$b;
        }
}
?>

<?php
/* config.php */

unset($CFG);

$CFG->k    = '123';
$CFG->z    = '456';

require_once("setup.php");
?>


<?php
/* setup.php */

global $CFG;

if (!isset($CFG->k)) {
        trigger_error('Fatal: CFG is not configured! Exiting.');
        die;
    }

function m3()
...
?>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"phpsoa" group.
To post to this group, send email to phpsoa@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.co.uk/group/phpsoa?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to