|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3874 sybase_query() fails
Submitted: 2000-03-19 17:46 UTC Modified: 2000-05-22 03:53 UTC
From: pettern at thule dot no Assigned:
Status: Closed Package: Sybase-ct (ctlib) related
PHP Version: 4.0 Beta 4 Patch Level 1 OS: Suse 6.2 Linux 2.2.10
Private report: No CVE-ID: None
 [2000-03-19 17:46 UTC] pettern at thule dot no
sybase_query() fails:

Warning: 1 is not a valid Sybase-Link resource in file.php on line 100

This worked flawlessly with 3.0.x versions. 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-03-19 18:06 UTC] pettern at thule dot no
The code looks like this:

$result = sybase_query($query) or die( "query failed:  '$query'");

It's a normal, working, select statement.
 [2000-03-19 18:11 UTC] pettern at thule dot no
It's worth noting that I use sybase_pconnect() for all connections.
 [2000-04-08 00:39 UTC] joey at cvs dot php dot net
It is my guess that PHP was having a hard time logging in to sybase.
Maybe a configuration problem?
Do you still see this?
 [2000-04-08 16:29 UTC] pettern at thule dot no
I just tried it with the latest RC1 version and the same problem occured. This is with Sybase-CT and Sybase 11.9.2.
Anything I can do to help find the problem?
 [2000-04-23 23:07 UTC] pettern at thule dot no
What is happening with this report? I'd like to be able to use PHP4 with Sybase.
 [2000-04-24 17:45 UTC] joey at cvs dot php dot net
Please try something like this

$db = sybase_pconnect("SYB_SERVER", "user", "password") or die("Could not connect to database.");


What do you get?
 [2000-04-26 16:29 UTC] pettern at thule dot no
I got the same. However, seeing the $db in your statement got me trying this:

$ok = sybase_pconnect($dbhost,$dbuser,$dbpwd) or die ( "Unable to connect to SQL server.");
        die("Error connecting to SQL Server");

I see no  reason why this should function any better, unless the use of the or has changed. 
However, this works for SELECT and INSERT queries, but fails if I do a "BEGIN TRANSACTION" to start a more advanced operation.

So well, closer but no cigar yet.  
 [2000-05-22 03:53 UTC] joey at cvs dot php dot net
Hmm, I have never tried using transactions from PHP.
Try 4.0 when I comes out, let me know how things go
(ie, open a new bug report if needed.)
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 19:01:31 2024 UTC