473,387 Members | 3,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

from PHP -> db2_connect() Undefined Function

I'm trying to access a Cloudscape/Derby database
via PHP and am using the IBM DB2 Lite client
which I have installed.

As soon as I call db2_connect(...) in the
php code, I get a db2_connect Undefined function error message,
so it is not finding this function in the IBM DB2 stuff.

I've verified that the Apache Server, PHP
and DB2 and the config and ini files that go
with them are all set up OK.

I also made sure that my php.ini has a line that says
extension=php_ibm_db2.dll
and that the php_ibm_db2.dll exists
in the c:\php\ext directory
(I also copied php_ibm_db2.dll to
c:\windows\system32 just to be sure).

BUT.. I notice that in my c:\Program Files\
IBM\SQLLIB\
directory where DB2 lite client is installed,
there is NO include subdirectory.

Is that what I'm missing and if so,
how do I get it?

Thanks
Jim
Oct 31 '05 #1
3 15114
OK, I can connect to the database OK
after properly configuring my XP ODBC connection
from administrator tools - but
it only works if I use "odbc_connect" instead of
"db2_connect".

Any attempt to use a function starting with db2_
fails with "undefined function" message.

Does this mean the PHP 5 that I installed
did not have support for DB2 compiled in?

or...

Can I tell from my php_info() if the PHP 5 that I installed
has compiled in support for db2??

Thanks
J
"Musashi" <mu*****@okogyo.net> wrote in message
news:7At9f.12932$gj1.713@fed1read05...
I'm trying to access a Cloudscape/Derby database
via PHP and am using the IBM DB2 Lite client
which I have installed.

As soon as I call db2_connect(...) in the
php code, I get a db2_connect Undefined function error message,
so it is not finding this function in the IBM DB2 stuff.

I've verified that the Apache Server, PHP
and DB2 and the config and ini files that go
with them are all set up OK.

I also made sure that my php.ini has a line that says
extension=php_ibm_db2.dll
and that the php_ibm_db2.dll exists
in the c:\php\ext directory
(I also copied php_ibm_db2.dll to
c:\windows\system32 just to be sure).

BUT.. I notice that in my c:\Program Files\
IBM\SQLLIB\
directory where DB2 lite client is installed,
there is NO include subdirectory.

Is that what I'm missing and if so,
how do I get it?

Thanks
Jim

Nov 1 '05 #2
Ah yes... the setting in the apache .conf file
that says phpIniDir is at C:\PHP.

I should have known.

db2_ funcs working fine now.

J

"Musashi" <mu*****@okogyo.net> wrote in message
news:FGO9f.13087$gj1.3759@fed1read05...
OK, I can connect to the database OK
after properly configuring my XP ODBC connection
from administrator tools - but
it only works if I use "odbc_connect" instead of
"db2_connect".

Any attempt to use a function starting with db2_
fails with "undefined function" message.

Does this mean the PHP 5 that I installed
did not have support for DB2 compiled in?

or...

Can I tell from my php_info() if the PHP 5 that I installed
has compiled in support for db2??

Thanks
J
"Musashi" <mu*****@okogyo.net> wrote in message
news:7At9f.12932$gj1.713@fed1read05...
I'm trying to access a Cloudscape/Derby database
via PHP and am using the IBM DB2 Lite client
which I have installed.

As soon as I call db2_connect(...) in the
php code, I get a db2_connect Undefined function error message,
so it is not finding this function in the IBM DB2 stuff.

I've verified that the Apache Server, PHP
and DB2 and the config and ini files that go
with them are all set up OK.

I also made sure that my php.ini has a line that says
extension=php_ibm_db2.dll
and that the php_ibm_db2.dll exists
in the c:\php\ext directory
(I also copied php_ibm_db2.dll to
c:\windows\system32 just to be sure).

BUT.. I notice that in my c:\Program Files\
IBM\SQLLIB\
directory where DB2 lite client is installed,
there is NO include subdirectory.

Is that what I'm missing and if so,
how do I get it?

Thanks
Jim


Nov 4 '05 #3

Musashi wrote:
Ah yes... the setting in the apache .conf file
that says phpIniDir is at C:\PHP.

I should have known.


Yes, the "Microsoft Way" says it "should be" on C drive.

But I say NO!

I have a method that installs Perl, PHP, Apache and mySQL on a PC in 20
minutes, backs up in 3 and restores in 5.

And not a single file in in the WINDOWS directory or C root or key in
the registry.

web.torres.ws/walters_way

If anyone is interested.

Walter

Nov 4 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Bhavin G | last post by:
Hi there , I am pretty new at javascripting and i am having this huge problem. I am using asp.net and C# webapplication. In my asp.net aspx file I have a place holder for taking an html table...
13
by: david | last post by:
Hi, I have some problems to link a simple hello world program using g++ (version 3.2.3 or 3.3) and dinkumware 402. //hallo world... #include <iostream> main () { std::cout << "bla" <<...
21
by: Michael Bierman | last post by:
Please forgive the simplicy of this question. I have the following code which attempts to determine the color of some text and set other text to match that color. It works fine in Firefox, but does...
1
by: john | last post by:
Relatively new to C coding, so any help would greatly be appreciated. I'm having problems try to return my string array from my parsing function. When I do a printf I am getting the correct value...
17
by: yb | last post by:
Hi, Looking for clarification of undefined variables vs. error in JavaScript code. e.g. <script> alert( z ); // this will be an error, i.e. an exception </script>
3
by: Michael Sgier | last post by:
Hi i get thousands of messages like below. How shall i resolve that? Thanks Mcihael Release/src/Utility/RawImage.o: In function `CMaskImage::CMaskImage(int, int, char const*)':...
45
by: VK | last post by:
(see the post by ASM in the original thread; can be seen at <http://groups.google.com/group/comp.lang.javascript/browse_frm/thread/3716384d8bfa1b0b> as an option) As that is not in relevance to...
2
by: merrittr | last post by:
I have a small program to read data from some data files , in it I use string types to build the data file name but when I try to compile it I get: (see code below error) ...
148
by: onkar | last post by:
Given the following code & variable i . int main(int argc,char **argv){ int i; printf("%d\n",i); return 0; } here i is allocated from bss or stack ?
2
by: joelkeepup | last post by:
Hi, I made a change this morning and now im getting an error that says either "a is undefined or null" or "e is undefined or null" the microsoft ajax line is below, I have no idea how to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.