× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I gave up trying to install and use db2_connect, I would never load. I was
able to connect to IBMi using odbc/unixODBC works like a charm.



http://www.mcpressonline.com/programming/apis/using-iseries-odbc-driver-in-a-linux-partition.html

https://code.google.com/p/odbc/wiki/InstallingUnixODBC

https://zxtech.wordpress.com/2013/06/22/how-to-connect-to-microsoft-sql-server-from-ubuntu-using-odbc/

On Wed, Nov 11, 2015 at 3:46 PM, Rob <rob.couch@xxxxxxxxxxxxxx> wrote:

No clue what I am doing wrong....

Here is my first test script ....
https://sv1.americanfirstfinance.com:8158/kwik/aff_test/aff.php

Not sure what I am doing wrong when trying to connect to DB2.... I have
tried many things...

How does one validate which db driver is installed. I am hoping IBM_DB2
is installed. Just do not know how to check. Does it require ssh? Does
the Green Screen give you the same functionality as ssh?

<?php
$db2Conn = db2_connect( 'MyDB2DB', 'Usr', 'Pwd', DB2_I5_NAMING_OFF );
//$db2Conn = db2_connect( 'MyDB2DB', 'Usr', 'Pwd', DB2_I5_NAMING_OFF );
//$db2Conn = db2_connect( '', 'Usr', 'Pwd', DB2_I5_NAMING_OFF );
//$db2Conn = db2_connect( '', '', '', DB2_I5_NAMING_OFF );
//$db2Conn = db2_connect(
'DATABASE=MyDB2DB;HOSTNAME=localhost;PORT=8158;PROTOCOL=TCPIP;UID=Usr;PWD=Pwd;',
null, null, DB2_I5_NAMING_OFF );
//$db2Conn = db2_connect(
'DATABASE=MyDB2DB;HOSTNAME=localhost;PORT=8158;PROTOCOL=TCPIP;UID=Usr;PWD=Pwd,
'', '', DB2_I5_NAMING_OFF );

if ( false === $db2Conn )
{
echo 'Failed To Connect. '.db2_conn_errormsg() ;
}
else
{
echo 'Connection Completed!' ;
db2_close( $db2Conn ) ;
}
?>


It is not working......

Am I just that brain dead?

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.