php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45357 sybase-ct fails against sybase-15_0 on 64-bit centos 5
Submitted: 2008-06-25 19:48 UTC Modified: 2010-08-31 14:28 UTC
Votes:11
Avg. Score:4.9 ± 0.3
Reproduced:11 of 11 (100.0%)
Same Version:8 (72.7%)
Same OS:8 (72.7%)
From: temmel at jcvi dot org Assigned: thekid (profile)
Status: Closed Package: Sybase-ct (ctlib) related
PHP Version: 5.2.9 OS: Centos 5 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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: temmel at jcvi dot org
New email:
PHP Version: OS:

 

 [2008-06-25 19:48 UTC] temmel at jcvi dot org
Description:
------------
I'm running into problems with php + sybase_ct under 64-bit Centos.  I get a sybase_select_db failure after successfully performing a sybase_connect.


CentOS release 5 (Final)
Linux speedy 2.6.18-53.1.4.el5 #1 SMP Wed Nov 14 10:37:27 EST 2007 x86_64 x86_64 x86_64 GNU/Linux

SYBASE=/usr/local/packages/sybase
SYBASE_OCS=OCS-15_0

Using php-5.2-dev snap (php5.2-200806251230)...

Modified configure to use 64-bit libs:

 LIBS="-lintl64  $LIBS"
         SYBASE_CT_SHARED_LIBADD="-lct64 $SYBASE_CT_SHARED_LIBADD"
     SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lct64"
         SYBASE_CT_SHARED_LIBADD="-lcs64 $SYBASE_CT_SHARED_LIBADD"
       LIBS="-lcs64 $LIBS"
         SYBASE_CT_SHARED_LIBADD="-lct64 $SYBASE_CT_SHARED_LIBADD"
       LIBS="-lct64 $LIBS"
         SYBASE_CT_SHARED_LIBADD="-lcomn64 $SYBASE_CT_SHARED_LIBADD"
       LIBS="-lcomn64 $LIBS"
         SYBASE_CT_SHARED_LIBADD="-lintl64 $SYBASE_CT_SHARED_LIBADD"
       LIBS="-lintl64 $LIBS"
     SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lcs64 -lct64 -lcomn64 -lintl64"
         SYBASE_CT_SHARED_LIBADD="-ltcl64 $SYBASE_CT_SHARED_LIBADD"
         SYBASE_CT_SHARED_LIBADD="-lsybtcl64 $SYBASE_CT_SHARED_LIBADD"
       LIBS="-lsybtcl64 $LIBS"
         SYBASE_CT_SHARED_LIBADD="-linsck64 $SYBASE_CT_SHARED_LIBADD"
         SYBASE_CT_SHARED_LIBADD="-linsck64 $SYBASE_CT_SHARED_LIBADD"


./configure --prefix=/opt/software/php-dev --with-sybase-ct=/usr/local/packages/sybase


FAILED TEST SUMMARY
---------------------------------------------------------------------
Bug #16069 (ICONV transliteration failure) [ext/iconv/tests/bug16069.phpt]
iconv stream filter [ext/iconv/tests/iconv_stream_filter.phpt]
Test array_slice() function : usage variations - Pass different data types as $offset arg [ext/standard/tests/array/array_slice_variation2.phpt]
Test array_slice() function : usage variations - Pass different data types as $length arg [ext/standard/tests/array/array_slice_variation3.phpt]
Test lstat() and stat() functions: usage variations - effects of touch() on link [ext/standard/tests/file/lstat_stat_variation6.phpt]
Test lstat() and stat() functions: usage variations - writing data into file [ext/standard/tests/file/lstat_stat_variation7.phpt]
Test setlocale() function : usage variations - setting system locale as null [ext/standard/tests/strings/setlocale_variation4.phpt]
Test setlocale() function : usage variations - Setting system locale as empty string [ext/standard/tests/strings/setlocale_variation5.phpt]
Sybase-CT bug #22403 (crash when executing a stored procedure without parameters) [ext/sybase_ct/tests/bug22403.phpt]
Sybase-CT bug #26407 (Result set fetching broken around transactions) [ext/sybase_ct/tests/bug26407.phpt]
Sybase-CT bug #27843 (notices when query is a stored procedure) [ext/sybase_ct/tests/bug27843.phpt]
Sybase-CT bug #28354 (sybase_free_result crash) [ext/sybase_ct/tests/bug28354.phpt]
Sybase-CT bug #29064 (Exact numeric/decimal/money datatypes lose precision) [ext/sybase_ct/tests/bug29064.phpt]
Sybase-CT bug #30312 (sybase_unbuffered_query calls) [ext/sybase_ct/tests/bug30312.phpt]
Sybase-CT bug #6339 (invalid Sybase-link resource) [ext/sybase_ct/tests/bug6339.phpt]
Sybase-CT application name [ext/sybase_ct/tests/test_appname.phpt]
Sybase-CT connectivity [ext/sybase_ct/tests/test_connect.phpt]
Sybase-CT connection-based server message handler [ext/sybase_ct/tests/test_connectionbased_msghandler.phpt]
Sybase-CT sybase_fetch_object [ext/sybase_ct/tests/test_fetch_object.phpt]
Sybase-CT sybase_field_* functions [ext/sybase_ct/tests/test_fields.phpt]
Sybase-CT select LONG_MAX / LONG_MIN [ext/sybase_ct/tests/test_long.phpt]
Sybase-CT server message handler [ext/sybase_ct/tests/test_msghandler.phpt]
Sybase-CT server message handler [ext/sybase_ct/tests/test_msghandler_handled.phpt]
Sybase-CT query without storing [ext/sybase_ct/tests/test_query_nostore.phpt]
Sybase-CT select and types [ext/sybase_ct/tests/test_types.phpt]
Sybase-CT unbuffered query [ext/sybase_ct/tests/test_unbuffered_query.phpt]

Test script:

<?php
 $con = sybase_connect("SYBIL", "access", "access") or die ("sybase_connect failure\n");
 sybase_select_db("pfgrc_dev4") or die ("sybase_select_db failure\n");
 $qry = sybase_query("select * from z_logins", $con);
 echo sybase_result($qry, 1, 1);
 sybase_close($con);
?>

Script results:

% /opt/software/php-dev/bin/php test.php
sybase_select_db failure






Patches

sybase-configm4_5.3.3.diff (last revision 2010-08-23 14:14 UTC by royanee at yahoo dot com)
sybase-configm4_updated.diff (last revision 2010-08-20 20:35 UTC by royanee at yahoo dot com)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-02 10:16 UTC] mul at rentapacs dot de
Had the same problem on SLES10 SP1 x86_64 running ASE Express Edition 15.0.2. The patch to ext/sybase_ct/config.m4 from Bug #35945 worked for me except that library names needed an additional 'syb' prefix:

e.g. -lct -> -lsybct64

HTH ... Michael
 [2008-09-18 06:30 UTC] radha_krishna_komal at yahoo dot com
I have Some Store Procedure And If We Do not Open That Store 
Procedure up to few time than it gives Wrong Result.And When We Open 
That Store Procedure And Close Than it Gives me Right Result.
I want to tell You that I require the Recompile The Store Procedure 
Automatically After few Days Without Open That because I have Somuch 
Store Procedure That Take Much Time
 [2008-11-09 13:12 UTC] thekid@php.net
Please see if http://sitten-polizei.de/php/sybase-configm4.diff works for you.
 [2009-04-27 16:56 UTC] jani@php.net
Did the patch above fix this or not? Also update version field if you 
can still reproduce this with the latest PHP version(s).
 [2009-04-27 17:59 UTC] temmel at jcvi dot org
No, the patch did not fix the problem.
 [2009-05-17 20:53 UTC] jani@php.net
How did you test? Did you regenerate configure before running it again?
 [2009-05-25 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2010-08-20 19:57 UTC] royanee at yahoo dot com
After these steps:
 cd ext/sybase_ct;
 patch -p2 < sybase-configm4.diff;
 phpize;
 ./configure;

Output:
checking for Sybase-CT support... yes, shared
./configure: line 21483: syntax error: unexpected end of file

However, if I replace "else if" with "elif" and switch the test -f from "$SYBASE_CT_INCDIR/libsybct64" to "$SYBASE_CT_LIBDIR/libsybct64.so", it compile successfully. I'll try attaching my updated patch.
 [2010-08-20 22:39 UTC] royanee at yahoo dot com
Updated the patch again after debugging an issue where the severity level was either very large number or 116. It needed the -DSYB_LP64 CFLAG and now is able to correctly parse server communications, severity levels and query results.

Tested successfully on RHEL 5 x86_64, using PHP 5.3.2.
 [2010-08-22 11:52 UTC] thekid@php.net
-Status: No Feedback +Status: Duplicate
 [2010-08-22 11:52 UTC] thekid@php.net
This one looks like a duplicate of bug #50827 to me, which I fixed by a similar patch and committed that to SVN (trunk, 5_3, 5_2). So compiling PHP with sybase_ct w/ 64-bit libraries should work just fine by now. If not, can you provide a patch against current SVN?
 [2010-08-23 16:21 UTC] royanee at yahoo dot com
Thanks thekid. I was trying to build on 5.3.2 and none of the bugs I was able to find (#45357 and #35954) had the fix in yet, so I was happy to see that 5.3.3 was further along. Unfortunately, the "file_exists" check on the libsybct in INCDIR did not work on my installation. I only have the Open Client, so a recursive search of the installation directory only has the libsybct64.so and libsybct64.a in the LIBDIR. I updated the patch on this Bug, because I wasn't sure where else to put it.
 [2010-08-28 17:16 UTC] thekid@php.net
I'll look into this the beginning of next week - looks like this can be committed as-is.
 [2010-08-31 14:27 UTC] thekid@php.net
Automatic comment from SVN on behalf of thekid
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=302917
Log: - Add &quot;.so&quot; suffix to checks on libsybct[64] bundles
# See patch by royanee at yahoo dot com @ bug #45357
 [2010-08-31 14:28 UTC] thekid@php.net
Automatic comment from SVN on behalf of thekid
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=302918
Log: - MFT: Add &quot;.so&quot; suffix to checks on libsybct[64] bundles
# See patch by royanee at yahoo dot com @ bug #45357
 [2010-08-31 14:28 UTC] thekid@php.net
-Status: Duplicate +Status: Closed
 [2010-08-31 14:28 UTC] thekid@php.net
friebe@banane ~/devel/php/PHP_TRUNK/ext/sybase_ct
$ svn ci -m '- Add ".so" suffix to checks on libsybct[64] bundles
> # See patch by royanee at yahoo dot com @ bug #45357' config.m4
Sending        config.m4
Transmitting file data .
Committed revision 302917.

Also commited to PHP_5_3 branch.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC