text
stringlengths
1
254
output
stringlengths
2
255
Tells the receiving program about what it should treat the following data as:
ホスト において このエラーを生成したPHP 3スクリプトのプロセスID
Debugger Line Types
行のタイプ。以降に続くデータをどう解釈すべきかを、 受信プログラムに知らせます。
If no "frames" line is given, the depth should be assumed to be 0 (the error occurred at top-level).
表 D-1デバッガの行タイプ
Debugger Error Types
行データ
Example Debugger Message
表 D-2デバッガのエラータイプ
Uninitialized variable 1998-04-05 23:27:400966 lucifer.guardian.no( 20481) location: (NULL ):7Uninitialized variable 1998-04-05 23:27:400966 lucifer.guardian.no(20481) location: (NULL ):7 1998-04-05 23:27:400966 lucifer.guardian.no(20481) frames:
例 D-1デバッガメッセージの例
The debugger works by connecting to a TCP port for every time PHP 3 starts up.
PHP 3の内部デバッガはバグを追跡し、回避するのに役立ちます。この デバッガは、PHP 3が開始されるたびに TCP ポートに 接続することにより動作します。そのリクエストからのすべての エラーメッセージはこのTCPコネクションに送られます。この情報は IDE や(Emacs のような)プログラマブル・エディタの 中で動作する「デバッグ用サーバ」のために使われます。
All error messages from that request will be sent to this TCP connection.
デバッガの設定方法:
How to set up the debugger:
設定ファイル (debugger.port) でデバッガ用のTCPポートを設定し、それを (debugger.enabled) で有効にします。
Set up a TCP listener on that port somewhere (for example socket -l -s 1400 on UNIX).
どこかでそのポートに対してTCPリスナを設定します。 (たとえば、UNIXでは socket -l -s 1400)
Prev
コードの中で"debugger_on( host )" を実行します。ここで host は TCP リスナが動作しているホストのIPアドレス 又はホスト名です。
1.
本節では、構築時に発生する多くの一般的なエラーを集めたものです。
You have to have the GNU autoconf package installed so you can generate the configure script from configure.in.
1. anonymous CVSサービスにより最新版のPHPを入手しましたが、 configureスクリプトがありません!
It says it can' t find httpd.h, but it's right where I said it is!
2. PHPをApacheと組みあわせて動作するようにconfigureを行う際に問題が あります。httpd.hが見付からないといわれますが、指定した場所にこ のファイルはあるのです!
This means that you want to specify --with-apache= / path / to / apache and not --with-apache= / path / to / apache / src.
configure/setupスクリプトにApacheソースツリーの最上位の場所を指 定する必要があります。これは、' --with-apache=/path/to/apache 'を指定するので あって、' --with-apache=/path/to/apache/src 'で はないということです。
checking lex output file root.... / configure: lex: command not found configure: error: cannot find output from lex; giving up
3. configureを実行した際、GD、gdbmまたは他のパッケージのファイルま たはライブラリを見つけることができないと言われます。
Depending on your setup you will install bison and flex from either source or a package, such as a RPM.
Cプリプロセッサおよびリンカに次のように追加でフラグを指定するこ とにより、configureスクリプトがヘッダファイルまたはライブラリを 標準以外の場所で探すことが可能となります。
fatal: relocation error: file / path / to / libphp4.so: symbol ap_block_alarms: referenced symbol not found
4. ファイルlanguage-parser.tab.cをコンパイルする際、 'yytname undeclared'というエラーが発生します。
Try to reconfigure apache, making sure to use at least the following flags:
bisonのバージョンを更新する必要があります。最新版は、 ftp://ftp.gnu.org/pub/gnu/bison/ にあります。
For more information, read the top-level Apache INSTALL file or the Apache DSO manual page.
5. 'make'を実行する際、実行には成功しているようですがコンパイルする 最終的なアプリケーションをリンクしようとした際に何かファイルが見 つからないというエラーが発生します。
You can make the configure script looks for header files and libraries in non-standard locations by specifying additional flags to pass to the C preprocessor and linker, such as:
古いバージョンのmakeには、functionsディレクトリにあるファイルの コンパイルされたものを同じディレクトリに正しく入れないものがあり ます。" cp *.o functions "を試しに実行してから 'make' を再度実行し、解決されるか確認して下さ い。解決される場合には、GNU makeの最近のバージョンに更新するべき です。
env CPPFLAGS=-I / path / to / include LDFLAGS=-L / path / to / library. / configure
6. PHPをリンクする際、未定義の参照があるというエラーが複数発生しま す。
You need to update your version of Bison.
最後に適切なライブラリが全てインクルードされているかどうか確認し て下さい。よくあるのは、'-ldl'や指定したデータベースのサポート機 能に必要なライブラリの指定が欠けているというものです。
Some old versions of make that don 't correctly put the compiled versions of the files in the functions directory into that same directory.
Apache 1.2.xとリンクする場合には、適当な情報をConfigurationファ イルのEXTRA_LIBSの行に追加し、Apacheの Configureスクリプトを再度 実行したかどうかを確認して下さい。より詳細な情報については、配布 ファイルに付属するファイル INSTALL を参照下 さい。
If it does, you should really upgrade to a recent version of GNU make.
何名かの人からApacheとリンクする際に' libphp4.a 'の直後に'-ldl'を追加する必要があ ることも報告されています。
Take a look at the link line and make sure that all of the appropriate libraries are being included at the end.
7. PHPをApache 1.3と組み合わせて構築する手法が分かりません。
If you' re linking with Apache 1.2.x, did you remember to add the appropriate information to the EXTRA_LIBS line of the Configuration file and re-rerun Apache's Configure script?
この手順は実際には非常に簡単です。以下の手順に注意深く従って下さ い。
Some people have also reported that they had to add '-ldl' immediately following libphp4.a when linking with Apache.
http://www.apache.org/dist/ から最新 のApache 1.3配布ファイルを取得して下さい。
This is actually quite easy.
これをどこか、例えば、 /usr/local/src/apache-1.3 で ungzip、untarして下さい。
Grab the latest Apache 1.3 distribution from http: / /www.apache.org / dist /.
まず、 ./configure --with-apache=/ path /apache-1.3 を実行し、PHP をコンパイルして下さい。 (path の部分は実際のapache-1.3ディレクトリのパスに置 き換えて下さい)
Compile PHP by first running. / configure --with-apache= / path / apache-1.3 (substitute path for the actual path to your apache-1.3 directory.
'make' を実行した後、' make install 'を実行して下さい。これにより、PHPが構築され、 必要なファイルがApacheのソースツリーにコピーされます。
Change directories into to your / path / apache-1.3 / src directory and edit the Configuration file.
ディレクトリを / path /apache-1.3/src に移動し、 Configuration ファイルを編集して下さい。 このファイルに以下を追加して下さい。: AddModule modules/php4/libphp4.a
You should now have a PHP-enabled httpd binary!
'./Configure' を実行した後、' make 'を実行して下さい。
You can also use the new Apache. / configure script.
以上の手順によりPHP対応のhttpdバイナリが構築できました。
Also have a look at the INSTALL file in the PHP distribution.
注意:: Apache の新しい ./configure スクリプトを使用することも可能です。 Apache配布ファイルの README.configure ファイル の指示を参照下さい。また、PHP配布ファイルの INSTALL ファイルも参照下さい。
This means that the PHP module is not getting invoked for some reason.
8. インストール手順に完全に基づきUNIX上でApacheモジュール版をインス トールしましたが、ブラウザでアクセスするとPHPスクリプトが表示さ れ、ファイルを保存しますかと尋ねられます。
Make sure that the httpd binary you are running is the actual new httpd binary you just built.
これは、何らかの理由によりPHPモジュールが起動していないことを意 味しています。助けを求める質問を行う前にまず以下を確認下さい。
If you don 't see mod_php4.c listed then you are not running the right binary.
実行しているhttpdバイナリが構築したばかりの新しいhttpdバイナ リであることを確認して下さい。確認を行うには以下のように入力 します。 /path/to/binary/httpd -l
Make sure you have added the correct Mime Type to one of your Apache .conf files.
mod_php3.c または mod_php4.c がリストの中にない場合、正し いバイナリが実行されていません。正しいバイナリを見つけて、イ ンストールして下さい。
Also make sure that this AddType line is not hidden away inside a Virtualhost or Directory block which would prevent it from applying to the location of your test script.
Apache .conf ファイルの1つに正しいMIME型 が追加されていることを確認して下さい。これは以下のようになり ます。 AddType application/x-httpd-php3 .php3 (PHP 3の場合)
Finally, the default location of the Apache configuration files changed between Apache 1.2 and Apache 1.3.
または AddType application/x-httpd-php .php (PHP 4の場合)
You can put an obvious syntax error into your httpd.conf file or some other obvious change that will tell you if the file is being read correctly.
また、このAddTypeの行が、 Virtualhost または Directory ブロックの中に隠 されて、テスト用のスクリプトの場所に適用できていないようなこ とがないことを確認して下さい。
What 's going on?
最後に、デフォルトのApache設定ファイルの場所はApache 1.2と Apache 1.3の間で変更されています。AddTypeの行を追加した設定ファ イルが実際に読み込まれていることを確認して下さい。このファイ ルが正しく読み込まれている場合には、明らかな構文エラーを httpd.confファイルの中に書き込んでしまったり、何らかの明らか な変更があった可能性があります。
The apache process will create it!
9. --activate-module=src/modules/php4/libphp4.a と書いてありますが、ファイルがありません。このため、 --activate-module=src/modules/php4/libmodphp4.a に 変更しましたが、やはりだめです。何が起きているのでしょう?
This is a misleading error message from Apache that has been fixed in more recent versions.
libphp4.aファイルはこの時点では存在しない、ということに気をつけて下さい。 このファイルは、Apacheの構築時に自動的に作成されます。
When I try to build PHP using --with-apxs I get strange error messages.
10. --activate-module=src/modules/php4/libphp4.a を指定し、PHPを静的モジュールとして組み込んでApacheを構築しよう とした際に、システムがANSI対応ではないというエラーを発生します。
First, for some reason when Apache builds the apxs Perl script, it sometimes ends up getting built without the proper compiler and flags variables.
Apacheのこのエラーメッセージは紛らわしく、より新しいバージョンで は修整されています。
Open it and check for lines similar to these:
11. --with-apxs を指定してPHPを構築しようとした際、 奇妙なエラーメッセージが出力されます。
my $CFG_CFLAGS_SHLIB = '-fpic -DSHARED_MODULE'; # substituted via Makefile.tmpl my $CFG_LD_SHLIB = 'gcc'; # substituted via Makefile.tmpl my $CFG_LDFLAGS_SHLIB = q(-shared); # substituted via Makefile.tmpl
ここでは、確認すべきことが3点あります。まず、何らかの理由により、 Apacheがapxs Perlスクリプトを構築する際に適当なコンパイラやフラ グ変数を付けないで構築されてしまうことが時々あります。 使用するapxsの場所を見つけたら('which apxs'コマンドを試してみて ください。/usr/local/apache/bin/apxsまたは/usr/sbin/apxs等にあり ます)、以下の行を確認して下さい。
my $CFG_LIBEXECDIR = '/ usr / lib / apache'; # substituted via APACI install
12. 'make'の間、microtimeおよび'RUSAGE_'関連で多くのエラーを発生しま す。
During the make portion of installation, if you encounter problems that look similar to this:
インストール時に'make'を行っている際、以下のようなエラーを発生す るとした場合、
Leaving directory ` / home / master / php-4.0.1 / ext / standard' make[2]: *** [all-recursive] Error 1 make[2]:
あなたのシステムは壊れています。使用しているglibcと同じバージョンの glibc-develパッケージをインストールして、/usr/include ファイルを修正 する必要があります。この問題は、PHPの動作とは全く関係ありません。 これを示すには、次のような簡単なテストを行ってみて下さい。
Leaving directory ` / home / master / php-4.0.1 / ext' make: *** [all-recursive] Error 1
13. PHPをアップグレードしたいのですが、現在インストールされているPHPを 構築するときに指定した ./configure コマンドの オプションはどこで知ることが出来ますか?
This has absolutely nothing to do with PHP.
現在インストールされているPHPを構築した時のディレクトリにある config.nice ファイルを見るか、もしもうそのディレクトリが無い場合は
Either you look at config.nice file, in the source tree of your current PHP installation or, if this is not available, you simply run a
14. GDライブラリをリンクしてPHPを構築すると、コンパイルエラーが発生したり 実行時にセグメンテーション違反になってしまいます。
Make sure your GD library and PHP are linked against the same depending libraries (e.g. libpng).
リンクしたGDライブラリとPHPが同じライブラリ(例えばlibpng)に依存しているか どうかを確認してください。
1.
PHPはWin32プラットフォーム上でCOMとDCOMオブジェクトにアクセスすることがで きます。
Is there any way to run this DLL under PHP?
1. とある計算を行うDLLを作成しました。これをPHPで実行させる方法はあ りますか?
If the DLL contains a COM server you may be able to access it if it implements the IDispatch interface.
もしそれが普通のDLLなら、現在のところPHPからそれを実行する手段は ありません。DLLがCOMサーバを含んでいてIDispatchインターフェース が実装されている場合、PHPからアクセスすることができます。
Most of them are already supported but a few still have to be implemented.
2. 'Unsupported variant type: xxxx (0xxxxx)'とはどういう意味ですか?
If you find other types that aren' t supported, please report them as a bug (if not already reported) and provide as much information as available.
多くのVARIANTタイプとその組み合わせがあり、そのほとんどはサポー トされていますが、残りのいくつかは未だ実装されていません。また配 列も完全にサポートされているわけではなく、PHPとCOMの間で受け渡し が可能なのは1次元の添字付配列のみです。もしこの他にサポートされ ていないタイプを見つけた場合は(既知でなければ)、できる限りの情報 を添えてバグとして報告して下さい。
Is it possible manipulate visual objects in PHP?
3. PHPでビジュアルオブジェクトを操作できますか?
If you use PHP for application scripting e.g. in conjunction with PHP-GTK there is no limitation in accessing and manipulating visual objects through COM.
基本的には可能です。しかしPHPはほとんどの場合ウェブスクリプティ ングの言語として使用されウェブサーバ上で実行されるため、ビジュア ルオブジェクトがサーバのデスクトップに現れることはありません。も しPHPをアプリケーション作成に使用する、すなわちPHP-GTKと合わせて 使用する場合にはアクセスに制限はありません。COMを通じてビジュア ルオブジェクトを操作することができます。
Can I store a COM object in a session?
4. COMオブジェクトをセッション情報として保存できますか?
COM instances are treated as resources and therefore they are only available in a single script 's context.
できません。COMインスタンスはリソースとして扱われるため、1つのス クリプトを実行している間のみ使用可能です。
How can I trap COM errors?
5. COMの出力するエラーをトラップできますか?
Currently it' s not possible to trap COM errors beside the ways provided by PHP itself (@, track_errors,..), but we are thinking of a way to implement this.
現在の所、PHPが提供する方法(@, track_errors, ...)を使用してCOMの エラーをトラップすることはできません。しかし、私たちはこれを実装 する方法を検討中です。
Can I generate DLL files from PHP scripts like i can in Perl?
6. PHPスクリプトからDLLを作成することはできますか?Perlではできるの ですが。
7.
いいえ、残念ながらPHPにはそのようなツールはありません。
This error can have multiple reasons:
7. 'Unable to obtain IDispatch interface for CLSID {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}'とはどういう意味ですか?
the requested DLL is missing
このエラーが発生する理由はいくつかあります:
the requested component doesn 't implement the IDispatch interface
CLSIDが正しくない
How can I run COM object from remote server?
要求されたDLLが無い
You only have to pass the IP of the remote machine as second parameter to the COM constructor.
要求されたコンポーネントがIDispatchインターフェースを実装していない
9.
8. COMオブジェクトをリモートサーバから実行するにはどうすればよいで すか?
Edit your php.ini and set com.allow_dcom=true.
ローカルオブジェクトを実行するのと全く同様です。ただ、COMコンス トラクタの2番目のパラメータにリモートマシンのIPアドレスを渡すだ けです。
This has nothing to do with PHP.
php.ini に com.allow_dcom=true をセットするのを忘れないで ください。
There is no relation to the PHP script and therefore there is no direct server side interaction possible.
9. 'DCOM is disabled in C:\path...\scriptname.php on line 6'という エラーが発生しました。どうすればよいですか?
Is it possible to get a running instance of a component?
php.ini を編集して com.allow_dcom=true として下さい。
If you want to get multiple references to the same word instance you can create that instance like shown:
10. PHPを使用したページでActiveXオブジェクトをロード/操作することは できますか?
This will create a new instance if there is no running instance available or it will return a handle to the running instance, if available.
これははPHPとは関係ありません。ActiveXオブジェクトは、HTMLドキュ メントから要求があった場合にクライアント側でロードされます。PHP スクリプトとは関係が無く、従ってサーバ側と直接やりとりすることも できません。
Is there a way to handle an event sent from COM object?
11. 実行中のコンポーネントのインスタンスを取得することはできますか?
You can use com_print_typeinfo() to have PHP generate a skeleton for the event sink class.
モニカーを使用すれば可能です。同じWordインスタンスに対して複数の 参照を取得したい場合は、以下のようにしてインスタンスを生成します:
13.
現在のところ、ありません。
What can I do?
13. 2つ以上のインターフェースを公開しているCOMオブジェクトのメソッド を呼び出そうとして困っています。どうすればよいですか?
I don 't know exactly but i think you can do nothing.
この問題に対する答えは、簡単ですが残念なものです。正確にはわかり ませんが、おそらく打つ手はありません。もしこの問題に関する具体的 な情報があったら 私 に教えて下さい。
14.
14. PHPはCOMを扱えるということは分かりました。ではCOM+についてはどう ですか?
COM + extends COM by a framework for managing components through MTS and MSMQ but there is nothing special that PHP has to support to use such components.
COM+とはMTS(Microsoft Transaction Server)とMSMQ(Microsfot Message Queue Service)を通じてコンポーネントを操作するフレームワー クによってCOMを拡張したものです。が、PHPがそういったコンポーネン トをサポートするにあたって特別に必要なことは特にありません。
PHP itself doesn 't handle transactions yet.
15. PHPがCOMオブジェクトを操作することができるということは、MTSを使っ てコンポーネントリソースを扱えると考えてもよいということですか?
If you use components that support transactions you will have to implement the transaction management yourself.
PHPそれ自体はまだトランザクションをサポートしていません。従って エラーが発生してもロールバック処理は行われません。もしトランザク ションをサポートするコンポーネントを使用する場合は、自分でトラン ザクション処理を実装する必要があります。
Yes, PHP can access virtually any database available today.
このセクションではPHPとデータベースとの関係に関する一般的な質問を扱 います。なんと!PHPは事実上あらゆるデータベースにアクセスすることが できます。
I heard it 's possible to access Microsoft SQL Server from PHP.
1. PHPはMicrosoft SQLサーバにアクセスできると聞きました。どうすれば よいのでしょうか?
On Windows machines, you can simply use the included ODBC support and the correct ODBC driver.
Windowsマシン上では、ODBCサポートと適切なODBCドライバを使用すれ ばよいだけです。
Sybase has made a free version of the necessary libraries for Linux systems.
Unixマシン上では、Sybase-CTドライバを使ってMicrosoft SQLサーバに アクセスすることができます。なぜなら(ほとんど完全に)プロトコル互 換だからです。Sybaseは Linux用のフリー な必須ライブラリ を作成しました。他のUnixシステムでは適切 なライブラリを手に入れるためにSybaseと連絡を取る必要があります。 次の質問に対する回答も参照してください。
Also see the answer to the next question.
2. Microsoft Accessデータベースにアクセスできますか?
If you are running PHP on a Unix box and want to talk to MS Access on a Windows box you will need Unix ODBC drivers.
はい。もし全て(PHPとMicrosoft Access)をWindows9x/Me/NT/2000上で 動作させるのであり、ODBCとMicrosoftが提供するODBCドライバ for Microsoft Accessが使用できる状態ならば、すべての必要なツールは揃っ ています。
One option that has proven successful is to use MySQL and its MyODBC drivers on Windows and synchronizing the databases.
うまくいくことが分かってるもう一つの方法はMySQLと、Windows用の MyODBCドライバを利用してデータベースを同期する方法です。Steve Lawrenceが言うには:
No special configuration required except when you set up a database, and configure the user account, you should put% in the host field, or the host name of the Windows computer you wish to access MySQL with.
MySQLを説明に従って任意のプラットフォームにインストールします。 最新バージョンは www.mysql.com (ミラーを使うこと!) にあります。データベースを作成するとき、そしてユーザアカウン トを設定するときに、ホストフィールドに%か、MySQLを使ってアク セスするWindowsマシンのホスト名を入力する、ということ以外には 特別な設定は必要ありません。
Latest release is myodbc-2_50_19-win95.zip (NT available too, as well as source code).
MySQLサイトからWindows用MyODBCドライバをダウンロードします。 最新のリリースはmyodbc-2_50_19-win95.zipです(NT版、ソースコー ドも入手可能です)。これをWindowsマシンにインストールします。 アーカイブに含まれるユーティリティプログラムでテストを行うこ とができます。
Create a user or system dsn in your ODBC administrator, located in the control panel.
コントロールパネルのODBC administratorを使用してユーザ、もし くはシステムDSNを作成します。DSN名を決定して、Step1でMySQLに 設定したホスト名、ユーザ名、パスワード、ポート等を入力します。