cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SQL Anywhere 16 connectivity with PHP

Former Member
9,621

Update: Solution

My original intention was to be able to connect php version 5.6.5 to SQL ASA 12 or 16 database. In testing using the DocCommentXchange documentation to test this resulted in my original question. (See Below)

PHP would not connect returning an error of driver not found.

So I followed the advise in suggestions placing the SQLAnywhere 5.6.0 dll (Which I didn't have originally, only an older version) into the php\\ext\\ folder ensuring that all appropriate files were in the path.

This did not solve the issue.

To get it to connect, all I did was to enable the odbc driver in the php.ini file "Dynamic Extensions" section extension=php_pdo_odbc.dll.

I then used this connection code in my php web page: $pdo = new PDO("odbc:Driver={SQL Anywhere 16};Host={$host};Server={$servername};Database={$dbname};Uid={$username};Pwd={$pw}");


Original question:

I am attempting to connect SQL Anywhere 16 to php but am getting an error that couldn't load dynamic library.

I have followed the instructions as per the SAP DocCommentXchange on php extensions, and am now trying the testing php extension as per the DocCommentXchange.


SQL Anywhere 16 connectivity with PHP

My Apache service is a 64Bit version. Is the error a result of the 32Bit php exetensions being used? If so is there a 64bit version of the extension? Or do I have to use the 32Bit version of Apache?


Response to a question:

Hi Volker.

Yes the folder is in the path.

I have just installed 32 Bit Apache and Sybase ASA 16 onto another virtual server. Followed all the same procedures but now get a slightly different message. Appears to be version differences between Sybase php-5.4.12 and php version 5.6.5
SQL Anywhere 16 connectivity with PHP

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Likes

See update to original question.

VolkerBarth
Contributor
0 Likes

IMHO, it's nothing wrong with leaving the original question unchanged and add your solution as answer - even if you have decided to take a different approach...