0

I'm new in sql anywhere, currently I'm trying to connect using PHP.

This is what I've got so far:

$conn = sqlanywhere_connect ( "UID=usr;PWD=pass;ENG=serv;DBN=bd_name;COMMLINKS=TCPIP{HOST=10.1.1.189:2638}" );

SQL Anywhere is installed on another machine, where I can't run apache, website is running on localhost (xampp). This is only for test, when website would be ready I will connect to correct db.

This is error I've got:

Warning: sqlanywhere_connect(): The SQLAnywhere client libraries could not be loaded. Please ensure that dbcapi.dll can be found in your PATH environment variable. in C:\xampp\htdocs\core\cache\includes\elements\modsnippet\25.include.cache.php on line 21

I haven't got dbcapi.dll file, but I'm not sure I should have it.
In documentation I couldnt find this file (SQL Anywhere 10 which I've got), but for SQL Anywhere 11 I could find pages where was info about this file.

To use sqlanywhere_connect I've download SQL Anywhere module for curren ver. of PHP onto my machine and I've add it to php.ini file.

What should I do? Should I download missing file? Would it be enough or I could get more errors asking for other files?

miszczu
  • 1,179
  • 4
  • 19
  • 39

2 Answers2

2

I had a similar problem and the solution proposed here: https://groups.google.com/forum/#!msg/sql-anywhere-web-development/zK9Tf-X3cYk/GAoqK2DnB9EJ worked for me.

Specifically, my xampp + php needed the 32 bit dbcapi.dll but when I installed SQL Anywhere 12 I neglected to check the box to install the 32 bit version as well. Re-installing, chossing "modify" and installing the 32 bit SQL Anywhere 12 got "php test.php" working.

0

I would down load the missing file and go from there you are using xamp which is pre-built to talk to mySQl I doubt there is any extra .dll in the Instillation to connect with SQLAnywhere

Odis Harkins
  • 291
  • 2
  • 13