Skip to Content.
Sympa Menu

freetds - [freetds] MSSQL functions missing from PHP when compiling with FreeTDS

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Markus Wolff <wolff AT 21st.de>
  • To: "'freetds AT lists.ibiblio.org'" <freetds AT lists.ibiblio.org>
  • Subject: [freetds] MSSQL functions missing from PHP when compiling with FreeTDS
  • Date: Wed, 11 Dec 2002 16:33:30 +0100

Hi all,

I´ve come a lot closer to success connecting to an MSSQL 2000 server
via FreeTDS - everything goes fine and I can retrieve results exactly
the way I want them.

However, I still have one problem that´s driving me nuts: Some
functions that PHP should offer me just aren´t there. I know this
might not be a FreeTDS related problem, but I´m completely out of
ideas and I can only hope to find someone who might at least know
what could be wrong.

My system is a SuSE 7.1 box with PHP 4.2.2 and FreeTDS 0.60 (FreeTDS
at /usr/local/ftds/). PHP was compiled using --with-sybase=/usr/local/ftds.

From what I´ve tried so far, the missing functions are:

- mssql_fetch_assoc()
- mssql_field_length()
- mssql_field_name()
- mssql_field_type()

...probably even more. Unfortunately, the last three functions are
needed by PEAR::DB´s tableInfo() method, which in turn is needed by most
of my applications.

In a previous thread, Freddy recommended to use the Sybase-CT library
instead of the default Sybase-DB, so innocently and unknowingly
as I am, I followed his advice and compiled PHP with the
--with-sybase-ct option instead of --with-sybase.
As a result, the Apache server threw lotsa segfaults into its error_log
as soon as I try to access the database:

FATAL: emalloc(): Unable to allocate -2147483648 bytes
FATAL: emalloc(): Unable to allocate -2147483648 bytes
[Mon Dec 9 17:21:17 2002] [notice] child pid 2094 exit signal
Segmentation fault (11)
[Mon Dec 9 17:21:17 2002] [notice] child pid 2093 exit signal
Segmentation fault (11)

...this goes on and on and on. Needless to say, the MSSQL connectivity
doesn´t work at all anymore, so I had to go back to DB-lib :-(

I sincerely hope that someone here has encountered similar problems here
and can point me into the right direction for solving this problem.
Regarding possible solutions, I really don´t care if I use the Sybase-DB
or Sybase-CT lib, as long as everything works okay and I have all
functions available that I need to get PEAR::DB´s tableInfo() up and
running.

I´m completely out of ideas - any help is greatly appreciated :-(

Regards,
Markus


--
*21st Media* | Consulting, Konzeption, Produktion für die Bereiche:
Markus Wolff | Internet, Intranet, eCommerce, Content Management,
Hamburg,Germany | Softwareentwicklung, 3D-Animation, Videostreaming
http://21st.de | Tel. [+49](0)40/6887949-0, Fax: [+49](0)40/6887949-1




  • [freetds] MSSQL functions missing from PHP when compiling with FreeTDS, Markus Wolff, 12/11/2002

Archive powered by MHonArc 2.6.24.

Top of Page