Problems with pconnect

General discussion on Zend Server for IBM System i
Post Reply
Posts: 5
Joined: Tue Oct 04, 2016 12:11 pm

Problems with pconnect

Post by cars2089 » 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));

Code: Select all

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  .....

Code: Select all

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


Post Reply