RE: [SOAP] Returning Object Through PEAR::SOAP and troubles with php5
| From: | Vincent Jansen | Date: | Mon, 29 Dec 2003 15:50:07 +0000 |
| Subject: | RE: [SOAP] Returning Object Through PEAR::SOAP and troubles with php5 | ||
| References: | 1 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-1274@lists.php.net to get a copy of this message | ||
Hi,
I was wondering
I have the same setup as you have, but I can't get my mysql connection
up.
Can't load the php_mysql.dll extension that comes with the distro.
If you did get this up did you do anything special?
If not this might contribute to solving your problem
Vincent Jansen
-----Original Message-----
From: SirLancelot [mailto:lancelot@metalmiddleage.it]
Sent: maandag 29 december 2003 15:53
To: soap@lists.php.net
Subject: [SOAP] Returning Object Through PEAR::SOAP and troubles with
php5
Hi guys,
i'm an italian PHP developer, and i'm trying to improve my knowledge
about web services.
First I want to know if it is possible in any way to return objects from
a php pear::soap server.
I'm experimenting php5 too, so I tried to convert some work, and I found
a big problem with PEAR::SOAP 0.7.5 and php5.0.0b3:
System: Windows XP/Apache 1.3.29/PHP5.0.0b3/MySQL 4.0.1/
PEAR VERSIONS:
PEAR-BASE-1.2.1 - PEAR-SOAP 0.7.5
I exposed as web service the following method of a class:
function dbGetOne($id)
{
if(!is_numeric($id))
return "wrong ID passed!";
$dsn = array(
"phptype"=>"mysql",
"hostspec"=>"myhost",
"database"=>"mydb",
"username"=>"myuser",
"password"=> "mypassword"
);
$db = DB::connect($dsn);
$query="SELECT * FROM actions WHERE ID=". $id;
$result = $db->query($query);
if($row=$result->fetchRow(DB_FETCHMODE_ASSOC))
return $row;
else
return "no data found for record: ".$id;
}
in php4.3.4 this method works fine, but in php5 I got this fatal error:
Trying to reference a non valid object: libs/PEAR/SOAP/Client.php on
line 582
that is: return array_shift($returnArray)
Thanks in advance for your help!!
Greeting and wishes of happy new year :)
Giorgio from Rome
--
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php