DB2 Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDB2 Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 10th, 2005, 05:43 AM
nikmon nikmon is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Location: greece
Posts: 4 nikmon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 38 m 35 sec
Reputation Power: 0
problem connecting to db2 with php!!!

I have already installed the apache server, php v.4.3 and the DB2 Client v.7.1. I want to
remotely connect to the database named IRO (This is the database that IPIT uses. IPIT is the name of the DNS system) I have already acquired accounts and passwords and I can execute queries successfully from the command center. The problem is that the same queries cannot be executed from within the php script. The error I get is the following:

Warning: odbc_connect(): SQL error: [IBM][CLI Driver] SQL0902C A system error (reason code = "-20475") occurred. Subsequent SQL statements cannot be processed. SQLSTATE=58005 , SQL state 58005 in SQLConnect in C:\Program Files\Apache Group\Apache2\htdocs\GRAF\EXAMPLES\odbc_connect.php on line 2 [IBM][CLI Driver] SQL0902C A system error (reason code = "-20475") occurred. Subsequent SQL statements cannot be processed. SQLSTATE=58005

The connection script I use is:
<?php
$con=odbc_connect('IPIT','username','password') or die(odbc_errormsg());
?>

Is there anything wrong with the connection string?
I am realy looking forward your help.
Thank you

Reply With Quote
  #2  
Old March 11th, 2005, 08:27 AM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,840 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Days 36 m 16 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
Can you try a quick test, not using the command center but opening up a db2 command line and trying to connect via that interface?
i.e.
db2 connect to ipit user <username> using <password>

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDB2 Development > problem connecting to db2 with php!!!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT