By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,965 Members | 2,043 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,965 IT Pros & Developers. It's quick & easy.

PEAR SOAP and global variables

P: n/a
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(age.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
Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.