text
stringlengths 1
254
| output
stringlengths 2
255
|
---|---|
27-01-2003
|
28-01-2003
|
Next
|
製作著作 © 1997, 1998, 1999, 2000, 2001, 2002 PHP ドキュメント作成グループ
|
This section contains notes and hints specific to Apache 2.0 installs of PHP, both for Unix and Windows versions.
|
本節には、 Unix もしくは Windows プラットフォームで Apache 2.0に PHP をインストールするための説明や ヒントがあります。
|
Do not use Apache 2.0 and PHP in a production environment neither on Unix nor on Windows.
|
Apache 2.0と PHP の組み合わせを(Unix、Windows どちらのプラットフォームでも)実運用環境で使用しないでください。
|
You are highly encouraged to take a look at the Apache Documentation to get a basic understanding of the Apache 2.0 Server.
|
Apache 2.0サーバに関する基本的な知識を得るために、 Apache Documentation を一読することを お勧めします。
|
The following versions of PHP are known to work with the most recent version of Apache 2.0:
|
PHP 4.3.0がリリースされるまでの間は、Apache 2.0の最新バージョンと 以下のいずれかのリリースとの組み合わせで使用することをお勧めします。
|
Don' t try to use this version of PHP Don't try to use this version of PHP with any other version of Apache.
|
注意 Apache 2.0 SAPI サポートはPHP 4.2.0から開始されて おり、PHP 4.2.3はApache 2.0.39との組み合わせで動作することが 確認されています。ただし他のApache 2バージョンとの組み合わせでの 動作は保証されていません。PHP 4.2.3とApache 2.0.39との組み合わせに ついてもお勧めはしません。
|
All mentioned versions of PHP will work still with Apache 1.3.x.
|
上記で触れている全ての PHP バージョンはApache 1.3.x では問題なく動作します。
|
This quick guide covers only the basics to get started with Apache 2.0 and PHP.
|
最新バージョンの Apache 2.0 を ダウンロードして上述のいずれかのバージョンのPHPを用意してください。 このクイックガイドはApache 2.0で PHP を動作させるための 基本的な部分しかカバーしていません。更なる情報については Apache Documentation をご覧ください。 情報が古く不正確になってしまうため、ここには詳細なバージョン番号は 記述されていません。'NN'という文字列をご使用のバージョンに適宜置き換えて ください。
|
Installation Instructions (Apache 2 Shared Module Version)
|
例 3-6 インストールガイド(Apache 2 Shared Module Version)
|
This also implies to build PHP with experimental Zend Thread Safety (ZTS).
|
注意 マルチスレッド版のApacheを構築する場合は、あなたのシステムがスレッドを サポートしている必要があります。また、この場合 PHP を 実験的なステータスにあるZend Thread Safety(ZTS)で構築することを意味します。 従って全ての拡張モジュールを使用できるわけではありません。 prefork MPM-Moduleでの構築をお勧めします。
|
Consider to read the Windows specific notes for Apache 2.0.
|
まず Windows特有の事柄 を 読むことをお勧めします。
|
At this time, support for Windows 9x is incomplete.
|
Apache 2.0はWindows NT 4.0, Windows 2000, Windows XPでの動作を 想定してデザインされており、現時点ではWindows 9xのサポートは 不完全です。これらのプラットフォームでの動作は保証されません。
|
Follow the Manual Installation Steps and come back to go on with the integration of PHP and Apache.
|
最新バージョンの Apache 2.0 をダウンロードして上記のいずれかのPHPのバージョンを 用意します。まず マニュアル インストールの手順 の手順に従ってから、 PHP と Apacheの統合を開始します。
|
In either case you need to stop the Apache server, and edit your httpd.conf to configure Apache to work with PHP.
|
Windows上のApache 2.0で PHP を動作させるには2つの 方法があります。一つはCGIバイナリを使用する方法、もう一つはApache モジュールDLLを使用する方法です。前者の場合は一旦Apacheサーバを 停止して httpd.conf を PHP と 動作するように編集します。
|
You need to insert these three lines to your Apache httpd.conf configuration file to set up the CGI binary:
|
CGIバイナリ を有効にするにはApacheの httpd.conf に以下の3行を追加します。
|
PHP and Apache 2.0 as CGI
|
例 3-7CGI版PHPとApache 2.0
|
If you would like to use PHP as a module in Apache 2.0, be sure to move php4ts.dll to winnt / system32 (for Windows NT / 2000) or windows / system32 (for Windows XP), overwriting any older file.
|
注意 PHP 4.3.0からCGIバイナリのファイル名が php-cgi.exe に 変更されています。ApacheのActionディレクティブを記述する際には ご注意ください。
|
PHP and Apache 2.0 as Module
|
PHP をApache 2.0のモジュールとして使用したい場合は、 まず php4ts.dll を winnt/system32 (Windows NT/2000)もしくは windows/system32 (Windows XP)に移動します(既存のファイルは全て上書きしてください)。次に PHPモジュール を有効にするため、Apacheの httpd.conf に以下の2行を追加します。
|
Note:
|
例 3-8モジュール版PHPとApache 2.0
|
You have the only choice to use the dll 's and extensions that ship with your downloaded PHP version.
|
注意 c:/php/ はあなたが実際に PHP を インストールしたパスに置き換えてください。
|
Servers-Apache
|
インストール時に 異なったPHPバージョン のDLLを 混同しないように気をつけてください。
|
The version numbers have been omitted here, to ensure the instructions are not incorrect.
|
本節では、PHPをApacheにインストールする際の注意事項とコツについて 説明します。 Unix 版と Windows 版の両方につ いて説明します。
|
AddType application / x-httpd-php .php LoadModule php4_module libexec / libphp4.so You can choose any extension you wish here. .php is simply the one we suggest.
|
以下の手順の8行目で configure に追加する引数を configureのオプションの全て から選択可能です。ここではバージョン番号が意図的に省略 されています。'xxx'の部分を貴方が使用するファイルに対応するものに 置き換えてください。
|
The path on the right hand side of the LoadModule statement must point to the path of the PHP module on your system.
|
例 3-5 PHP 4インストール手順 (Apache共有モジュール版)
|
Depending on your Apache install and Unix variant, there are many possible ways to stop and restart the server.
|
Apache のインストールやUNIXの種類によりサーバを停止し、再起動する 方法はいくつもあります。複数のApache/UNIXの組合せについてサーバを 再起動する際に使用される典型的な方法を以下に示します。 /path/to/ を使用するシステムのアプリケーション へのパスに置き換えて読んで下さい。
|
You should replace / path / to / with the path to these applications on your systems.
|
PHPをApache用にコンパイルする別の例を以下に示します。
|
Using mod_ssl, or another SSL server, you may want to manually stop and start: / path / to / apachectl stop / path / to / apachectl startssl
|
これにより、共有ライブラリ libphp4.so が作成 されます。Apacheの httpd.conf ファイルにおいて LoadModuleを使用してApacheにこのライブラリをロードすることが可能 です。上の例では、PostgreSQLサポートがこの libphp4.so ライブラリに埋め込まれます。
|
. / configure --with-apache= / path / to / apache_source --with-pgsql
|
この例でも Apache用 libphp4.so 共有ライブラリ が作成されます。しかし、共有ライブラリ pgsql.so も作成されます。この共有ライブラリ は、 php.ini ファイルのextensionディレクティ ブまたはスクリプト内で dl() 関数を使用して明示的 にロードすることが可能です。
|
. / configure --with-apache= / path / to / apache_source --with-pgsql=shared
|
上と同じですが、最終的な httpd に PostgreSQLサポートを直接インクルードする代わりに、共有ライブラリ pgsql.so をファイル php.ini または dl() により直 接的にPHPにロードすることが可能です。
|
When choosing to build PHP in different ways, you should consider the advantages and drawbacks of each method.
|
異なったPHPの構築法を選択する際、各方法の利点と欠点を考慮する必要 があります。共有オブジェクトとして構築する場合、Apacheと分割して コンパイルすることが可能で、PHPを追加または変更する際に全体を再コ ンパイルする必要がありません。PHPをApacheに(静的に)組み込む場合に は、PHPはより高速にロード/実行することが可能です。詳細な情報につ いては、Apacheの DSOサポートのWebペー ジ を参照下さい。
|
Building PHP into apache (static method) means that PHP will load and run faster.
|
PHP を Windows 上の Apache 1.3.x で動作させるには、2種類の方法が あります。一つは、CGIバイナリ (php.exe) を使用する方法、もう一つ は Apache モジュールdll を使用する方法です。どちらの場合も Apache サーバを停止し、PHP と組み合むように Apache を設定するために srm.conf または httpd.conf を編集します。
|
You must NOT use the apxs version that is in the apache sources but the one that is actually installed on your system.
|
Apache用にPHPを設定する手順にはいくつかありますが、この手順は入門 者にも使用可能な程簡単です。設定用ディレクティブに関する詳細につ いては、Apacheのドキュメントを参照下さい。
|
It is worth noting here that now the SAPI module has been made more stable under windows, we recommend it 's use above the CGI binary, since it is more transparent and secure.
|
マニュアルインストール手順 のセクションに説明されたようにPHPパッケージをunzipで c:\php\に展開した場合、CGIバイナリを設定するには以下の行をApache の設定ファイルに追加する必要があります。
|
Please consult the Apache Docs for further configuration directives.
|
ScriptAlias /php/ "c:/php/"
|
ScriptAlias / php / "c: / php /"
|
AddType application/x-httpd-php .php .phtml
|
Action application / x-httpd-php "/ php / php.exe"
|
Action application/x-httpd-php "/php/php.exe"
|
If you would like to use PHP as a module in Apache, be sure to move php4ts.dll to the windows / system (for Windows 9x / Me) or winnt / system32 (for Windows NT / 2000 / XP) directory, overwriting any older file.
|
PHPをApacheのモジュールとして使用したい場合、必ず php4ts.dll をwindows/system (Windows 9x/Meの場 合)またはwinnt/system32 (Windows NT/2000/XPの場合)ディレクトリに移 動し、以前のファイルを上書きするようにして下さい。 次に以下の2行をApacheの設定ファイルに追加して下さい。
|
LoadModule php4_module c: / php / sapi / php4apache.dll
|
LoadModule php4_module c:/php/sapi/php4apache.dll
|
After changing the configuration file, remember to restart the server, for example, NET STOP APACHE followed by NET START APACHE, if you run Apache as a Windows Service, or use your regular shortcuts.
|
AddType application/x-httpd-php .php .phtml
|
This is done by adding AddModule mod_php4.c to the AddModule list, near the beginning of the configuration file.
|
注意 Windows版のApache 1.3.22において、デフォルトの設定ファイル (httpd.conf-dist-win) には、デフォルトで ClearModuleList ディレクティブが含まれています。 このディレクティブが使用された場合、 AddModule mod_php4.c を AddModule リストに追加する必要があります。 さもないと、PHPはApacheモジュールとして登録されなくなります。
|
If you have configured Apache to use PHP as an ISAPI module, then by adding the following line to your configuration file you can use this feature:
|
ソースコードハイライト機能を使用するには、PHPスクリプトファイルを 作成し、次のようなコードを加えてください。 ?php show_source ("original_php_script.php");? original_php_script.php の部分を ソースを見たいと思うファイルの名前に置き換えてください。 (これがこの機能を使用するための唯一の手段です。)
|
To do this simply create a PHP script file and add this code: ?php show_source ("original_php_script.php");?.
|
注意 Windows版のApache においては、"c:\directory\file.ext" のようなパ ス設定におけるバックスラッシュは、"c:/directory/file.ext"のよう に全てスラッシュに変換する必要があります。
|
There are three main fields you can use PHP, as described in the What can PHP do? section:
|
インストール前には、まず、PHPを使用する目的を知る必要があります。 PHPを適用可能な分野としては大きく3つの種類があります。 これらは、 PHPでできることは? のセクションに記述されており、以下のようなものです。
|
Client-side GUI applications
|
サーバサイドのスクリプト
|
PHP itself, a web server and a web browser.
|
コマンドラインのスクリプト
|
Apache on Linux or IIS on Windows).
|
クライアントサイドのGUIアプリケーション
|
This means you set up your server to use the command line executable of PHP (php.exe on Windows) to process all PHP file requests on the server.
|
(例えば、オフラインでいくつかの画像を自動生成するスクリプトを 書いたり、スクリプトに指定した引数に応じてテキストファイルを処理し たりといった、)コマンドラインのスクリプト実行用にPHPを使用すること に関心がある場合、コマンドライン版の実行ファイルを使用する必要があ ります。更に詳細な情報については、 コマンドライン版PHPアプリケーション の作成 のセクションを参照下さい。この場合、サーバとブラウザ は不要です。
|
For more information, read the section about writing command line PHP applications.
|
PHP-GTK拡張モジュールを使用すれば、PHPでクライアントサイドのGUIア プリケーションを作成することも可能です。この場合、Webページを作成 することとは完全に異なり、HTMLを出力することはなく、かわりに、ウイ ンドウやその中のオブジェクトの管理を行います。PHP-GTKに関するより 詳細な情報については、 PHP-GTK拡張モジュー ル用サイト を参照下さい。PHP-GTKはPHPの公式アーカイブには含 まれていません。
|
This is a completely different approach than writing web pages, as you do not output any HTML, but manage windows and objects within them.
|
ここから、本節では、UNIXおよびWindows上のWebサーバにサーバモジュー ルインターフェイス及びCGI実行ファイルを組み込んでPHPを設定する方法 を説明します。
|
Downloading PHP, the source code, and binary distributions for Windows can be found at http: / /www.php.net /.
|
PHPをダウンロードします。ソースコードとWindows用のバイナリアーカイ ブは、 http://www.php.net/ にあります。 アーカイブをダウンロードする際には、最も近い ミラー サイトを選択することを推奨します。
|
If you did check / opt / caudium / logs / debug / default.1 for any errors related to filename PHP4.so / filename.
|
PHP 4はCaudium Webサーバ用Pikeモジュールとして構築可能です。PHP 3 ではこの機能はサポートされていないことに注意して下さい。以下にPHP 4をCaudiumにインストールする手順を示します。
|
10.
|
例 3-9Caudiumへのインストール手順
|
See the complete list of configure options for an exhaustive rundown.
|
You can of course compile your Caudium module with support for the various extensions available in PHP 4. See the complete list of configure options for an exhaustive rundown.
|
Please make sure you read through the Security chapter if you are going to run PHP as a CGI.
|
デフォルトでは、PHPはCGIプログラムとして構築されます。これにより CGI処理やWeb以外のPHPスクリプトの実行に使用可能なコマンドラインイ ンタプリタが作成されます。PHPのモジュール組込みをサポートしている Webサーバを実行している場合、通常は性能面からこちらを選択するべき です。しかし、CGIバージョンの場合、ApacheユーザがユーザID毎に異なっ たPHPを使用するページを実行することが可能になります。PHPをCGIとし て実行する場合には、 セキュリティの章 全体をよく読んで下さい。
|
What is installed at {PREFIX} / bin / php depends on your configure line and this is described in detail in the manual section named Using PHP from the command line.
|
PHPをCGIプログラムとして実行した場合、 make test と入力することにより構築したものをテストすることが 可能です。常に構築後のテストを行うことを推奨します。これにより、 使用する環境でのPHPの問題に対して後でその問題と格闘するのではなく、 早期に見付けることが可能となります。
|
Note that if Safe Mode is on by default, the benchmark may not be able to finish if it takes longer then the 30 seconds allowed.
|
PHP 3をCGIプログラムとして構築した場合には、 make bench とすることにより、ベンチマークを実行 することが可能です。セーフモードがデフォルトでonの場合、30秒以 上かかるベンチマークは完了させることができません。これは、セーフ モードでは、 set_time_limit() を使用することが できないためです。スクリプト用にこの時間を設定するには、設定 max_execution_time を使用して設定して下さい。 make bench は、 設定ファイル を無視します。
|
Some server supplied enviroment variables are not defined in the current CGI / 1.1 specification.
|
注意 make bench は PHP 3 でのみ利用可能です。
|
PHP Manual
|
以下にUNIXライクな環境においてコンパイルされた場合の(PHP 4.1.0時点で の)PHP 4の configure スクリプトでサポートされるオ プションの完全なリストを示します。いくつかはPHP 3で、いくつかはPHP 4で、いくつかは両方のバージョンで使用可能です。これについては、まだ 注記されていません。
|
Prev
|
グラフィックス
|
Chapter 3.
|
PHPの動作
|
Installation
|
XML
|
Next
|
古いxDBMサポートを有効にします。(古いオプション)
|
Note:
|
DBAを共有モジュールとして構築します。
|
These are only used at compile time.
|
NDBMサポートを有効にします。
|
If you want to alter PHP 's runtime configuration, please see the chapter on Configuration.
|
Berkeley DB3サポートを有効にします。
|
The following is a complete list of options supported by PHP 4 configure scripts (as of 4.1.0), used when compiling in Unix-like environments.
|
CDBサポートを有効にします。
|
Some are available in PHP 3, some in PHP 4, and some in both.
|
dbplusサポートを有効にします。
|
This is not noted yet.
|
dbxサポートを有効にします。
|
There are general configuration options for the configure script, consult the appropriate manual pages for GNU autoconf or use the command configure --help for a full, up-to-date list.
|
バンドルされたfileProサポート(読み込みのみ)を有効にします。
|
Database
|
Informixサポートを有効にします。DIRはInformixのベースインストール ディレクトリではありません。
|
Graphics
|
InterBaseサポートを有効にします。DIRはInterBaseのベースインストール ディレクトリで、/usr/interbaseがデフォルトです。
|
Miscellaneous
|
MySQLサポートを有効にします。DIRはMySQLのベースディレクトリです。 省略した場合は、バンドルされているMySQLライブラリが使用されます。
|
PHP Behaviour
|
Oracle-oci8サポートを有効にします。DIRのデフォルトはORACLE_HOMEです。
|
Server
|
SAP DBサポートを有効にします。DIRはSAP DBのベースインストール ディレクトリで、/usr/localがデフォルトです。
|
Note:
|
IBM DB2サポートを有効にします。DIRはDB2のベースインストール ディレクトリで、/home/db2inst1/sqllibがデフォルトです。
|
These options are only used in PHP 4 as of PHP 4.1.0.
|
Empressローカルアクセスサポートを有効にします。DIRはEmpressのベー スインストールディレクトリで、$EMPRESSPATHがデフォルトです。PHP4 以降、このオプションは、Empress Version 8.60 以降のみをサポートし ています。
|
If you want to compile an older version, some options will probably not be available.
|
iODBCサポートを有効にします。DIRはiODBCのベースインストール ディレクトリで、/usr/localがデフォルトです。
|
Include dbplus support.
|
unixODBCサポートを有効にします。DIRはunixODBCのベースインストール ディレクトリで、/usr/localがデフォルトです。
|
Include Adabas D support.
|
DBMakerサポートを有効にします。DIRは、DBMakerベースインストールディ レクトリであり、デフォルトでは(/home/dbmaker/3.6のような)DBMaker の最新バージョンがインストールされたディレクトリです。
|
DIR is the Adabas base install directory, defaults to / usr / local.
|
Oracle-oci7 サポートを有効にします。DIRのデフォルトはORACLE_HOME です。
|
Include SAP DB support.
|
PostgresSQLサポートを有効にします。DIRはPostgresSQLベースインストー ルディレクトリであり、デフォルトは/usr/local/pgsqlです。dlとして 構築するにはDIRにsharedを、dlとして構築しかつDIRを指定するには shared,DIRと設定して下さい。
|
Include Solid support.
|
Sybase-DBサポートを有効にします。DIRはSybaseのホームディレクトリ で、/home/sybaseがデフォルトです。
|
DIR is the Solid base install directory, defaults to / usr / local / solid.
|
Sybase-CTサポートを有効にします。DIRはSybaseのホームディレクトリ で、/home/sybaseがデフォルトです。
|
Include IBM DB2 support.
|
GDサポートを追加します。 (DIR は GDのインストールディレクトリで す) 共有ライブラリとして構築する場合、DIRをsharedに設定するか、 もしくは、同時にDIRも指定するために shared,DIRとして構築して下さい。
|
DIR is the DB2 base install directory, defaults to / home / db2inst1 / sqllib.
|
GD: libjpegインストール接頭辞にパスを設定します。
|
Include Empress support.
|
GD: libpngインストール接頭辞にパスを設定します。
|
DIR is the Empress base install directory, defaults to $EMPRESSPATH.
|
GD: libXpmインストール接頭辞にパスを設定します。
|
From PHP4, this option only supports Empress Version 8.60 and above.
|
GD: FreeType 1.x サポートを有効にします。
|
Include Empress Local Access support.
|
GD: T1libサポートを有効にします。
|
DIR is the Empress base install directory, defaults to $EMPRESSPATH.
|
Include cpdflibサポート (cpdflib = 2)を有効にします。 DIRは、cpdfllib インストールディレクトリで、デフォルトは /usrです。
|
From PHP4, this option only supports Empress Version 8.60 and above.
|
cpdflib 2.x用のtiffディレクトリ。
|
Include Birdstep support.
|
PDFLIB: libjpegインストールディレクトリを定義します。
|
DIR is the Birdstep base install directory, defaults to / usr / local / birdstep.
|
PDFLIB: libtiffインストールディレクトリを定義します。
|
Include a user defined ODBC support.
|
GDサポートを無効にします。PHP 3のみ!
|
The DIR is ODBC install base directory, which defaults to / usr / local.
|
mingサポートを有効にします。
|
Make sure to define CUSTOM_ODBC_LIBS and have some odbc.h in your include dirs.
|
これを有効にした場合、PHP CGIバイナリをWebツリーの外に安全に置く ことができ、.htaccessセキュリティの不備をつくことができなくなりま す。
|
E.g., you should define following for Sybase SQL Anywhere 5.5.00 on QNX, prior to run configure script:
|
デバッグ用シンボルと付けてコンパイルします。
|
CPPFLAGS=" -DODBC_QNX -DSQLANY_BUG "LDFLAGS=-lunix CUSTOM_ODBC_LIBS="-ldblib -lodbc".
|
インストールされるファイルの配置を設定します。TYPEはPHP (デフォル ト) または GNUのどちらかです。
|
Include iODBC support.
|
PEARをDIR (PREFIX/lib/phpがデフォルト)にインストールします。
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.