1.php版本5.3.8(5.2.14版本的有个lloc的问题解决不了,估计是不支持)
2.sybase版本15_0。
3.建立软连接
cd /home/sybase/sybasedb/OCS-15_0/lib
ln -s libsybintl64.so libintl.so
ln -s libsybcomn64.so libcomn.so
ln -s libsybcs64.so libcs.so
ln -s libsybct64.so libct.so
4.重新编译php,带参数--with-sybase-ct=/home/sybase/sybasedb/OCS-15_0
5.在php代码中添加环境变量(linux系统下需要,windows下不需要,不知道为什么)
putenv ("SYBASE_JRE6_64=/home/sybase/sybasedb/shared/JRE-6_0_24_64BIT");
putenv ("SYBASE_JRE6_32=/home/sybase/sybasedb/shared/JRE-6_0_24_32BIT");
putenv ("SYBASE_JRE6=/home/sybase/sybasedb/shared/JRE-6_0_24_64BIT");
putenv ("SCROOT=/home/sybase/sybasedb/shared/sybcentral600");
putenv ("SYBASE_UA=/home/sybase/sybasedb/UAF-2_5");
putenv ("LD_LIBRARY_PATH=/home/sybase/sybasedb/ASE-15_0/lib:/home/sybase/sybasedb/DataAccess64/ODBC/lib:/home/sybase/sybasedb/DataAccess/ODBC/lib:/home/sybase/sybasedb/OCS-15_0/lib:/home/sybase/sybasedb/OCS-15_0/lib3p64:/home/sybase/sybasedb/OCS-15_0/lib3p:/home/sybase/sybasedb/ASE-15_0/lib:/home/sybase/sybasedb/DataAccess64/ODBC/lib:/home/sybase/sybasedb/DataAccess/ODBC/lib:/home/sybase/sybasedb/OCS-15_0/lib:/home/sybase/sybasedb/OCS-15_0/lib3p64:/home/sybase/sybasedb/OCS-15_0/lib3p");
putenv ("SYBASE_OCS=OCS-15_0");
putenv ("SYB_START=/home/sybase/sybasedb/ASE-15_0/install");
putenv ("SYB_SETUP=/home/sybase/sybasedb");
putenv ("LIB=/home/sybase/sybasedb/OCS-15_0/lib");
putenv ("SYBROOT=/home/sybase/sybasedb");
putenv ("SYBASE=/home/sybase/sybasedb");
putenv ("PATH=/home/sybase/sybasedb/ASE-15_0/jobscheduler/bin:/home/sybase/sybasedb/ASE-15_0/bin:/home/sybase/sybasedb/ASE-15_0/install:/home/sybase/sybasedb/ASEP/bin:/home/sybase/sybasedb/DBISQL/bin:/home/sybase/sybasedb/UAF-2_5/bin:/home/sybase/sybasedb/OCS-15_0/bin:/home/sybase/sybasedb/ASE-15_0/jobscheduler/bin:/home/sybase/sybasedb/ASE-15_0/bin:/home/sybase/sybasedb/ASE-15_0/install:/home/sybase/sybasedb/ASEP/bin:/home/sybase/sybasedb/DBISQL/bin:/home/sybase/sybasedb/UAF-2_5/bin:/home/sybase/sybasedb/OCS-15_0/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/sybase/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin");
putenv ("SYBASE_PLATFORM=linux");
putenv ("LANG=en_US.UTF-8");
putenv ("SYBASE_JRE_RTDS=/home/sybase/sybasedb/shared/JRE-6_0_24_64BIT");
putenv ("SYBASE_AWS=AWS-15_0");
putenv ("INCLUDE=/home/sybase/sybasedb/OCS-15_0/include");
//putenv ("LC_ALL=default");
putenv ("DSQUERY=SYBASE");