Re: Tried that, what now?

From: Date: Thu, 25 Sep 2003 11:19:38 +0000
Subject: Re: Tried that, what now?
References: 1 2  Groups: php.soap 
Request: Send a blank email to php-soap+get-1074@lists.php.net to get a copy of this message
Hello, I've had a quite similar Problem with simple DB-access and Timeouts. I could "workaround" this by connecting to the DB in my service script, which means outside your server-function. The global db variable is now initialized, and it worked fine. Just connect and disconnect the DB one time. I don't know why this happened, but this way it worked for me. Furthermore i've had Timeout-problems with large Objects and DB-Requests. The setopt-Function and __options-Array did not help, i had to change the Variable $timeout of class SOAP_Transport_HTTP in /SOAP/Transport/HTTP.php manually. good speed, Sören Dustin Nantais schrieb:
I followed your advice Michele, and I still get a timeout error. Here is the function i've defined. It's no doubt a very small function. It should execute almost immediately. function dothisfunction($nid) {
    //connect to db, defined above
    global $db;
    $result = $db->query("SELECT * FROM marques WHERE id = $nid LIMIT 0,1");
    $row = $result->fetchRow();
    $name = $row['name'];
    return $name;
} I've also tried using the defualt PHP 'mysql' function library, and no luck. Is it the SOAP client thats the problem, or is it the server. Should I use a different client. I'm using PEAR::SOAP right now. For client and server. ...Dustin


« previous php.soap (#1074) next »