freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "James K. Lowden" <jklowden AT speakeasy.org>
- To: TDS Development Group <freetds AT franklin.oit.unc.edu>
- Cc: À̱Իó <stormbr AT hanmail.net>
- Subject: Zeus & PHP
- Date: Sat, 22 Sep 2001 13:54:54 -0400
Kyu-sang Lee,
Welcome to FreeTDS.
I have forwarded your message the FreeTDS mailing list. Please
subscribe to the list (directions are in the FAQ). You'll find people
there who are much better qualified than I am. It's a pretty friendly
bunch.
I don't know the answer to your question. Can you get any interaction
between PHP and Zeus, trying to talk to the database? From what you
say, it looks to me like "502 Bad Gateway" is a Zeus error message,
complaining about its CGI interface to PHP. But since I've never used
*either* product, my guess is worth the paper it's written on.
Regards,
--jkl
À̱Իó wrote:
>
> To whom it may concern,
>
> I used the freetds for connecting linux and mssql.And used zeus(web
> server). But the problems occurs.
>
> Another case, using freetds in apache, I succeeded. But in zeus, it didn't
> work.
> In linux, I installed zeus , devkit(=fastcgi, for using php in zeus),
> freetds and php-4.0.5.
>
> And in window, i installed advanced server 2000, mssql 2000, and mssql
> servcie pack, too.
>
> First, I compiled devkit, and installed.
> Then I compiled freetds like this.
>
> ./configure --prefix=/usr/local/freetds --with-tdsver=7.0 --enable-msdblib
> --enable-dbmfix --with-gnu-ld --enable-shared --enable-static
>
> And I compiled php like this.
>
> ./configure --enable-inline-optimizations --disable-debug --with-
> fastcgi=/usr/local/zeus --with-mysql=/usr/local/mysql --with-
> sybase=/usr/local/freetds --enable-track-vars
>
> After that in zues, I applied fastcgi for using php. But I have encountered
> the message. "502 Bad Gateway".
> How can I make the connection? Doesn't it work in zeus?
>
> I was tried to find a workaround whatever I should search. But I don't know
> where the problems is happened.
>
> Anywhere if you know the way to connect linux -> mssql using zeus, and
> freetds, please tell me the way or the reference.
> I attach the file that I used the test.
>
> Best Regard
> Kyu-sang Lee
>
> ===================================================================
> ¿ì¸® ÀÎÅͳÝ, Daum http://www.daum.net
> ȲöÇÑ ¿ø¼¦ °Ë»ö! Daum°Ë»ö ÄíÄ¡·Î ãÀÚ!
> ¢Ñ°Ë»öÇϱâ http://search.daum.net
>
>
> <?
> // YOUR MSSQL 7.0 SERVER PARAMETERS
> $hostname = "myDBserver"; // hostname. written in interface
> $username = "sa"; // username
> $password = ""; // password
>
> echo ("test");
>
> // YOUR MSSQL 7.0 DATABASE
> $dbname = "diablo2"; // db name
> $tablename = "d2_user" ; // table name
>
> // CONNECT TO THE MSSQL 7.0 DATABASE
> $connection = mssql_connect($hostname,$username,$password);
> mssql_select_db($dbname);
> $sql_query = "select TOP 10 * from $tablename" ;
> $query_result =mssql_query($sql_query) ;
> $number_rows = mssql_num_rows($query_result) ;
> $number_fields = mssql_num_fields($query_result) ;
>
> // TEST YOUR QUERY
> if($number_rows == 0) :
> print " The query does not produce any data row ! " ;
> elseif ($number_rows > 0) :
> print " Yes there are " . $number_rows . " rows resulting from the query.
> " ;
> endif ;
>
> // DISPLAY INDIVIDUAL ROWS - POPULATING THE TABLE
> for ($row_number = 0 ; $row_number <= $number_rows - 1 ; $row_number++)
> {
> print "<tr><td>" . $row_number . "</td>" ;
> for ($field_number = 0 ; $field_number <= $number_fields - 1 ;
> $field_number++)
> {
> print "<td>" . mssql_result($query_result, $row_number, $field_number) .
> "</td>" ;
> }
> print "</tr>" ;
> }
> print "</table>" ;
>
> mssql_close($connection);
>
> ?>
-
Zeus & PHP,
James K. Lowden, 09/22/2001
- <Possible follow-up(s)>
- RE: Zeus & PHP, Miguel Dias, 09/22/2001
Archive powered by MHonArc 2.6.24.