I have downloaded and installed the SA PHP Module, and according to phpinfo() so everything seems to work fine. It tells me that I am using PHP SQLAnywhere driver version 2.0.10.0 and SQLAnywhere client version 12.0.1.3152. '/usr/bin/php -v' tells me "PHP 5.3.10-1ubuntu2" and the version of the SA PHP Module is 5.3.5. I know that it should be the same version as php, but I couldnĀ“t find it and are not sure about how to compile the module by myself. I made a db.php which will try to make a connection with sasql_connect() but it fails on the login. It says: Warning: sasql_connect() [function.sasql-connect]: SQLAnywhere: [-103] Invalid user ID or password in /var/www/bas/wwwroot/db.php on line 7 Connection failed

I know that both the username and password is correct, because I can use it through ODBC and with Sybase Central application. Do I have to enable some login method or other stuff to get the login work with the PHP module or do anyone of you find anything other that I make wrong? Do I need to specify the port that my database runs on? (49161) and what is the statement for that?

My db.php does look like this (except for the uid/pwd): <?php $conn = sasql_connect("HOST=10.0.100.34,DBN=office,UID=censure;PWD=censure"); if (!$conn) { echo "Connection failedn"; } else { echo "Connected successfullyn"; sasql_close($conn); } ?>

Thanks in advance! Best regards, Henrik

asked 19 Apr '12, 08:31

alfonz's gravatar image

alfonz
1111
accept rate: 0%

edited 15 Mar '13, 19:50

Mark%20Culp's gravatar image

Mark Culp
24.9k10141297

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×438
×95
×70
×15

question asked: 19 Apr '12, 08:31

question was seen: 10,343 times

last updated: 15 Mar '13, 19:50