When you come to Linux and configuration php with sybase, it is not as easy as windows. I struggled a lot while doing this for first time on Linux. There are many helps already available to do this task on Internet. I am narrating my step which may help you and me as well for future reference.
putenv('SYBASE=/opt/sybase');
$con = sybase_connect(, , ;
$db = sybase_select_db(,$con) ;
?>
http://php.net/manual/en/ref.sybase.php
- Install Apache with PHP.
- Install php5-sybase.
- Download full Sybase installer and install Sybase Client in linux machine. If you are installing it as root then the installation path may be /opt/sybase in most of the cases.
- Create an "interface" file to connect with your Sybase database in /opt/sybase location. The interface file should look like following
.
Servername
query tcp ether Servername Port
master tcp ether Servername Port check the permission of the "interface" file. It should be readable by all the Linux user. To set the permission you may use following command
#chmod 644 /opt/sybase/interface- You may check the Sybase connection by "isql" or "isql64" command.
- Now you may connect to sybase database with php. Following is simple example.
putenv('SYBASE=/opt/sybase');
$con = sybase_connect(
$db = sybase_select_db(
?>
http://php.net/manual/en/ref.sybase.php