Quantcast
Channel: 鯖設定とプログラム
Viewing all articles
Browse latest Browse all 10

PHP5.3.8にアップグレードする RHEL4(RedHat Enterprise Linux ES v4)

$
0
0
curlを有効にしたかったので、ついでに何年ぶりかにPHPをアップグレードした。

PHP5.2.5からPHP5.3.8にサーバをアップグレードする。

前回のPHP5.2.4からPHP5.2.5にアップグレードと同様にインストールしてみる。

# cd /usr/local/src/

# wget http://jp.php.net/get/php-5.3.8.tar.gz/from/a/mirror
# ls -al
php-5.3.8.tar.bz2

# tar jxvf php-5.3.8.tar.bz2
# cd php-5.3.8

# ../configure --prefix=/usr/local --bindir=/usr/local/bin/ --with-apxs2=/usr/sbin/apxs --with-mysql=/usr --enable-mbstring --enable-mbregex --with-freetype-dir=/usr --with-png-dir=/usr --with-gd --enable-gd-native-ttf --with-gettext --with-gmp --with-iconv --with-jpeg -dir=/usr --with-openssl --with-pspell --with-regex --with-zlib --with-layout=GNU --enable-bcmath --enable-exif --enable-ftp --enable-magic-quot
es --enable-safe-mode --enable-sockets --enable-sysvsem --enable-sysvshm --enable-wddx --without-oci8 --with-pear --with-kerberos=/usr/kerberos --with-ldap=shared --enable-bcmath --enable-shmop --enable-calendar --with-pdo-mysql --with-mcrypt --with-curl

+--------------------------------------------------------------------+
| License: |
| This software is subject to the PHP License, available in this |
| distribution in the file LICENSE. 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.

# make

Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).

アパッチを止める
/etc/init.d/httpd stop
インストール
# make install
アパッチ起動
/etc/init.d/httpd start

これでアップグレードは完了。

# php -v

5.3.8の情報に変わっていた。

Deprecated: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0
と警告が出ている。5.3以降は'magic_quotes_gpc'が推奨されていないようだ。

# vi /usr/local/etc/php.ini

magic_quotes_gpc = Offとした
もう一つ非推奨のregister_long_arraysも
register_long_arrays = Off
とした。

# php -v
PHP 5.3.8 (cli) (built: Oct 25 2011 00:53:30)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies

エラーも出なくなりcurlも利用可能となった。

PHPアップグレード履歴
PHP4.3.9からPHP5.1.5にアップグレード
PHP5.1.5からPHP5.2.0にアップグレード
PHP5.2.0からPHP5.2.1にアップグレード
PHP5.2.1からPHP5.2.3にアップグレード
PHP5.2.3からPHP5.2.4にアップグレード
PHP5.2.4からPHP5.2.5にアップグレード

Viewing all articles
Browse latest Browse all 10

Trending Articles