php.net |  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
Votes:2
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: michel dot payan at gmail dot com
New email:
PHP Version: OS:

 

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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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] krakjoe@php.net
-Status: Open +Status: Wont fix
 [2015-02-18 07:45 UTC] krakjoe@php.net
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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 15:01:28 2024 UTC