If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > PHP > how connect DB2 With PHP... Fatal Error try Connect.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-23-10, 16:30
clavijo83 clavijo83 is offline
Registered User
 
Join Date: Jun 2010
Posts: 4
how connect DB2 With PHP... Fatal Error try Connect.

hi, i install the pecl extensions of ibm_db2 in my php, but give me fatla error on run my page.

this is the error:
Fatal error: Call to undefined function db2_connect() in C:\AppServ\www\multivpos\configs\bd.php on line 7

i copy the php_ibm_db2.dll in my folder php, C:\AppServ\php5\ext, and i configure the php.ini file, adding line "extension=php_ibm_db2.dll" in php.ini

my php file to connect:
PHP Code:
<?php
$database 
'SAMPLE';
$user 'db2admin';
$password 'apassword';
$hostname 'localhost';
$port 50000;
$connection db2_connect($database$user$password);
if (
$connection)
{
echo 
"Connection succeeded."."\n";
}
else
{
echo 
"Connection failed.<br />";
echo 
'SQLSTATE : ' db2_conn_error() . '<br/>';
echo 
'Message : ' .db2_conn_errormsg(). '<br />';
}
please help me ¿how connect?, ¿how fix the error?.
Reply With Quote
  #2 (permalink)  
Old 07-15-10, 17:37
R45 R45 is offline
Registered User
 
Join Date: Jul 2010
Location: Winnipeg, Canada
Posts: 7
The extension isn't properly installed. If you're using IIS, see PHP: Installation - Manual for additional instructions.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On