CONTENTS


Lastmodified 2016-12-12 (月) 16:44:39


PHP 5.5 から PHP 5.6 へアップグレード

【参考にさせて頂いたサイト】 http://kaworu.jpn.org/freebsd/PHP5.6%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B#PHP_5.5_.E3.81.8B.E3.82.89_PHP_5.6_.E3.81.B8.E3.82.A2.E3.83.83.E3.83.97.E3.82.B0.E3.83.AC.E3.83.BC.E3.83.89.E3.81.99.E3.82.8B.E6.96.B9.E6.B3.95

$ pkg info | fgrep php55 >/tmp/php.txt
$ sudo pkg remove '*php55*'
$ sudo pkg install `sed -e 's/-5.5.*$//' -e 's/php55/php56/' -e 's/extensions.*/extensions/' /tmp/php.txt `

PHP 5.5 から PHP 5.6 へアップグレード

portupgrede -a de

** Listing the failed packages (-:ignored / *:skipped / !:failed)
       - www/mod_php55 (port deleted)
       - lang/php55 (port deleted)
       - textproc/php55-ctype (port deleted)
       - textproc/php55-dom (port deleted)
       - lang/php55-extensions (port deleted)
       - security/php55-filter (port deleted)
       - security/php55-hash (port deleted)
       - converters/php55-iconv (port deleted)
       - devel/php55-json (port deleted)
       - www/php55-opcache (port deleted)
       - databases/php55-pdo (port deleted)
       - databases/php55-pdo_sqlite (port deleted)
       - archivers/php55-phar (port deleted)
       - sysutils/php55-posix (port deleted)
       - www/php55-session (port deleted)
       - textproc/php55-simplexml (port deleted)
       - databases/php55-sqlite3 (port deleted)
       - devel/php55-tokenizer (port deleted)
       - textproc/php55-xml (port deleted)
       - textproc/php55-xmlreader (port deleted)
       - textproc/php55-xmlwriter (port deleted)
       - devel/ruby-date2 (marked as IGNORE)
       - lang/ruby20 (port deleted)

といわれるので

cp -r /usr/local/etc/php /usr/local/etc/php-55

cp /usr/local/etc/php.conf /usr/local/etc/php.conf-55

# pkg set -o lang/php5:lang/php56

Change origin from lang/php5 to lang/php56 for all dependencies? [y/N]: y

y

# pkg info | fgrep php55 > /root/php55.txt

# pkg remove '*php55*'

Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 21 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
       mod_php55-5.5.38_2
       php55-5.5.38_2
       php55-ctype-5.5.38_1
       php55-dom-5.5.38_1
       php55-extensions-1.8
       php55-filter-5.5.38_1
       php55-hash-5.5.38_1
       php55-iconv-5.5.38_1
       php55-json-5.5.38_1
       php55-opcache-5.5.38_2
       php55-pdo-5.5.38_1
       php55-pdo_sqlite-5.5.38_1
       php55-phar-5.5.38_1
       php55-posix-5.5.38_1
       php55-session-5.5.38_2
       php55-simplexml-5.5.38_1
       php55-sqlite3-5.5.38_1
       php55-tokenizer-5.5.38_1
       php55-xml-5.5.38_1
       php55-xmlreader-5.5.38_1
       php55-xmlwriter-5.5.38_1

Number of packages to be removed: 21

The operation will free 21 MiB.

Proceed with deinstalling packages? [y/N]: y

[1/21] Deinstalling php55-extensions-1.8...
[2/21] Deinstalling php55-pdo_sqlite-5.5.38_1...
[2/21] Deleting files for php55-pdo_sqlite-5.5.38_1: 100%
   :
[20/21] Deleting files for mod_php55-5.5.38_2: 100%
[21/21] Deinstalling php55-5.5.38_2...
[21/21] Deleting files for php55-5.5.38_2: 100%

# pkg install `sed -e 's/-5.5.*$//' -e 's/php55/php56/' -e 's/extensions.*/extensions/' /root/php55.txt `

Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
The following 21 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
       mod_php56: 5.6.28
       php56: 5.6.28
       php56-ctype: 5.6.28
       php56-dom: 5.6.28
       php56-extensions: 1.0
       php56-filter: 5.6.28
       php56-hash: 5.6.28
       php56-iconv: 5.6.28
       php56-json: 5.6.28
       php56-opcache: 5.6.28
       php56-pdo: 5.6.28
       php56-pdo_sqlite: 5.6.28
       php56-phar: 5.6.28
       php56-posix: 5.6.28
       php56-session: 5.6.28
       php56-simplexml: 5.6.28
       php56-sqlite3: 5.6.28
       php56-tokenizer: 5.6.28
       php56-xml: 5.6.28
       php56-xmlreader: 5.6.28
       php56-xmlwriter: 5.6.28

Number of packages to be installed: 21

The process will require 21 MiB more space.
3 MiB to be downloaded.

Proceed with this action? [y/N]: y

Fetching mod_php56-5.6.28.txz: 100%  956 KiB 244.8kB/s    00:04
Fetching php56-5.6.28.txz: 100%    2 MiB 308.9kB/s    00:06
            :
[19/21] Extracting php56-xmlwriter-5.6.28: 100%
[20/21] Installing mod_php56-5.6.28...
[20/21] Extracting mod_php56-5.6.28: 100%
[activating module `php5' in /usr/local/etc/apache24/httpd.conf]
[21/21] Installing php56-extensions-1.0...
Message from php56-dom-5.6.28:
****************************************************************************  
The following line has been added to your /usr/local/etc/php/ext-20-dom.ini
configuration file to automatically load the installed extension: 

extension=dom.so 

****************************************************************************
Message from php56-hash-5.6.28:
****************************************************************************                 :

**************************************************************************** 
Message from mod_php56-5.6.28:
*************************************************************** 

Make sure index.php is part of your DirectoryIndex. 
You should add the following to your Apache configuration file: 

<FilesMatch "\.php$">
    SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
    SetHandler application/x-httpd-php-source
</FilesMatch>

***************************************************************

php56-extensionsも入るが、オプション設定がデフォルト項目だけのようなので、GDとかが必要な場合は要チェック

/usr/ports/lang/php56-extensions

にて、

make config 

するなどして確認。

あと、www/mod_php5 も要確認!

php -v

PHP 5.6.28 (cli) (built: Nov 29 2016 01:20:14)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

# apachectl restart

php5 を php54 から php55 へ

pkg: apache22-2.2.31_1 conflicts with apache24-2.4.23_1 (installs files into the same place). Problematic file: /usr/local/man/man1/dbmmanage.1.gz


Total access 610:本日 1:昨日 0

Counter: 610, today: 1, yesterday: 0

トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2016-12-12 (月) 16:44:39