Home > Archive > SQL Anywhere for Linux > April 2005 > Apache to ASA 8 recommendations









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Apache to ASA 8 recommendations
Gary MacKay

2005-04-05, 8:03 pm

What is the current recommendation for connecting a linux/apache/mysql/php (lamp) server to ASA8 (which is running on a different box)?

I have installed the network client on the web server, created the .odbc.ini files, and successfully connected to the database via isql and dbisqlc.

I tried to install the DBD::ASAny module via cpan, but can not get it to compile. It complains that ASANY is not set. I did an 'echo $ASANY' and it is set. Not sure what is going on there.

What is the best way for web pages to connect? I do everything in php and mysql, so to keep the learning curve low to start with, is php a recommended (robust) way to connect? I could learn the perl side of things if I ever get the module to compile.

The php related docs on the ianywhere web site are really old. Are they still valid? If php is still ok, should I use the php module from the web site or something like FreeTDS ? or sybaseCT ?

I will need to insert/update records, not just read them.

- Gary
Greg Fenton

2005-04-05, 8:03 pm

Gary MacKay wrote:
> If php is still ok, should I use the php module from the
> web site or something like FreeTDS ? or sybaseCT ?


If you already know PHP, then I suggest you start off trying the
SQLAnywhere PHP module.

IMO, you do not want to start mucking with FreeTDS or sybaseCT for a
couple of reasons, the main one being that they use the TDS protocol
which is not a native protocol to ASA (it is a native protocol for
Sybase ASE).

The SQLAnywhere PHP module is located at:

http://www.ianywhere.com/developer/...php_module.html

and the documentation for building and installing the module is at:

http://www.ianywhere.com/whitepapers/apache_php.html


Hope this helps,
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/
Gary MacKay

2005-04-05, 8:03 pm

Greg Fenton wrote:
> Gary MacKay wrote:
>
>
>
> If you already know PHP, then I suggest you start off trying the
> SQLAnywhere PHP module.
>
> IMO, you do not want to start mucking with FreeTDS or sybaseCT for a
> couple of reasons, the main one being that they use the TDS protocol
> which is not a native protocol to ASA (it is a native protocol for
> Sybase ASE).
>
> The SQLAnywhere PHP module is located at:
>
> http://www.ianywhere.com/developer/...php_module.html
>
> and the documentation for building and installing the module is at:
>
> http://www.ianywhere.com/whitepapers/apache_php.html
>
>
> Hope this helps,
> greg.fenton


Thanks Greg!
My concern with using the php module is having to recompile php. Compiling is not the problem, I'm familiear with that. It is trying to not loose all of the functionality that I already have. It is an endless snowball effect. Compile php, need mysql stu
ff, try again, need postgresql stuff, darn, need ssl stuff, darn again, need something else. That will lead to compiling apache which starts the routine all over again! There has got to be an easier way to keep what I have and just add sybase to it.

- Gary



Greg Fenton

2005-04-05, 8:03 pm

Gary MacKay wrote:
>
> Compile php, need mysql stuff, try again, need
> postgresql stuff, darn, need ssl stuff, darn again, need something else.
> That will lead to compiling apache which starts the routine all over
> again! There has got to be an easier way to keep what I have and just
> add sybase to it.
>



And this is why I always create a "GLF_build.sh" for any project that
uses ./configure :-)

./configure --with-apxs2=/usr/sbin/apxs --with-sqlanywhere ...
if [ "$?" != 0 ]; then
echo "configure failed"
exit 1
fi
make
if [ "$?" != 0 ]; then
echo "'make' failed"
exit 1
fi
make test
if [ "$?" != 0 ]; then
echo "'make test' failed"
exit 1
fi
...

If I need to make changes to the configuration, I simply edit that
script and re-run. Reproducibility is a Wonderful Thing!

You shouldn't need to rebuild apache each time if you are building PHP
as a module (php4apache.so).

You can also get the configuration of the PHP you currently have
installed with the command:

php -i | egrep "^Configure Command"

[This assumes you installed the CLI interface to PHP with the same build
that you did for the apache module you are using].

Hope this helps,
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com