LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Accessing / Connecting to a Sybase database from PHP running under Linux (https://www.linuxquestions.org/questions/linux-newbie-8/accessing-connecting-to-a-sybase-database-from-php-running-under-linux-880230/)

trickynapzter 05-12-2011 01:09 AM

Accessing / Connecting to a Sybase database from PHP running under Linux
 
hello everyone.. good day to all.. this is my first post in this forum, and i am hoping that i can get answers....

i am a newbie in linux... and since i am a newbie, i get some trouble setting up good environment in linux.. i have problem regarding connecting php(under linux) to a sybase server(under windows),,, is there anyway connecting this two technologies?.. i am hoping for your kind help...thank you so much everyone...

rylan76 05-12-2011 05:36 AM

I'm assuming you've looked at

http://php.net/manual/en/book.sybase.php

?

trickynapzter 05-12-2011 07:02 PM

Quote:

Originally Posted by rylan76 (Post 4354162)
I'm assuming you've looked at

http://php.net/manual/en/book.sybase.php

?

thank you rylan76 for your reply.. but how do i implement it in linux?,, what am i gonna do first.. ive read content of the link you gave me.. but then how to start it with linux.. thanks so much..

trickynapzter 05-15-2011 07:25 PM

good day everyone... does anyone of you knows how to connect to sybase database from linux..

rylan76 05-16-2011 02:01 PM

Not sure, I've never used sybase in Linux.

All my experience so far was MySQL based.

In order to use MySQL with PHP and Apache in Linux, I first needed to compile and install MySQL.

E. g. you must either compile Sybase and start it running, or install it somehow using your distro's package manager.

Then, once it is running, you may need to compile PHP or install PHP in such a way / from such a package that it has sybase support available.

Then you'll need to compile / install Apache with APXS / APXS2 (AFAIK) support so that it can work with PHP.

See if you do a Google search for something like

install sybase linux
compiling sybase in linux
installing sybase in linux

or

using sybase php linux

etc.

If you get anything helpful.

rylan76 05-16-2011 02:04 PM

E. g. part of my PHP configure line when compiling it is:

Code:

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/lib/mysql
--with-config-file-path=/usr/lib --with-gd --with-zlib
--with-zlib-dir=/home/rylan/povray-3.6.1/libraries/zlib
--with-jpeg-dir=/home/rylan/povray-3.6.1/libraries/jpeg
--with-png-dir=/home/rylan/povray-3.6.1/libraries/png
--with-pear=/usr/local/lib/php --enable-sockets --enable-ftp
--enable-gd-native-ttf --enable-shmop --enable-bcmath --enable-calendar
--enable-exif --enable-mbstring --enable-soap --enable-zend-multibyte
--enable-force-cgi-redirect --enable-safe-mode --with-ldap --enable-discard-path
--with-kerberos --enable-gd-native-ttf --with-gdbm --with-gettext
--enable-fastcgi --with-openssl --enable-zip --with-curl
--with-mysql-sock=/var/lib/mysql.sock --with-bz2
--with-freetype-dir=/home/rylan/freetype-2.1.10 --with-mcrypt

note the "--with-mysql" and "--with-mysql-sock" statements which respectively

A. Tell PHP to include MySQL support
B. Tell PHP where to "talk" to MySQL

Logically I can surmise that you'll need something similar / the Sybase equivalent passed to PHP if you are going to compile it yourself, to get it to work with Sybase...

trickynapzter 05-16-2011 10:08 PM

thank you so much rylan76.. yeah i try to search compiling sybase in linux.. thanks for all the effort.. i will you posted as soon as i test my server. thanks a lot..

trickynapzter 06-05-2011 08:08 PM

" $]./configure --prefix=/usr/local/freetds --enable-msdblib "

--- i have search some configuration in fretds to enable msdlib, is there any configuration with freetds to enable sybase?.. thanks so much for the help...


All times are GMT -5. The time now is 11:18 PM.