プログラムとちょっとショップとかの紹介とか、いろいろと載せておきます。
× [PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。 最新のPHP4をDLします。(ここでは「4.4.0」を使います。 PHP: Hypertext PreprocessororPHP: Hypertext PreprocessororPHP: Hypertext Preprocessor
$ tar jxvf php-4.3.9.tar.bz2 $ cd php-4.3.9 $ ./configure \ > --with-apxs=/usr/local/apache/bin/apxs \ > --without-mysql --enable-mbstring で、こんなメッセージが出ました。 License: This software is subject to the PHP License, available in this distribution in the file LINCESE. By continuing this installation process, you are bound by the terms of this license agreement. If you do not agree with the terms of this license, you must abort the installation process at this point.
Thank you for using PHP. まぁ、OKでしょう。 次に、Makefileにあるlibphp4.soをlibphp4.dllに置換します。 $ sed -i 's/libphp4\.so/libphp4.dll/g' Makefile makeを実行します。 $ make : /tmp/php-4.4.0/est/standard/dns.c:59:26: arpa/nameser.h: No such file or directory /tmp/php-4.4.0/est/standard/dns.c:62:20: resolv.h: No such file or directory make: *** [ext/atandard/dns.lo] ・ィ・鬘シ 1 あー、なんか失敗してるっぽい。 どうも「minires」とか「minires-devel」とかがインストールされていると失敗するとあるので、アンインストールして、もう一度コンフィギュアからやってみる。 でも、うまく行かない。同じエラーで止まるー。
4.3.11でやり直してみる。 $ tar jxvf php-4.3.11.tar.bz2 $ cd php-4.3.11 $ ./configure \ > --with-apxs=/usr/local/apache/bin/apxs \ > --without-mysql --enable-mbstring $ sed -i 's/libphp4\.so/libphp4.dll/g' Makefile $ make : Build complete. (It is safe to ignore warnings about tempnam and tmpnam). DLLが出来なかったようなので、作成。 $ cd libs $ gcc -shared -o libphp4.dll \ > -Wl,--out-implib=libphp4.dll.a \ > -Wl,--export-all-symbols \ > -Wl,--whole-archive libphp4.a /bin/libhttpd.dll \ > -Wl,--no-whole-archive -lcrypt DLLが作成できたので、 インストールし、設定ファイルのコピーをします。 $ cd ../ $ make install $ cp php.ini-recommended /usr/local/lib/php.ini
モジュールがApacheに追加されていることを確認する。 $ grep php4 /etc/apache/httpd.conf LoadModule php4_module lib/apache/libphp4.dll AddModule mod_php4.c ファイル名を省略した場合、読み込むファイルに index.php を追加 <IfModule mod_dir.c> DirectoryIndex index.html </IfModule>
<IfModule mod_dir.c> DirectoryIndex index.html index.php </IfModule> 拡張子が php の場合に php スクリプトを実行するように設定。 AddType application/x-tar .tgz
AddType application/x-tar .tgz # 2005.10.24: 拡張子が php の場合に php スクリプトを実行するように設定 AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps
$ /usr/sbin/apachectl configtest Syntax OK $ /usr/sbin/apachectl start /usr/sbin/apachectl start: httpd started PHPスクリプトをDocumentRoot直下に設置します。 (phpinfo.php) <?php phpinfo(); ?> ブラウザで http://localhost/phpinfo.phpを表示できたので、インストール完了! PR |
ブログ内検索
カテゴリー
|