[PHP-users 23153] Zero Sized Reply

稲村 暢亮 inamuran36 @ mahikari.or.jp
2004年 8月 31日 (火) 23:58:55 JST


稲村と申します。お世話になります。

現在Linux(Debian)にPHP4.3.4、WindowsにFirebird1.5SSをインストールしてプロ
グラムを作成しているところです。
データベースへはPEARを使用して接続をしようとしています。

以前はすべてLinuxでMySQLを使用して接続していました。そのときは何も問題なく
データベースとのやり取りが出来ていたのですが、
新しい環境では次のエラーが返ってきてしまいます。

-----------------------------------------------------------------------
ERROR
The requested URL could not be retrieved

While trying to retrieve the URL: http://192.168.2.205/nx/index.php

The following error was encountered:

    * Zero Sized Reply

Squid did not receive any data for this request.

Your cache administrator is webmaster.
Generated Tue, 31 Aug 2004 14:00:49 GMT by Knoppix (squid/2.5.STABLE3)
----------------------------------------------------------------------------
-
なにも返ってこない・・・らしい。

今回は台湾・韓国などの難しい漢字にも対応するために、データベース・PHPともに
UNICODEで作成していたので、
文字コードのせいかと思い、PEARの設定にcharsetの項目を加えたりして試したので
すが、改善されませんでした。

データベース名”ibase(firebird)”を他のDBの名前に変更すると、データベース
につなげなかったという
エラーがPHPのエラーメッセージとして返ってきます。
しかし、HOSTの方を変えると ”Zero Sized Reply” のエラーが出るのでおそらく
PEARのibase.phpか何か
ではないかと思うのですがそこから先がどうしても分かりませんでした。(的はずれ
だったらすみません。)

PEARを使用した接続の設定は次のようになってます(基本的には以前のものです。だ
た、charsetの項目を追加しています)。
----------------------------------------------------------------------------
-------
  function Init_class(){
        $this->set_env();
        $db_string =
"ibase(firebird)://".$this->env_array["db_user"].":".$this->env_array["db_pa
ss"]."@"

.$this->env_array["db_host"]."/".$this->env_array["db_name"]."?charset=".$th
is->env_array["db_char"];
        $this->db_object = DB::connect($db_string);

        $this->smarty_obj = new Smarty();
        $this->smarty_obj->template_dir = $this->env_array["template_dir"];
        $this->smarty_obj->compile_dir = $this->env_array["compile_dir"];
        $this->smarty_obj->config_dir = $this->env_array["config_dir"];
    }
    function set_env(){
        $this->env_array["db_user"] = "-----";
        $this->env_array["db_pass"] = "○○○";
        $this->env_array["db_host"] = "192.168.0.113";
        $this->env_array["db_name"] = "c:\database\master.fdb";
        $this->env_array["db_char"] = "UNICODE_FSS";
        $this->env_array["template_dir"] = "./templates";
        $this->env_array["compile_dir"] = "./templates_c";
        $this->env_array["config_dir"] = "./config";
        $this->env_array["page_name"] = "テスト接続";
    }
----------------------------------------------------------------------------
----

心当たりのある方、ご助言のほどよろしくお願いいたします。


/////////////////////
//   稲村 暢亮   inamuran36 @ mahikari.or.jp  //
                           /////////////////////



PHP-users メーリングリストの案内