php.net |  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: pettern at thule dot no
New email:
PHP Version: OS:

 

 [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. 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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
<?

error_reporting(-1);
$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.");
if(!$ok)  
{
        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-2019 The PHP Group
All rights reserved.
Last updated: Fri May 24 15:01:26 2019 UTC