ID: 26116 Updated by: [EMAIL PROTECTED] Reported By: andrew at howells-solicitors dot com -Status: Open +Status: Feedback Bug Type: ODBC related Operating System: Windows NT 4 sp6a PHP Version: 4.3.4 New Comment:
My uneducated guess would be that the permissions for the apache user differ to the permission for the user as which you run the script on command line. Check those. Previous Comments: ------------------------------------------------------------------------ [2003-11-04 10:39:43] andrew at howells-solicitors dot com Description: ------------ I am using PHP 4.3.4 & Apache 1.3.28 all on Windows NTT 4. I have a remote Progress database server that serves as backednd to a practice management and accounts suite we use in-house. I want to use PHP to provide a web based interface to this database but am having some entertaining problems. I've tried the progress supplied Merant ODBC drivers as well as the OpenLink ODBC drivers. Both connect fine, however, if I try connecting using PHP loaded as a module ito apache I cannot connect to the DB, the ODBC driver refuses to load. However, If I execute the script from the comand line "php E:\webpages\intranet\sostest2.php" The connection is established ok. Reproduce code: --------------- <?php $connection = odbc_connect("system_dsn","user_name","password", SQL_CUR_USE_ODBC); odbc_prepare($connection, "select * from pub.users"); odbc_execute($result); Expected result: ---------------- No errors ! Actual result: -------------- == Using Openlink == Warning: odbc_connect(): SQL error: [OpenLink][ODBC][Driver]Connection rejected by data source, SQL state 08004 in SQLConnect in e:\webpages\intranet\sostest2.php on line 8 Warning: odbc_prepare(): supplied argument is not a valid ODBC-Link resource in e:\webpages\intranet\sostest2.php on line 10 Warning: odbc_execute(): supplied argument is not a valid ODBC result resource in e:\webpages\intranet\sostest2.php on line 12 == Using Merant == Warning: odbc_connect(): SQL error: Specified driver could not be loaded due to system error 5 (MERANT 3.60 32-BIT Progress SQL92 v9.1B)., SQL state IM003 in SQLConnect in e:\webpages\intranet\sostest2.php on line 8 Warning: odbc_prepare(): supplied argument is not a valid ODBC-Link resource in e:\webpages\intranet\sostest2.php on line 10 Warning: odbc_execute(): supplied argument is not a valid ODBC result resource in e:\webpages\intranet\sostest2.php on line 12 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26116&edit=1