PEAR SOAP and global variables

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jimmy Jim

    PEAR SOAP and global variables

    OK, I am so frustrated with PEAR SOAP, I have it working, but it seems
    when I include a file and in that file is a function with global
    variables, those globals are not set. Anyone have ANY knowledge of
    this?? Here is an example:

    file: server.php

    ......
    function test() {
    include_once(ag e.php);
    $age = new age;

    $testnumber = 2;
    $age->runtest();
    return$age->testnumber;
    }
    .......

    file: age.php (class file)

    ......
    class age {
    var $testnumber;

    function runtest() {
    global $testnumber;

    $this->testnumber = $testnumber;
    return;
    }
    }
    .......

    It seems in this scenario that this will return nothing, or some kind
    of weird SOAP error like

    curl_exec error 52 Empty reply from server

    Not sure how to proceed. Anyone have any clue how to use globals
    inside of PEAR SOAP??

    JJ
Working...