|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55655 Use ctlib 15.5 64bits failed
Submitted: 2011-09-09 14:13 UTC Modified: 2015-02-18 07:45 UTC
Avg. Score:3.5 ± 0.5
Reproduced:0 of 1 (0.0%)
From: michel dot payan at gmail dot com Assigned:
Status: Wont fix Package: Sybase-ct (ctlib) related
PHP Version: 5.2.17 OS: Linux ReadHat 5.3 x86_64
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
3 + 25 = ?
Subscribe to this entry?

 [2011-09-09 14:13 UTC] michel dot payan at gmail dot com
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 \

Manually modify Makefile to put:
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:
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";


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-09-09 14:59 UTC] michel dot payan at gmail dot com
I see that we can modify the file ext/sybase_ct/config.m4, but i can't know the procedure to take this modification into account.
Is anyone can help me ? (phpize ...).
 [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
Connexion work but queries not ...
 [2015-02-18 07:45 UTC]
-Status: Open +Status: Wont fix
 [2015-02-18 07:45 UTC]
The sybase maintainer has backed away from the project, since nobody new has come forward it has been removed in version 7 of PHP.

For this reason, I'm marking the bug as won't fix, it can still be found by any maintainer that might come along and revive sybase as a PECL project.
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Jun 24 23:01:25 2019 UTC