Skip to Content.
Sympa Menu

freetds - Re: [freetds] freeTDS 0.62.4 / PHP 4.3.8 / AIX 4.3.3

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddyz77 AT tin.it>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] freeTDS 0.62.4 / PHP 4.3.8 / AIX 4.3.3
  • Date: Sat, 05 Feb 2005 08:26:47 +0100

Il giorno sab, 05-02-2005 alle 01:38 +0000, Joffrey Pannequin ha
scritto:
> Thanks for your answers. And for the archives which helped me a lot.
>
> At the end of the mail is the solution of the problem :
>
> Joffrey Pannequin wrote:
>
> > Hello,
> >
> > I have several problems making freetds and php works together under AIX.
> > Has anyone successdully used this installation ?
> >
> > At first, the apps and pools did not link OK. So I had to use the idea
> > of Fréderic le Guillou :
> > https://lists.ibiblio.org/sympa/arc/freetds/2004q3/016748.html
> >
> > Now I have freetds which compiles and links OK. I can test the
> > connection to a SQL*Server DB with tsql.
> >
> > I made this PHP test script :
> >
> > <?php
> > $con = mssql_connect ("ip:port", "user", "****");
> > mssql_select_db ("db_name", $con);
> > $sql= "SELECT * FROM TABLE";
> > sleep(30);
> > $rs= mssql_query ($sql, $con);
> > echo "<html><head>/Title/</head><body>The field number one is:";
> > echo mssql_result ($rs, 0, 0);
> > echo " </body></html>";
> > mssql_close ($con);
> > ?>
> >
> > It works on the command line of php, but not from apache.
> > Why ?
> >
> > Another problem : when I change the code of freetds, i can recompile and
> > install in /usr/local/freetds the libraries, but it seems php does not
> > use the libraries (I can delete them, php command line still works).
>
> The explanation : freetds is linked inside the php lib and exec. So
> after recompiling freetds, I had to relink php.
>
> >
> > My compilation directive :
> >
> > UnixODBC :
> > ./configure --prefix=/usr/local/unixODBC --enable-gui=no
> >
> > Freetds :
> >
> > ./configure --prefix=/usr/local/freetds
> > --with-unixodbc=/usr/local/unixODBC --with-tdsver=8.0 --enable-dbmfix
> >
> > PHP :
> > ./configure --prefix=/usr/local/php
> > --with-apxs=/usr/local/apache/bin/apxs
> > --with-oci8=/oracle/oracle8/app/oracle/product/8.1.7
> > --with-mssql=/usr/local/freetds --without-mysql
> > --with-unixODBC=/usr/local/unixODBC
> >
> > Thanks,
> >
> > Joffrey Pannequin
> >
> >
> >
> >
> > _______________________________________________
> > FreeTDS mailing list
> > FreeTDS AT lists.ibiblio.org
> > http://lists.ibiblio.org/mailman/listinfo/freetds
> > From - Fri
>
>
> Still the same architecture : freeTDS 0.62.4 / PHP 4.3.8 / AIX 4.3.3 .
>
> I have been trying to locate the line in the source code that causes
> the problem, by debugging the program.
> It appeared to me that it was due to a call to iconv_open.
> This call works on the command line.
> But not when called from the php module (libphp4.so) for Apache.
> --disable-libiconv
> So I launched the configure with the following options :
>
> ./configure --prefix=/usr/local/freetds --disable-libiconv
> --without-unixodbc --with-tdsver=8.0 --enable-dbmfix --disable-shared
>
> --disable-libiconv is to use the iconv coded inside freetds instead of
> the one from AIX or gcc or whatever (see
> https://lists.ibiblio.org/sympa/arc/freetds/2004q1/015431.html and the
> replies).
> --disable-shared is to use static library instead of shared ones. It
> means freetds will be inside php and not as a separate module (so
> bigger). But it avoided me segmentation fault... I guess it is due to
> the way AIX deals with shared libraries.
>

Should be fixed in 0.63. It require mainly newer libtool.

> And now I can finally see my test page in my browser (well after the
> make && make install && [configure,make,make install for php as well]).
>
>
> Note : I have to disable odbc by hand (in the Makefile) or I missed
> something (maybe --without-odbc).

Yes, there is an option to disable odbc.

freddy77






Archive powered by MHonArc 2.6.24.

Top of Page