Edit report at https://bugs.php.net/bug.php?id=55655&edit=1
ID: 55655
User updated by: michel dot payan at gmail dot com
Reported by: michel dot payan at gmail dot com
Summary: Use ctlib 15.5 64bits failed
Status: Open
Type: Bug
Package: Sybase-ct (ctlib) related
Operating System: Linux ReadHat 5.3 x86_64
PHP Version: 5.3.8
Block user comment: N
Private report: N
New Comment:
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 ...).
Previous Comments:
------------------------------------------------------------------------
[2011-09-09 14:13:26] 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();
?>
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55655&edit=1