PHP 4.0 Bug #6339 Updated: invalid Sybase-link resource - problem with last opened link
| From: | joey@php.net | Date: | Tue, 12 Dec 2000 02:12:53 +0000 |
| Subject: | PHP 4.0 Bug #6339 Updated: invalid Sybase-link resource - problem with last opened link | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-40917@lists.php.net to get a copy of this message | ||
ID: 6339
Updated by: joey
Reported By: dpetrov@nchcapital.com
Old-Status: Open
Status: Analyzed
Old-Bug Type: Sybase-ct (ctlib) related
Bug Type: Feature/Change Request
Assigned To:
Comments:
Actually, the same thing happens no matter what the database
is, so I'm going to reclassify this as a Feature Request, since there is a work around, and the
syntax being used here
doesn't really make a whole lot of sense.
The basic issue: If you do not store the result of the
*_pconnect(), PHP discards it.
Previous Comments:
---------------------------------------------------------------------------
[2000-09-29 21:17:35] dpetrov@nchcapital.com
This confirmed to be a problem in version 4.0.2 as well
---------------------------------------------------------------------------
[2000-08-24 18:01:50] dpetrov@nchcapital.com
I am giving the simplest example possible:
sybase_connect("abc","def","jkl"); // or die("Can't
connect!");
$res=sybase_query("Select * FROM Companies");
I always get this:
Warning: 1 is not a valid Sybase-Link resource in ...
Yet, if I replace 1st line with this:
$somevariable = sybase_connect("abc","def","jkl"); // or
die("Can't connect!");
then everything works just fine (even though I do not really use $somevariable anywhere).
This probably means that the link it not being registered properly internally.
I did not have this problem with Sybase-dblib (yet there is a big problem wirg sybase_fetch_row - it
core dumps PHP/Apache).
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=6339