Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.
Takie buty.. Baza na SQL Express na XP Pro i Apache z PHP @ Debian
Cos tam zaczytalem o FreeTDS zrobilem sobie konfiga..
[Venus]
host = 192.168.1.30
instance = SQL
port = 1433
tds version = 7.0
14:28:48.063444 18296 (log.c:190):Starting log file for FreeTDS 0.82 on 2009-02-03 14:28:48 with debug flags 0xffff. 14:28:48.064129 18296 (iconv.c:197):names for ISO-8859-1: ISO-8859-1 14:28:48.064202 18296 (iconv.c:197):names for UTF-8: UTF-8 14:28:48.064232 18296 (iconv.c:197):names for UCS-2LE: UCS-2LE 14:28:48.064262 18296 (iconv.c:197):names for UCS-2BE: UCS-2BE 14:28:48.064291 18296 (iconv.c:363):iconv to convert client-side data to the "ANSI_X3.4-1968" character set 14:28:48.064371 18296 (iconv.c:516):tds_iconv_info_init: converting "US-ASCII"->"UCS-2LE" 14:28:48.064435 18296 (iconv.c:516):tds_iconv_info_init: converting "ISO-8859-1"->"UCS-2LE" 14:28:48.064467 18296 (net.c:836):tds7_get_instance_port(192.168.1.30, SQL) 14:28:49.060959 18296 (net.c:905):tds7_get_instance_port: timed out on try 0 of 16 14:28:50.060963 18296 (net.c:905):tds7_get_instance_port: timed out on try 1 of 16 14:28:51.060959 18296 (net.c:905):tds7_get_instance_port: timed out on try 2 of 16 14:28:52.060963 18296 (net.c:905):tds7_get_instance_port: timed out on try 3 of 16 14:28:53.060960 18296 (net.c:905):tds7_get_instance_port: timed out on try 4 of 16 14:28:54.060961 18296 (net.c:905):tds7_get_instance_port: timed out on try 5 of 16 14:28:55.060960 18296 (net.c:905):tds7_get_instance_port: timed out on try 6 of 16 14:28:56.060962 18296 (net.c:905):tds7_get_instance_port: timed out on try 7 of 16 14:28:57.060958 18296 (net.c:905):tds7_get_instance_port: timed out on try 8 of 16 14:28:58.060963 18296 (net.c:905):tds7_get_instance_port: timed out on try 9 of 16 14:28:59.060961 18296 (net.c:905):tds7_get_instance_port: timed out on try 10 of 16 14:29:00.060963 18296 (net.c:905):tds7_get_instance_port: timed out on try 11 of 16 14:29:01.060963 18296 (net.c:905):tds7_get_instance_port: timed out on try 12 of 16 14:29:02.060964 18296 (net.c:905):tds7_get_instance_port: timed out on try 13 of 16 14:29:03.060960 18296 (net.c:905):tds7_get_instance_port: timed out on try 14 of 16 14:29:04.060962 18296 (net.c:905):tds7_get_instance_port: timed out on try 15 of 16 14:29:04.061140 18296 (net.c:974):instance port is 0 14:29:04.061174 18296 (login.c:418):invalid port number 14:29:04.061228 18296 (dblib.c:1372):dbclose(0x899a178) 14:29:04.061262 18296 (dblib.c:256):dblib_del_connection(0xb6757640, 0x83bd500) 14:29:04.061364 18296 (mem.c:563):tds_free_all_results() 14:29:04.061422 18296 (dblib.c:303):dblib_release_tds_ctx(1) 14:29:04.061470 18296 (dblib.c:5727):dbfreebuf(0x899a178) 14:29:04.061705 18296 (dblib.c:718):dbloginfree(0x83bf6f0)
Jesli zakomentuje
[Venus]
host = 192.168.1.30
; instance = SQL
port = 1433
; tds version = 7.0
14:30:41.625627 18300 (log.c:190):Starting log file for FreeTDS 0.82 on 2009-02-03 14:30:41 with debug flags 0xffff. 14:30:41.625712 18300 (iconv.c:363):iconv to convert client-side data to the "ANSI_X3.4-1968" character set 14:30:41.625788 18300 (iconv.c:516):tds_iconv_info_init: converting "US-ASCII"->"UCS-2LE" 14:30:41.625835 18300 (net.c:210):Connecting to 192.168.1.30 port 1433 (TDS version 4.2) 14:30:41.626047 18300 (net.c:264):tds_open_socket: connect(2) returned "Operation now in progress" 14:30:41.626231 18300 (net.c:299):getsockopt(2) reported: Connection refused 14:30:41.626288 18300 (util.c:334):tdserror(0x89325e8, 0x8c7bd98, 20009, 115) 14:30:41.626327 18300 (dblib.c:7782):dbperror(0x8c799d8, 20009, 115) 14:30:41.626361 18300 (dblib.c:7835):20009: "Unable to connect: Adaptive Server is unavailable or does not exist" 14:30:41.626392 18300 (dblib.c:7856):"Unable to connect: Adaptive Server is unavailable or does not exist", client returns 2 (INT_CANCEL) 14:30:41.626424 18300 (util.c:368):tdserror: client library returned TDS_INT_CANCEL(2) 14:30:41.626454 18300 (util.c:389):tdserror: returning TDS_INT_CANCEL(2) 14:30:41.626483 18300 (net.c:310):tds_open_socket() failed 14:30:41.626521 18300 (dblib.c:1372):dbclose(0x8c799d8) 14:30:41.626551 18300 (dblib.c:256):dblib_del_connection(0xb6757640, 0x8c7bd98) 14:30:41.626650 18300 (mem.c:563):tds_free_all_results() 14:30:41.626693 18300 (dblib.c:303):dblib_release_tds_ctx(1) 14:30:41.626735 18300 (dblib.c:5727):dbfreebuf(0x8c799d8) 14:30:41.626877 18300 (dblib.c:718):dbloginfree(0x8c89538)
Nigdy tego nie gryzlem wiec prosze o pomoc.. sposob laczenia..
<? $connection = mssql_connect("Venus", "wydruki", "pass"); ?>
Offline
Może nie do końca odpowiedź na Twoje pytanie, ale zgodna tematycznie. Ja do łączenia się z MS SQL używam [url=http://adodb.sourceforge.net/]ADOdb[/url], ewentualnie czasem połączenie uzyskuje przez ODBC skonfigurowane na maszynie z Window$em.
Jeżeli któryś ze sposobów bardziej Cię zainteresuje napisz, to szerzej opisze moje poczynania.
Offline
http://www.howtoforge.com/php5_mssql_debian_etch_free_tds_unix_odbc
Offline
Time (s) | Query |
---|---|
0.00010 | SET CHARSET latin2 |
0.00005 | SET NAMES latin2 |
0.00068 | SELECT u.*, g.*, o.logged FROM punbb_users AS u INNER JOIN punbb_groups AS g ON u.group_id=g.g_id LEFT JOIN punbb_online AS o ON o.ident='3.145.9.80' WHERE u.id=1 |
0.00134 | REPLACE INTO punbb_online (user_id, ident, logged) VALUES(1, '3.145.9.80', 1733367806) |
0.00044 | SELECT * FROM punbb_online WHERE logged<1733367506 |
0.00053 | SELECT topic_id FROM punbb_posts WHERE id=109621 |
0.00098 | SELECT id FROM punbb_posts WHERE topic_id=13318 ORDER BY posted |
0.00027 | SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM punbb_topics AS t INNER JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id=13318 AND t.moved_to IS NULL |
0.00027 | SELECT search_for, replace_with FROM punbb_censoring |
0.00046 | SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM punbb_posts AS p INNER JOIN punbb_users AS u ON u.id=p.poster_id INNER JOIN punbb_groups AS g ON g.g_id=u.group_id LEFT JOIN punbb_online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id=13318 ORDER BY p.id LIMIT 0,25 |
0.00087 | UPDATE punbb_topics SET num_views=num_views+1 WHERE id=13318 |
Total query time: 0.00599 s |