[freetds] how can i use freetds.conf with PHP?
sioakim at atlas.ace-hellas.gr
Tue May 6 03:15:22 EDT 2003
I just upgraded to the nightly build and solved my problems with long
queries that I had.
The problem now is that I can't insert or update a field with Greek
characters (I get english characters with ? like mentioned in the faq)
I read in the manual that you need something like the following:
host = 192.168.2.221
port = 1433
tds version = 7.0
client charset = GREEK
so my PHP code is as simple as that:
$connectid = mssql_connect("mssql" , "sa" ,"sa" );
$r = mssql_select_db ("icad");
$query="update icad_weather_sun set hmeromhnia='$hmnia',
giortazoyn='$output', eorth='$eorth' where date_entered='2'";
$result = mssql_query ($query);
the values of $output and $eorth are in Greek.
Problem is that php can't locate the server.
I'm using as I said freetds without any problems to connect to databases
and execute queries but not inserting greek characters except on the
I had solved the problem with an older version of freetds by setting
Do I need to recompile PHP with a new freetds.conf?
Does PHP even check for freetds.conf?
How can I put in a PHP script that I want client charset Greek?
I have compiled freetds with:
./configure --with-tdsver=7.0 --enable-msdblib --with-unixodbc
and php (4.3.1) with:
./configure --with-mysql --with-apxs=/usr/local/apache/bin/apxs
--with-zlib-dir=/usr/include/ --disable-cli --with-imap --with-kerberos
I'm running apache 1.3.27. System is RH 9.
Any help would be greatly appreciated.
Thanks in advance,
More information about the FreeTDS