Bug #5332 [Com]: ODBC Connect Fails for Sybase SQLanywhere DB

From: Date: Thu, 21 Aug 2014 12:51:31 +0000
Subject: Bug #5332 [Com]: ODBC Connect Fails for Sybase SQLanywhere DB
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187218@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=5332&edit=1 ID: 5332 Comment by: sean at seanco dot ca Reported by: wade at wadejohnson dot de Summary: ODBC Connect Fails for Sybase SQLanywhere DB Status: Closed Type: Bug Package: ODBC related Operating System: Windows 2000 PHP Version: 4.0 Release Candidate 2 Assigned To: joey Block user comment: N Private report: N New Comment: Hello, I know this is 12 years later. For those out there having the "Engine not started" or "Unable to start engine" error: If getting "Unable to start engine" it means you are trying to start the engine with PHP and it is already running. You should be using the client (dbclient.exe). You setup a System ODBC string, and then use that in your ODBC connect function [ie. odbc_connect('ODBCNAME', 'user', 'passwprd'); ] Keep it simple. Finally, if getting the "Engine not running" or "Engine not started", it's because the client is already running on your local machine. You need to stop it in the task manager and then try. If you need the client running on that machine at all times, and need to connect from IIS/Apache, then you need to setup a second machine and install Sybase SQL Anywhere on that machine and run the client from there. You cannot have two clients/engines running on the same server (properly). Enjoy! Previous Comments: ------------------------------------------------------------------------ [2002-11-21 15:55:15] vcastle at vet dot una dot py Well the same problem I solved this way: 1. Make on ODBC a DNS = databasename ; ex. dns = mydb and database = mydb 2. Run database ASA engine 3. Using this (or any other) in the file.php $connect = odbc_connect("mydb","user","password"); echo "connection: $connect"; if ($connect <= 0) { echo "Error in connection"; exit; } else { echo "Connection successful\n"; }; It Works...!!! *** BUT THEN... Warning: SQL error: [Sybase][ODBC Driver][Adaptive Server Anywhere]Table or view not found:Table "table" not found Any suggestions?? ------------------------------------------------------------------------ [2001-07-02 18:02:17] wade at wadejohnson dot de Hello All! I just tested the odbc connection to Sybase SQLAnywhere using PHP 4.0.6. I am happy to report that I was able to connect to the database and retrieve data via the odbc function calls. Thank you for your continued review and enhancements. Regards, Wade Johnson ------------------------------------------------------------------------ [2001-06-26 17:53:15] kalowsky@php.net assigning to joey as he knows Sybase rather well, and well... I don't. :\ Plus he has it installed... ------------------------------------------------------------------------ [2001-05-17 04:48:08] wade at wadejohnson dot de The first parameter of the odbc_connect function call is datasource name. If I don't supply a valid datasource name as maintained in the odbc datasource administrator, I receive the following error message: Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified, SQL state IM002 in SQLConnect in C:\Inetpub\wwwroot\wj\sqlanywhere.php on line 16 If I provide a valid datasource name, I receive the following error message: Warning: SQL error: [Sybase][ODBC Driver]Unable to connect to database server: database engine not running, SQL state 08001 in SQLConnect in C:\Inetpub\wwwroot\wj\sqlanywhere.php on line 16 Please note once again. THE VERY SAME datasource definition can be used to connect to the database via Excel or Borland C++, etc. ------------------------------------------------------------------------ [2001-05-16 19:01:32] kalowsky@php.net The SQL error you are receiving is "Server rejected access" I'm wondering if your odbc_connect only needs "wald" instead of "waldserver - wald" ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=5332 -- Edit this bug report at https://bugs.php.net/bug.php?id=5332&edit=1

« previous php.bugs (#187218) next »