php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #6339 invalid Sybase-link resource - problem with last opened link
Submitted: 2000-08-24 18:01 UTC Modified: 2004-01-23 20:49 UTC
From: dpetrov at nchcapital dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.2 OS: FreeBSD 3.4
Private report: No CVE-ID: None
 [2000-08-24 18:01 UTC] dpetrov at nchcapital dot 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).

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-09-29 21:17 UTC] dpetrov at nchcapital dot com
This confirmed to be a problem in version 4.0.2 as well
 [2000-12-11 21:12 UTC] joey@php.net
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.
 [2004-01-23 20:49 UTC] thekid@php.net
This bug has been fixed long, long ago, closing it:)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC