Skip to Content.
Sympa Menu

freetds - RE: Mysterious segfaults PHP+unixODBC+freetds

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Dave Brotherstone" <davegb AT pobox.com>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: RE: Mysterious segfaults PHP+unixODBC+freetds
  • Date: Tue, 4 Jun 2002 12:40:17 +0100


This can happen in PHP when you select binary type fields (e.g.
uniqueidentifiers) - the conversion code doesn't always work, and can depend
on the actual values - it converts it to text, such that when it works, you
get a character string equivalent - which may of course not be a valid
string in PHP. Atleast, I believe that is what the problem is. The best
thing to do is convert(char(36),your_unique_id_field) in the query. The
same thing (I think) happens on currency types.

BTW - this isn't a freetds issue - it's PHP.

hth,
Dave.

> -----Original Message-----
> From: bounce-freetds-139968 AT franklin.oit.unc.edu
> [mailto:bounce-freetds-139968 AT franklin.oit.unc.edu]On Behalf Of Björn
> Lantz
> Sent: 04 June 2002 11:06
> To: TDS Development Group
> Subject: [freetds] Mysterious segfaults PHP+unixODBC+freetds
>
>
> Hi,
>
> I use php4.2.1 + unixODBC 2.2.1 + freetds 0.53. I use the php scripts to
> connect to ms sql server 7 hosted on nt4 machines.
>
> When I connect to the local (on the LAN) sql server everything seems fine,
> but when i connect to a remote server over the Internet i get segfaults in
> the httpd log and very strange odbc results. I hit my refresh-button in
> the broser, and the php-script that generates the output based on a query
> works 1/2 of the times. And - I assure you - it is not a php-programming
> error.
>
> I don't know where the error might be, but I suspect that the response
> time when I communicate over out 512kbps line might have to do with it. I
> read a posting about the timeout settings in the freetds.conf file. Could
> that be the problem?
>
> Is php+unixODBC+freetds a good configuration. Is it better to use iODBC?
>
> Thanks for any help.
> /Björn
>
> ---
> You are currently subscribed to freetds as: [davegb AT pobox.com]
> To unsubscribe, forward this message to
> $subst('Email.Unsub')
>
>





Archive powered by MHonArc 2.6.24.

Top of Page