473,413 Members | 2,066 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

odbc_connect fails & returns 1 on attempt


Greetings,

Curious to see if anyone has had a similar issue.

- solaris 2.8, sparc
- apache 1.3.31
- php v. 5.0.3
- using easysoft odbc drivers
- using unixODBC
- apache built with php and required odbc/easysoft/unixODBC libraries
statically linked (some)
- connecting to MSSQL 2000

the problem is with this code:

// the $connect variable contains the full {DSN=blah;SERVER=blah;PORT...
etc)
$cnx = odbc_pconnect($connect, $uid, $pwd) || printf("ERROR CONNECTING<p>");

if ($cnx == 0) {

printf ("unable to establish connection - $cnx");

} else {

echo $cnx;
$rs = odbc_exec($cns, "use db;");
odbc_close($cnx);

}

the odbc_connect will return the value of "1" to the $cnx handle. anyone
ever see this? no errors are thrown (from program output, or apache error
logs). the auth seems to work OK... when I change the pwd to something
incorrect, the proper errors pop up.

i'm new to php, is there further debugging that I can do? the MSSQL box is
offsite and i won't be able to do detailed error analysis from it's logs.

i 'trace'd the php command from the command line, which produced the same
error, with the trace not really showing any fruitful details from the calls
made.

i guess this is more of a unixODBC or easysoft issue, but was just wondering
if anyone has noticed this return type.

thanks in advance,
Dan

Jul 17 '05 #1
0 1250

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Glutinous | last post by:
I've been studying this for hours, searching the www & usenet, and still can't figure out why 'each' returns an array of four key/value pairs, when it looks like just two pairs would suffice... ...
0
by: Phil Powell | last post by:
<?php class Grad { var $dbFormExemptionArray = array(); function Grad ($id = '') { ...
0
by: Jay Allard | last post by:
Hello I posted this in the vb.net group on the 2/25/2004, but didn't get any response. Here's attempt 2. Does anyone know of a more appropriate place to post this? One new piece of...
36
by: Thomas | last post by:
after spending countless hours trying, i give up and hope to get some help in here. on server1 i got the web myweb.com with my test.asp. in the test.asp, i'm trying to read a file from an UNC...
7
by: theBestFriend | last post by:
If I type in the vualue && from the standard input and store it into myInputString variable, I expected that expression if(myInputString == "&&") will evaluate to true, but it doesn't. Can you...
28
by: Sathyaish | last post by:
If fopen fails, is there a way to know why?
1
by: netkev | last post by:
I added the microsoft terraserver wsdl(version 2) as a web reference to my c++ application(vs.net 2k3). When I attempt to execute the getAreaFromPT method, I get an 'unspecified error' HRRESULT. ...
8
by: VB Programmer | last post by:
I would appreciate your assistance on this ASP.NET 2.0 site.... This is the wierd problem: While accessing the built in .NET functions for 'profiling' or 'membership' an error is generated (see...
3
by: Bill | last post by:
Hi, I installed PHP 5.0 on my linux box. In php.ini, i added this: extension=odbc.so But i still get the error:"Call to undefined function odbc_connect()" when trying to run this command:...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.