php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22676 Warning: 1 is not a Sybase link index in...
Submitted: 2003-03-13 08:40 UTC Modified: 2003-07-20 10:35 UTC
Votes:5
Avg. Score:5.0 ± 0.0
Reproduced:5 of 5 (100.0%)
Same Version:2 (40.0%)
Same OS:3 (60.0%)
From: mgruenb at gmx dot net Assigned:
Status: No Feedback Package: Sybase (dblib) related
PHP Version: 4.3.1 OS: Gentoo + SuSE
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2003-03-13 08:40 UTC] mgruenb at gmx dot net
Hi Guys,

I can't get Sybase to work with PHP any more. Everything worked fine with previous versions of PHP, but since 4.3.1 I always get for all scripts the following:

Warning: 1 is not a Sybase link index in /mnt/hda7/www/html/pathbase2/sybasetest.php on line 5

Warning: 0 is not a Sybase result index in /mnt/hda7/www/html/pathbase2/sybasetest.php on line 6

In old versions I only used to get those if I did a fopen / include before a sybase_connect, but now I even get it in simple scripts like this:
<?
$query="SELECT * FROM image_data";
$link=sybase_pconnect("SYBASE","PATHBASEUSER","pathbaseuser3465","iso_1");
$dbase=sybase_select_db("pathbase2",$link);
$result=sybase_query($query,$dbase);
for ($i=1; $i<=sybase_num_rows($result); $i++)
{
$row=sybase_fetch_array($result);
echo"$row[image_number]";
}
?>

I'll try the lates snapshot now and report back here later.

Hope this helps!

Cheers,

Michael.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-13 09:10 UTC] mgruenb at gmx dot net
OK I've also tried (on Gentoo only):

php4-200303131430.tar.bz2
php4-STABLE-200303131430.tar.bz2

with the same results / error messages. Btw, I get the following during compilation:

/opt/sybase/lib/libsybdb.so: `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead
/opt/sybase/lib/libsybdb.so: `sys_nerr' is deprecated; use `strerror' or `strerror_r' instead

Sybase version is ASE 11.9.2

With
php5-200303131430.tar.bz2 I get the following during compilation:

gcc  -Iext/sybase/ -I/usr/local/php5-200303131430/ext/sybase/ -DPHP_ATOM_INC -I/usr/local/php5-200303131430/include -I/usr/local/php5-200303131430/main -I/usr/local/php5-200303131430 -I/usr/local/php5-200303131430/Zend -I/usr/include/libxml2 -I/usr/X11R6/include -I/usr/include/freetype2 -I/opt/sybase/include -I/usr/local/php5-200303131430/ext/xml/expat  -I/usr/local/php5-200303131430/TSRM  -g -O2  -c /usr/local/php5-200303131430/ext/sybase/php_sybase_db.c -o ext/sybase/php_sybase_db.o  && echo > ext/sybase/php_sybase_db.lo
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c: In function `php_sybase_do_connect':
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:395: request for member `value' in something not a structure or union
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c: In function `zif_sybase_select_db':
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:669: invalid type argument of `unary *'
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c: In function `zif_sybase_free_result':
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:927: parse error before "if"
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c: At top level:
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:928: parse error before "return"
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:930: `sybase_result_index' undeclared here (not in a function)
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:930: `type' undeclared here (not in a function)
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:930: warning: initialization makes integer from pointer without a cast
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:930: initializer element is not constant
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:930: warning: data definition has no type or storage class
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:932: parse error before "if"
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:934: parse error before '->' token
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:936: parse error before '(' token
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:937: parse error before '->' token
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c: In function `zif_sybase_fetch_object':
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:1081: invalid lvalue in assignment
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:1082: invalid lvalue in assignment
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c: In function `zif_sybase_result':
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:1299: request for member `value' in something not a structure or union
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c: In function `zif_sybase_affected_rows':
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:1343: invalid type argument of `->'
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:1343: invalid type argument of `->'
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:1343: incompatible types in initialization
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:1343: incompatible types in assignment
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:1343: invalid type argument of `unary *'
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:1343: incompatible type for argument 1 of `_zval_copy_ctor'
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:1343: invalid type argument of `->'
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:1343: invalid type argument of `->'
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:1343: incompatible type for argument 1 of `convert_to_long'
/usr/local/php5-200303131430/ext/sybase/php_sybase_db.c:1344: invalid type argument of `unary *'
make: *** [ext/sybase/php_sybase_db.lo] Error 1

but that might be my gcc version: 3.2.2

Cheers,

Michael.
 [2003-05-01 19:28 UTC] sniper@php.net
Try --with-sybase-ct option instead.

 [2003-05-09 07:31 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2003-05-09 08:17 UTC] mgruenb at gmx dot net
--with-sybase-ct
is not really a bug fix. Does this mean --with-sybase is no longer supported?
 [2003-07-13 00:11 UTC] sniper@php.net
Did you try it or not? (with latest CVS snapshot)

 [2003-07-20 10:35 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2004-05-18 02:05 UTC] wakims at yahoo dot com
I am having a similar problem with PHP 4.3.4 when I try to connect to a sybase database. Please let me know how to fix this.

Wambui
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 07:01:29 2024 UTC