Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Request help with php sqlanywhere

60 views
Skip to first unread message

take...@gmail.com

unread,
Feb 2, 2009, 5:27:51 AM2/2/09
to
Hello people, i have a ASA9 installed on one machine and another
machine is x86 debian sarge with apache 2.0.54 and php-5.1.6 with
sqlanywhere precompiled module, everything fine. But now i want to
upgrade web server and move it to a new machine, so i do fresh install
of debian etch x86_64 with apache 2.2.3 and php 5.2.0, but precompiled
module doesnt work(i choose php-5.2.0-sqlanywhere_r.so for 64 bit).
Here what i got in log: PHP Fatal error: Unable to start sqlanywhere
module in Unknown on line 0
Can recompile for source help me? I really want avoid this if
possible.
Btw, i read in manual i should setup environment in apache for asa,
but why i need this if it on separated machine? Another question is on
php module download page it says it needs ASA10 or later, is it true?
So i should upgrade ASA version to work with newest version of php and
apache?
Thanks.

Phil Mitchell [Sybase]

unread,
Feb 2, 2009, 12:35:21 PM2/2/09
to
There are 2 different versions of the SQL Anywhere PHP module. For
version 9 and earlier, the module is compiled against the ASA client
library (libdblib) directly. For version 10, we dynamically load the
SQL Anywhere C API (libdbcapi), so the PHP module can be compiled in the
absence of SQL Anywhere.

In both cases, the SQL Anywhere/ASA libraries need to be found by the
system loader at runtime. So, you need to have a copy of the SA/ASA
client libraries installed on the machine and have your LD_LIBRARY_PATH
set appropriately. So you need to set up Apache's environment to find
the client libraries. You can still connect to the server on the remote
machine, but you need a local copy of the client libraries to make it
happen.

Cheers,
Phil

take...@gmail.com

unread,
Feb 6, 2009, 4:02:13 AM2/6/09
to
On 2 фев, 20:35, "Phil Mitchell [Sybase]"

<firstname.lastn...@sybase.com> wrote:
> There are 2 different versions of the SQL Anywhere PHP module.  For
> version 9 and earlier, the module is compiled against the ASA client
> library (libdblib) directly.  For version 10, we dynamically load the
> SQL Anywhere C API (libdbcapi), so the PHP module can be compiled in the
> absence of SQL Anywhere.
>
> In both cases, the SQL Anywhere/ASA libraries need to be found by the
> system loader at runtime.  So, you need to have a copy of the SA/ASA
> client libraries installed on the machine and have your LD_LIBRARY_PATH
> set appropriately.  So you need to set up Apache's environment to find
> the client libraries.  You can still connect to the server on the remote
> machine, but you need a local copy of the client libraries to make it
> happen.
>
> Cheers,
> Phil
>
> takedo...@gmail.com wrote:
> > Hello people, i have a ASA9 installed on one machine and another
> > machine is x86 debian sarge with apache 2.0.54 and php-5.1.6 with
> > sqlanywhere precompiled module, everything fine. But now i want to
> > upgrade web server and move it to a new machine, so i do fresh install
> > of debian etch x86_64 with apache 2.2.3 and php 5.2.0, but precompiled
> > module doesnt work(i choose php-5.2.0-sqlanywhere_r.so for 64 bit).
> > Here what i got in log: PHP Fatal error:  Unable to start sqlanywhere
> > module in Unknown on line 0
> > Can recompile for source help me? I really want avoid this if
> > possible.
> > Btw, i read in manual i should setup environment in apache for asa,
> > but why i need this if it on separated machine? Another question is on
> > php module download page it says it needs ASA10 or later, is it true?
> > So i should upgrade ASA version to work with newest version of php and
> > apache?
> > Thanks.

Ok, thanks. But i have another problem with installing ASA10 and 11 as
well on web server.
When i try to load setup i get this:
takedown@web:~/ga1001$ ./setup
Checking System Requirements...
./setup: line 5079: /home/takedown/ga1001/./bin/dbinstall: No such
file or directory

ERROR: The /home/takedown/ga1001/./files.tic seems to be corrupted.
Please report this problem to Sybase Technical Support.
I try sqlanywhere 10, 11 and 11 web edition always same error. Server
is minimal(netinst) debian, maybe i dont have some library or
something?
Maybe there are another way to get client library?
Thanks.

Ray Ruvinskiy

unread,
Feb 6, 2009, 8:27:31 AM2/6/09
to
Are you running a 64-bit Debian distribution? You will need the 32-bit
support libraries to install SQL Anywhere. On Ubuntu, the package name
is ia32-libs. I'm not sure if it's the same on Debian proper.

apt-get install ia32-libs

Ray

take...@gmail.com

unread,
Feb 6, 2009, 11:01:07 AM2/6/09
to
On 6 фев, 16:27, Ray Ruvinskiy <first.l...@sybase.com> wrote:
> Are you running a 64-bit Debian distribution? You will need the 32-bit
> support libraries to install SQL Anywhere. On Ubuntu, the package name
> is ia32-libs. I'm not sure if it's the same on Debian proper.
>
> apt-get install ia32-libs
>
> Ray
>
> takedo...@gmail.com wrote:
> > On 2 ÆÅ×, 20:35, "Phil Mitchell [Sybase]"

thanks, that works.

Phil Mitchell [Sybase]

unread,
Feb 6, 2009, 10:56:42 AM2/6/09
to
As a side note (since Ray has hopefully answered your question), "11"
and "11 web edition" are the *same* installer/software/everything. The
license key alone determines what you get and how the server will behave
wrt license compliance.

If you only need the client libraries, you *could* simply copy them from
your other machine. Minimally you will need libdbcapi (only if you're
using the new PHP driver), libdbtasks, and libdblib. There may be
others, but those are the basics.

Cheers,
Phil

take...@gmail.com

unread,
Feb 6, 2009, 11:23:00 AM2/6/09
to
On 6 фев, 18:56, "Phil Mitchell [Sybase]"

<firstname.lastn...@sybase.com> wrote:
> As a side note (since Ray has hopefully answered your question), "11"
> and "11 web edition" are the *same* installer/software/everything.  The
> license key alone determines what you get and how the server will behave
> wrt license compliance.
>
> If you only need the client libraries, you *could* simply copy them from
> your other machine.  Minimally you will need libdbcapi (only if you're
> using the new PHP driver), libdbtasks, and libdblib.  There may be
> others, but those are the basics.
>
> Cheers,
> Phil
>
> takedo...@gmail.com wrote:
> > On 2 ÆÅ×, 20:35, "Phil Mitchell [Sybase]"

Damn, i install sqlanywhere 10, put this in envvars: /opt/
sqlanywhere10/bin64/sa_config.sh

but got same error.

Phil Mitchell [Sybase]

unread,
Feb 6, 2009, 11:51:34 AM2/6/09
to
If you source sa_config.sh and run php from the command line, are you
able to load the sqlanywhere driver? If so, then it's an environment
problem with Apache. If not, then you may be missing something.

Which version of the PHP driver are you using? If you are trying to use
the new one, you will need 10.0.1 build 3772 or higher. If you are
using the old one then you should be fine.

Another thing to consider is whether selinux is in your way. Being as
it's debian, I'm going to guess that's not the case, but it is something
that occasionally bites us.

Running phpinfo() is useful to determine what is in your environment.
Specifically look for LD_LIBRARY_PATH. It should contain the libXX
directory of your SQLAnywhere installation, where XX is the pointer size
of the PHP driver you are trying to use (which should match the pointer
size of your php executable (or mod_php, which should be the same as
that of Apache)).

Let me know what you find.

take...@gmail.com

unread,
Feb 7, 2009, 2:57:59 AM2/7/09
to
On 6 фев, 19:51, "Phil Mitchell [Sybase]"

<firstname.lastn...@sybase.com> wrote:
> If you source sa_config.sh and run php from the command line, are you
> able to load the sqlanywhere driver?  If so, then it's an environment
> problem with Apache.  If not, then you may be missing something.
>
> Which version of the PHP driver are you using?  If you are trying to use
> the new one, you will need 10.0.1 build 3772 or higher.  If you are
> using the old one then you should be fine.
>
> Another thing to consider is whether selinux is in your way.  Being as
> it's debian, I'm going to guess that's not the case, but it is something
> that occasionally bites us.
>
> Running phpinfo() is useful to determine what is in your environment.
> Specifically look for LD_LIBRARY_PATH.  It should contain the libXX
> directory of your SQLAnywhere installation, where XX is the pointer size
> of the PHP driver you are trying to use (which should match the pointer
> size of your php executable (or mod_php, which should be the same as
> that of Apache)).
>
> Let me know what you find.
>

Finally, it works.
Fix your documentation please, they say i should add to apache
envvars /opt/
> > sqlanywhere10/bin64/sa_config.sh without source before that, this is error. When i add source to that everything fine.
Thanks.

take...@gmail.com

unread,
Feb 16, 2009, 5:11:09 AM2/16/09
to

After some testing we have another problem, it's a long story - just
database fields doesnt return values and our site just return variable
names instead of data. We try sql anywhere 11 with precompiled module
and also freetds php_sybase_ct, all the same. Now i just want setup
similar configuration just like our production machine. I download ASA
9.0.2 and cant find where i can get php module for that? Compiling
from source doesnt work as well as precompiled module(i think all new
modules linked to new sql anywhere libraries). We have 32-bit old
precompiled module php5-sqlanywhere9.so on our production machine, but
it ofcourse doesnt work, so i need a 64-bit module for asa9. Thanks.

Phil Mitchell [Sybase]

unread,
Feb 17, 2009, 10:44:59 AM2/17/09
to
Have you tried running the same queries outside of PHP? It seems like
it may be a problem with your query. You could also turn on request
level logging on your server (-z -zr all), which would tell you what's
getting transferred to the client.

Cheers,
Phil

take...@gmail.com

unread,
Feb 18, 2009, 5:06:06 AM2/18/09
to
On 17 фев, 18:44, "Phil Mitchell [Sybase]"

<firstname.lastn...@sybase.com> wrote:
> Have you tried running the same queries outside of PHP?  It seems like
> it may be a problem with your query.  You could also turn on request
> level logging on your server (-z -zr all), which would tell you what's
> getting transferred to the client.
>
> Cheers,
> Phil
>

yeah, we try do same query from windows tools(powerdesigner or
somethink i think) and it works.

Phil Mitchell [Sybase]

unread,
Feb 18, 2009, 11:21:14 AM2/18/09
to
Can you try from dbisql on the same machine.

Also, what is your query, how are you calling it (in PHP), and what
exact results are you getting?

Thanks,
Phil

take...@gmail.com

unread,
Feb 22, 2009, 6:39:48 AM2/22/09
to

Well, i already reinstall server from scratch and compiled from source
php module(for asa 9) with apache 2.2.11 and php 5.2.8 and now
everything works, i think there some troubles with 64-bit systems.
Phil Mitchell [Sybase]:

b.ca...@gmail.com

unread,
Jul 19, 2013, 4:24:18 AM7/19/13
to
Hi ! I know this topic is old, but my problem is pretty close.
I'm buiding a php web application which communicates with a remote SQL Anywhere database. So I'm using SQL Anywhere PHP module. It works on my localhost, but I must hosting the application on a VPS.
VPS are a debian with php version 5.4.4-14+deb7u2. There is no version 5.4.4-14+deb7u2 of SQL Anywhere PHP module.

So how ti install this php extension on debian with php version 5.4.4-14+deb7u2 ?

Thanks

PS: I'm a french student and i'm sorry for my english, I hope you understand me.
0 new messages