Call to undefined function db2_connect()

General discussion on Zend Studio for IBM System i

Call to undefined function db2_connect()

Postby jeff7312 on Thu Mar 26, 2015 3:32 pm

Debugging with Zend Studio
I'm trying to learn my way around Zend Studio, and the php code executed from a browser works fine. But, when I try to debug as php script, I get the following error:

Debug Error: [path to php file] line 8 - Call to undefined function db2_connect()
Fatal error: Call to undefined function db2_connect() in [path to php file] on line 8

And here are the first few lines of code:
Code:
<?php
// Connect to the database
$database = "*LOCAL";
$user = "";
$password = "";
$hostname = "localhost";

$conn_rsrc = db2_connect($database, $user, $password);

if (!$conn_rsrc){
echo "Connection failed. SQL ERR:";
echo db2_conn_error();
echo "<br />";
echo db2_conn_errormsg();
exit();
}
jeff7312
 
Posts: 1
Joined: Thu Mar 26, 2015 3:29 pm

Re: Call to undefined function db2_connect()

Postby scot4260 on Fri Apr 24, 2015 3:10 pm

Jeff, did you ever get an answer on this? I'm having the same issue.
scot4260
 
Posts: 2
Joined: Thu Apr 23, 2015 9:15 pm

Re: Call to undefined function db2_connect()

Postby scot7520 on Mon Sep 25, 2017 7:25 pm

Same here!
scot7520
 
Posts: 1
Joined: Mon Sep 25, 2017 7:24 pm

Re: Call to undefined function db2_connect()

Postby mitc2064 on Fri Sep 29, 2017 3:49 am

I've had this issue before and resolved it by restarting Zend Server. Still no clue as to what caused the issue.
mitc2064
 
Posts: 3
Joined: Wed Mar 08, 2017 8:09 pm


Return to Zend Studio for IBM i

Who is online

Users browsing this forum: No registered users and 2 guests