|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-09-09 14:59 UTC] michel dot payan at gmail dot com
[2011-09-12 08:00 UTC] michel dot payan at gmail dot com
-PHP Version: 5.3.8
+PHP Version: 5.2.17
[2011-09-12 08:00 UTC] michel dot payan at gmail dot com
[2015-02-18 07:45 UTC] krakjoe@php.net
-Status: Open
+Status: Wont fix
[2015-02-18 07:45 UTC] krakjoe@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 04:00:01 2025 UTC |
Description: ------------ Y want to use PHP 5.2.17 with lib DB 1.7.14 for Oracle (11.2) and Sybase (15.5) in a 64 bits environnement. All work for Oracle. Red Hat Enterprise Linux Server release 5.3 (Tikanga) Linux linnt27.tlt 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux Sybase CTISQL Utility/15.5/P-EBF17747 ESD #4/DRV.15.5.1/Linux Intel/Linux 2.6.9-55.ELsmp x86_64/BUILD1550-006/OPT/Sun Apr 18 01:03:56 2010 For Sybase i haved the knowed problem to take 64bits libraries ... So i have manually modified the Makefile to put the good libraries, compilation and installation work (make and make install), but have errors when i want to execute sybase query ! Used config command: cd $HOME/php-5.2.17 ./configure --prefix=/home/oracle/php5.2.17 --with-apxs2=/home/oracle/apache/bin/apxs \ --disable-short-tags --with-zlib --enable-calendar --enable-ftp --with-gd --with-freetype-dir \ --with-iconv --with-gettext --with-jpeg-dir=/usr/lib --with-png-dir --enable-mbstring --enable-pcntl \ --enable-soap --enable-zip --with-pear --enable-bcmath --without-sqlite --without-pdo-sqlite \ --enable-sigchild --with-libdir=lib64 --enable-gd-native-ttf --enable-xmlwriter --without-readline --with-gd --with-xpm-dir --enable-exif \ --with-oci8=$ORACLE_HOME --with-pdo-oci=$ORACLE_HOME \ --with-sybase-ct=$SYBASE/$SYBASE_OCS Manually modify Makefile to put: CFLAGS = $(CFLAGS_CLEAN) -DSYB_LP64 EXTRA_LIBS = -lcrypt -lz -lsybcs64 -lsybct64 -lsybcomn64 -lsybintl64 -lsybtcl64 ... So, when i test connexion with the test.php script i have this error: Fail to connect: Erreur: DB Error: no database selected DB Error: no database selected So, if i change my dsn to "sybase://indsyb_maj:psswd@DBSYBIND", the connection work but i have this error: Fatal error: Call to undefined method DB_Error::numRows() in /home/oracle/SQWareWeb/v2.0/test.php on line 41 So, if i comment the line that call $res->numRows(), i have: DB Error: unknown error What the good solution to compile PHP with Sybase 64bits ? I have to stand in PHP 5.2 ... Test script: --------------- <?php include('DB.php'); echo "<pre>"; $dsn = "sybase://indsyb_maj:psswd@DBSYBIND/syb_inddba"; $options = array('debug' => 2, 'portability' => DB_PORTABILITY_ALL); $db = DB::connect($dsn,$options); if (DB::isError($db)) { echo "dsn=$dsn\n"; echo "Fail to connect:\n"; echo "Erreur: ".$db->getMessage()."\n"; die ($db->getMessage()); } $query = "select distinct DataServer from tedt_Repository where Status!='OFF' order by 1"; $res = $db->query($query); echo "Numrows: ".$res->numRows()."\n"; if (DB::isError($res)) { die ($res->getMessage()); } while ($record = $res->fetchRow(DB_FETCHMODE_ASSOC)) { echo nl2br(print_r($record,true))."\n"; } $res->free(); $db->disconnect(); ?>