Skip to Content.
Sympa Menu

freetds - RE: PHP to Sybase

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: "'TDS Development Group'" <freetds AT franklin.metalab.unc.edu>
  • Subject: RE: PHP to Sybase
  • Date: Mon, 30 Sep 2002 13:28:31 -0400


From: Brian Paquin [mailto:brian.paquin AT yale.edu]
Sent: September 30, 2002 1:14 PM

Using MacOS X.2, PHP 4.3dev, FreeTDS 0.60, and Sybase ASE 12.5.
iSQL and tSQL work great.
<? phpinfo()?> works great


But how to I connect to Sybase??


Using:
-----------------------
<?php
$conn = sybase_connect("PATH046", "sa", "");
sybase_select_db("pubs2");
$qry = sybase_query("select * from titles", $conn);

echo sybase_result($qry, 1, 1);

sybase_close($conn);
?>
------------------------
will not connect:
(Warning: Sybase: Unable to connect in
/Library/WebServer/Documents/testconnect.php on line 2)

+++

Brian,

Well, if I could suggest two things, they would be to have PHP produce
errors in a smaller font and to submit list mail in plain text. :)

To address the technical problem:

1. Are you sure PHP is running with the same environment etc. as tsql? Are
there any environment variables at work?

2. I would turn on logging and have a look at the traffic. My guess is
you'll see an error come back from the server that will explain the problem.
If you don't see anything amiss in the log, post it here to let some
greybeard can have a looksee.

Regards,

--jkl


The information contained in this transmission may contain privileged and
confidential information and is intended only for the use of the person(s)
named above. If you are not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, any
review, dissemination, distribution or duplication of this communication is
strictly prohibited. If you are not the intended recipient, please contact
the sender immediately by reply e-mail and destroy all copies of the
original message. Please note that for certain accounts we do not accept
orders and/or instructions by e-mail, and for those accounts we will not be
responsible for carrying out such orders and/or instructions. Kindly refrain
from sending orders or instructions by e-mail unless you have confirmed that
we accept such communications for your account. Please also note that to
satisfy regulatory requirements we review the outgoing and incoming e-mail
correspondence of staff members serving certain functions.






Archive powered by MHonArc 2.6.24.

Top of Page