Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

Hi, All! Sorry for my English(
I want to connect to SQL Anywhere database from PHP 5.2.x script. The database is created and started on remote server with SA-11.0. All are of threaded versions on x86-32bit Linux (core 2.6). I tried to solve problem on 2 ways.

1) rebuild only PHP
Is the PHP5.x.y work with Sybase PHP-module php-5.x.y_sqlanywhere_r.so (or without '_r') which loaded from here (http://scn.sap.com/docs/DOC-40537) or from distribution package? All my versions PHP 5.2.(6 / 13 / mainly 17) can't load any PHP-module with the same warning: unknown symbol "executor_globals". As result I can't connect to remote database from PHP script. The PHP-module is set as
extension=php-5.x.y_sqlanywhere_r.so

in php.ini.

This have occured with- and without SQL Anywhere Client v12.0 software installed and also with Variables set:

PATH=....  
LD_LIBRARY_PATH=....  
SQLANYWHERE12=....  
SYYBASE=....  
SYBPLATFORM=linux

etc.

2) rebuild PHP + Sybase PHP-module
My attemptings to compile PHP with the new option "--with-sqlanywhere" were failed at make step:

./buildconf --force   (from new directory "*...../php-5.2.17/ext/sqlanywhere*",  then delete '\0D' from configure and save)
./configure .... --with-sqlanywhere
make

The last "good" rows on screen are :

/bin/sh /......./php-5.2.17/libtool --silent --preserve-dup-deps --mode=compile ..........  
...........ext/sqlanywhere/sqlanywhere.c -o ext/sqlanywhere/sqlanywhere.lo

Then script failed:

...../php-5.2.17/ext/sqlanywhere/sqlanywhere.c: In function 'zm_startup_sqlanywhere':  
...../php-5.2.17/ext/sqlanywhere/sqlanywhere.c:886: warning: passing argument 3 of 'ts_allocate_id' from incompatible pointer type

...../php-5.2.17/Zend/../TSRM/TSRM.h:105: note: expected 'ts_allocate_ctor' but argument is of type 'void (*)(struct zend_sqlanywhere_globals *, void ***)'  
...../php-5.2.17/ext/sqlanywhere/sqlanywhere.c: In function 'SQLAnywhereConnect':

...../php-5.2.17/ext/sqlanywhere/sqlanywhere.c:1176: error: too many arguments to function 'zend_list_insert'  
...../php-5.2.17/ext/sqlanywhere/sqlanywhere.c:1243: error: too many arguments to function 'zend_list_insert'  
...../php-5.2.17/ext/sqlanywhere/sqlanywhere.c: In function 'zif_sasql_pconnect_from_sqlca':  
...../php-5.2.17/ext/sqlanywhere/sqlanywhere.c:1348: error: too many arguments to function 'zend_list_insert'  
........................  
........................  
...../php-5.2.17/ext/sqlanywhere/sqlanywhere.c: In function 'zif_sqlanywhere_query':

...../php-5.2.17/ext/sqlanywhere/sqlanywhere.c:3943: error: too many arguments to function 'zend_list_insert'  
make: *** [ext/sqlanywhere/sqlanywhere.lo] Error 1  
-------------------------------------

What can I do?

P.S. I know about freeTDS, ODBC, Open Client and JDBC and I don't want PHP 5.3 In Windows the PHP-module works OK.

asked 21 Mar '14, 08:41

exp123's gravatar image

exp123
1111
accept rate: 0%

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:

×143
×70

question asked: 21 Mar '14, 08:41

question was seen: 2,694 times

last updated: 21 Mar '14, 08:41