× 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.



So have you tried the code I supplied? Works for me.


On Nov 11, 2015, at 6:12 PM, Rob <rob.couch@xxxxxxxxxxxxxx> wrote:

We are on ZendZerver 6... here is some of the phpinfo...

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies
with Zend Extension Manager v6.0.0, Copyright (c) 2003-2014, by Zend Technologies
- with Zend Data Cache v6.0.0, Copyright (c) 2004-2014, by Zend Technologies [loaded] [not licensed] [disabled]
- with Zend Job Queue v6.0.0, Copyright (c) 2004-2014, by Zend Technologies [loaded] [not licensed] [disabled]
- with Zend Utils v6.0.0, Copyright (c) 2004-2014, by Zend Technologies [loaded] [licensed] [enabled]
- with Zend Code Tracing v6.0.0, Copyright (c) 2009-2014, by Zend Technologies [loaded] [not licensed] [disabled]
- with Zend Server Z-Ray v7.0.0, Copyright (c) 1999-2014, by Zend Technologies [loaded] [not licensed] [disabled]
- with Zend Monitor v6.0.0, Copyright (c) 1999-2014, by Zend Technologies [loaded] [not licensed] [disabled]
- with Zend Debugger v6.0.0-i5, Copyright (c) 1999-2014, by Zend Technologies [loaded] [licensed] [enabled]
- with Zend Page Cache v6.0.0, Copyright (c) 2004-2014, by Zend Technologies [loaded] [not licensed] [disabled]
- with Zend Monitor UI v6.0.0, Copyright (c) 2004-2014, by Zend Technologies [loaded] [licensed] [enabled]


ibm_db2

IBM DB2, Cloudscape and Apache Derby support enabled
Module release 1.9.6-sg25
Module revision $Revision: 328376 $
Binary data mode (ibm_db2.binmode) DB2_BINARY
DB2 instance name (ibm_db2.instance_name) /no value/
DBCS extended memory allocations (ibm_db2.i5_dbcs_alloc) disabled
Force db2_connect to db2_pconnect (ibm_db2.i5_all_pconnect) disabled
Max use count db2_pconnect (ibm_db2.i5_max_pconnect) disabled
Advanced db2_pconnect monitor (ibm_db2.i5_check_pconnect) 1 - get conn attribute test
Job profile sort order (ibm_db2.i5_job_sort) disabled
System naming mode (ibm_db2.i5_sys_naming) disabled
Commitment control (ibm_db2.i5_allow_commit) disabled
XMLSERVICE install library (ibm_db2.i5_xmlservice_install) XMLSERVICE
DB2 error log verbose (ibm_db2.i5_log_verbose) disabled
DB2 server mode subsystem (ibm_db2.i5_servermode_subsystem) /no value/
IBM i driver libdb400.a (ibm_db2.i5_db400_ptf) disabled
Override PASE CCSID (ibm_db2.i5_override_ccsid) disabled



On 2015-11-11 16:26, Jon Paris wrote:
Rob is your script running on IBM i under Zend Server? If it is then all you need is something like this:

$conn = db2_connect ( "*LOCAL", "", "" );

if (! $conn) {

print 'Connection failed. SQL Err:' . db2_conn_error () . '<br>' . db2_conn_errormsg ();
return FALSE;
}

}
On Nov 11, 2015, at 4: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.

Jon Paris

www.partner400.com
www.SystemiDeveloper.com




---
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.


Jon Paris

www.partner400.com
www.SystemiDeveloper.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.