[[PHP]]
*phpdev [#t13a0391]
-apacheとphpとmysqlをまとめて使う
--[[PHP/phpdev]]
*php-4.3.3のインストール [#r63a9380]
-JpGraphを使うためにgdを使えるようにする
-ついでに4.3.3にバージョンを上げる
-先に[[gd]]を使えるようにしておく。php付属の[[gd]]ではTTFが使えませんでした
コンフィグオプションはとりあえずこれで。
./configure \
--enable-mbstring \
--enable-mbstr-etc-trans \
--enable-mbregex \
--enable-zend-multibyte \
--with-pgsql \
--with-apxs=/usr/sbin/apxs \
--with-gd=/usr \
--with-ttf=/usr \
--enable-gd-native-ttf \
--with-free-type-dir=/usr \
--with-jpeg-dir=/usr/lib \
--with-png-dir=/usr/lib \
--with-zlib-dir=/usr/lib
%% --with-gd \%%
あとは
make
make install
**標準でインストールされていたものを使用 [#y26fcc9b]
-jpeg
-png
-free-type
-zlib
**参照 [#k9af279f]
-http://ns1.php.gr.jp/pipermail/php-users/2003-June/016279.html
-PHP4徹底攻略 JpGraphのインストール
*php-4.3.1のインストール [#x3195764]
php(php-4.3.1)を展開してコンフィグ
./configure --enable-mbstring --enable-mbstr-etc-trans \
--enable-mbregex --enable-zend-multibyte --with-pgsql \
--with-apxs2=/usr/sbin/apxs --without-gd
設定値については、./configure --helpを参照
|--enable-mbstring |multbyte string support|
|--enable-mbstr-etc-trans|??|
|--enable-mbregex|multibyte regex support|
|--enable-zend-multibyte|zend multibyte support|
|--with-pgsql|[--with-pgsql[=/usr/local/pgsql]]|
|--with-apxs2=/usr/sbin/apxs|DSO対応 apache2.0 |
|--without-gd||
まず、最初
configure: error: You have enabled Apache 2 support while your server is Apache
1.3. Please use the appropiate switch --with-apxs (without the 2)
rpm -qa | grep apache でバージョンを確認し、apache 1.3.27
--with-apxs2=/usr/sbin/apxs => --with-apxs=/usr/sbin/apxs
make~
/home/YKADOGUC/php-4.3.1/ext/mysql/libmysql/my_tempnam.c:103:
the use of `tempnam' is dangerous, better use `mkstemp'
PHPとmkstempでぐぐるとサイト((http://kamakura.cool.ne.jp/oppama/oswa/phpstart.html))
発見。参照して
/php-4.3.1/ext/mysql/libmysql/に
#undef HAVE_TEMPNAM
makeするも玉砕
同 *.oと*.loを削除して再度試行
make長いのでその間に更に情報を探索
「Apache + PHP4 + PostgreSQL のインストール」((http://dreamer.linux-site.net/ServerInstall/php4.html))にgccが古い!とのこと~
gccを上げると解決するもよう
とりあえず、そのままmake install...
apacheでPHPを有効にする
/etc/httpd/conf/httpd.conf
AddHandler cgi-scripts .cgi
AddHandler application/x-httpd-php .php
cgi-binにphp_test.phpを作成
<?
phpinfo();
?>
*アップデート [#h23e7593]
**php-4.3.8 [#y0dd7daf]
-特に問題なくインストール完了
-apacheを再起動して動作確認OK
**PHP 4.4.1へアップデート [#g4168737]
-アーカイブを展開し、configureパラメータは、apxsをapacheのバージョンに合わせて設定。
-wikiがセグメンテーションエラーでwiki1.4.2が動作しなくなった
-すでにセットアップしてあった1.4.4は正常に動作した為、移行
-wikiのバージョンアップは、ファイルをいじっていると面倒・・・。
-SquirrelMail1.4.5でメールが見られなくなる不具合
--4.4.2で解決%%するらしい(未確認)%%
**PHP 4.4.2へアップデート [#o050b53f]
-4.4.2でwiki1.4.4が動作せず、やっぱりすでにセットアップしていた1.4.6へ移行
**php-4.4.4 [#r8d3dfb8]
-IISのときは、デフォルトのPHP.iniを修正する必要あり。
cgi.force_redirect = 0
**Windowsでmbstringを有効にする [#ocde0919]
; Directory in which the loadable extensions (modules) reside.
; extension_dir = "./"
extension_dir = "C:\php\extensions"
;Windows Extensions
;Note that MySQL and ODBC support is now built in, so no dll is needed for it.
;
;extension=php_mbstring.dll
extension=php_mbstring.dll