Hello,
my tiny PHP5 test application cannot establish a connection to a
database while I am able to connect to the same database using the DB2
command line tool.
Our server is 64 bit system running SuSE Enterprise Linux 10. The PHP
version installed is v5.1.2.
Product Name = "DB2 Personal Edition"
Product Identifier = "DB2PE"
Version Information = "8.2"
Expiry Date = "Permanent"
Annotation = ""
Other information = ""
DB21085I Instance "db2inst1" uses "32" bits and DB2 code release
"SQL08027"
with level identifier "03080106".
Informational tokens are "DB2 v8.1.3.128", "s061108", "MI00180", and
FixPak
"14".
Product is installed at "/opt/IBM/db2/V8.1".
My test application is absolutely simple:
<?php
$database = 'SESYSMLS';
$user = 'sesys';
$password = 'sesys';
$pconn = db2_pconnect($d atabase, $user, $password);
if ($pconn) {
echo "Persistent connection succeeded.\n";
}
else {
print db2_conn_errorm sg() . "\n";
echo "Persistent connection failed.\n";
}
?>
an produces the following output:
[IBM][CLI Driver] SQL1042C An unexpected system error occurred.
SQLSTATE=58004 SQLCODE=-1042
Persistent connection failed.
The variable DB2INSTANCE is set in the shell that I used to execute my
test application and (although this should not be necessary,
"ibm_db2.instan ce_name" is set in /etc/php5/cli/php.ini).
As the following shows, I can connect via the command line client:
Database Connection Information
Database server = DB2/LINUX 8.2.7
SQL authorization ID = SESYS
Local database alias = SESYSMLS
Restarting the database manager does not change situation.
Can anybody help?
I could send the log file produced when creating the ibm_db extension
and a trace as created by "db2trc" if this helps.
my tiny PHP5 test application cannot establish a connection to a
database while I am able to connect to the same database using the DB2
command line tool.
Our server is 64 bit system running SuSE Enterprise Linux 10. The PHP
version installed is v5.1.2.
su - db2inst1 -c 'db2licm -l'
Product Identifier = "DB2PE"
Version Information = "8.2"
Expiry Date = "Permanent"
Annotation = ""
Other information = ""
su - db2inst1 -c db2level
"SQL08027"
with level identifier "03080106".
Informational tokens are "DB2 v8.1.3.128", "s061108", "MI00180", and
FixPak
"14".
Product is installed at "/opt/IBM/db2/V8.1".
My test application is absolutely simple:
cat t.php
$database = 'SESYSMLS';
$user = 'sesys';
$password = 'sesys';
$pconn = db2_pconnect($d atabase, $user, $password);
if ($pconn) {
echo "Persistent connection succeeded.\n";
}
else {
print db2_conn_errorm sg() . "\n";
echo "Persistent connection failed.\n";
}
?>
an produces the following output:
php5 -f t.php
SQLSTATE=58004 SQLCODE=-1042
Persistent connection failed.
The variable DB2INSTANCE is set in the shell that I used to execute my
test application and (although this should not be necessary,
"ibm_db2.instan ce_name" is set in /etc/php5/cli/php.ini).
As the following shows, I can connect via the command line client:
db2 connect to SESYSMLS user sesys using sesys
Database server = DB2/LINUX 8.2.7
SQL authorization ID = SESYS
Local database alias = SESYSMLS
Restarting the database manager does not change situation.
Can anybody help?
I could send the log file produced when creating the ibm_db extension
and a trace as created by "db2trc" if this helps.
Comment