「PHP5.5をインストールする」の版間の差分
提供: FreeBSD入門
(ページの作成:「'''読み方''' ;PHP 5.5:ぴーえいちぴー ごーてんご __TOC__ == 概要 == <syntaxhighlight lang="bash"> $ php -v PHP 5.5.9 (cli) (built: Feb 13 2014 14:02:4...」) |
(相違点なし)
|
2014年3月2日 (日) 01:10時点における版
読み方
- PHP 5.5
- ぴーえいちぴー ごーてんご
概要
$ php -v PHP 5.5.9 (cli) (built: Feb 13 2014 14:02:42) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
インストール
$ sudo pkg install php55 php55-extensions Updating repository catalogue The following 21 packages will be installed: Installing php55: 5.5.9 Installing php55-session: 5.5.9 Installing php55-opcache: 5.5.9 Installing php55-xmlwriter: 5.5.9 Installing php55-dom: 5.5.9 Installing php55-xml: 5.5.9 Installing php55-simplexml: 5.5.9 Installing php55-ctype: 5.5.9 Installing php55-posix: 5.5.9 Installing php55-hash: 5.5.9 Installing php55-filter: 5.5.9 Installing php55-tokenizer: 5.5.9 Installing php55-json: 5.5.9 Installing sqlite3: 3.8.3.1 Installing php55-pdo: 5.5.9 Installing php55-iconv: 5.5.9 Installing php55-phar: 5.5.9 Installing php55-xmlreader: 5.5.9 Installing php55-sqlite3: 5.5.9 Installing php55-pdo_sqlite: 5.5.9 Installing php55-extensions: 1.8 The installation will require 19 MB more space 3 MB to be downloaded
設定
以下の設定ファイルが用意されています。
- /usr/local/etc/php-fpm.conf
- /usr/local/etc/php-fpm.conf.default
- /usr/local/etc/php.conf
- /usr/local/etc/php.ini-development
- /usr/local/etc/php.ini-production
- /usr/local/etc/php/extensions.ini
使い方
コマンドラインオプション
php
Usage: php [options] [-f] <file> [--] [args...] php [options] -r <code> [--] [args...] php [options] [-B <begin_code>] -R <code> [-E <end_code>] [--] [args...] php [options] [-B <begin_code>] -F <file> [-E <end_code>] [--] [args...] php [options] -S <addr>:<port> [-t docroot] php [options] -- [args...] php [options] -a -a Run interactively -c <path>|<file> Look for php.ini file in this directory -n No php.ini file will be used -d foo[=bar] Define INI entry foo with value 'bar' -e Generate extended information for debugger/profiler -f <file> Parse and execute <file>. -h This help -i PHP information -l Syntax check only (lint) -m Show compiled in modules -r <code> Run PHP <code> without using script tags <?..?> -B <begin_code> Run PHP <begin_code> before processing input lines -R <code> Run PHP <code> for every input line -F <file> Parse and execute <file> for every input line -E <end_code> Run PHP <end_code> after processing all input lines -H Hide any passed arguments from external tools. -S <addr>:<port> Run with built-in web server. -t <docroot> Specify document root <docroot> for built-in web server. -s Output HTML syntax highlighted source. -v Version number -w Output source with stripped comments and whitespace. -z <file> Load Zend extension <file>. args... Arguments passed to script. Use -- args when first argument starts with - or script is read from stdin --ini Show configuration file names --rf <name> Show information about function <name>. --rc <name> Show information about class <name>. --re <name> Show information about extension <name>. --rz <name> Show information about Zend extension <name>. --ri <name> Show configuration for extension <name>.
php-fpm
Usage: php [-n] [-e] [-h] [-i] [-m] [-v] [-t] [-p <prefix>] [-g <pid>] [-c <file>] [-d foo[=bar]] [-y <file>] [-D] [-F] -c <path>|<file> Look for php.ini file in this directory -n No php.ini file will be used -d foo[=bar] Define INI entry foo with value 'bar' -e Generate extended information for debugger/profiler -h This help -i PHP information -m Show compiled in modules -v Version number -p, --prefix <dir> Specify alternative prefix path to FastCGI process manager (default: /usr/local). -g, --pid <file> Specify the PID file location. -y, --fpm-config <file> Specify alternative path to FastCGI process manager config file. -t, --test Test FPM configuration and exit -D, --daemonize force to run in background, and ignore daemonize option from config file -F, --nodaemonize force to stay in foreground, and ignore daemonize option from config file -R, --allow-to-run-as-root Allow pool to run as root (disabled by default)
php-fpmのログファイルは、 /var/log/php-fpm.log です。
関連項目
- PHP
- PHP5.5をインストールする
- PHP5.6をインストールする
- Apache 2.4でlibphp5.soを使用する方法