Problems with pconnect

General discussion on Zend Server for IBM System i

Problems with pconnect

Postby cars2089 on Tue Dec 20, 2016 8:41 am

Hi together,

we are using Zend Server 8 for IBM i with several soap-based webservices to connect our erp-system to the world....

Currently we are using db_connect for handling the connection.

I read a lot of things (Alan Seiden) about using pconnect to have "faster" connections to the db.

When I change the php code to using pconnect like

Code: Select all
$db = db2_pconnect('', '', '', array('autocommit'=>DB2_AUTOCOMMIT_OFF));


and

Code: Select all
db2_pclose($db);


I test test webservice (normally with soap ui) and it works for 1 request.

After it I will get a lot of "PHP Warning: db2_prepare(): Statement Prepare Failed ..." errors, when I try to make sql in the php-code.
The pconnect-statement doesn't result in an error,
The error happens when I amke something like

Code: Select all
$stmt = db2_prepare($this->db, '
                INSERT INTO  .....


A

Code: Select all
var_dump($this->db);


results in

resource(3) of type (DB2 Persistent Connection)


Looks fine...
But the sql-statements fails....

Does anyone have an idea? Do I have to change something in the prestartet jobs?

Thanks a lot

Carsten
cars2089
 
Posts: 5
Joined: Tue Oct 04, 2016 12:11 pm

Return to Zend Server for IBM i

Who is online

Users browsing this forum: No registered users and 2 guests

cron