在Ubuntu 9.04 Server版下源代码安装Nginx+Mysql+PHP笔记

 

作者:何祖彬[RobinHe] Mail:[email protected]
BLOG : http://blog.csdn.net/zubin006/
Website : http://www.wearelinuxer.com/
始于2009年9月6日
版本号:Nginx+Mysql+PHP-V1.0-20091007,2009年10月07日首版

转载请注明出处,本文也是采用两篇网友的大部分内容,因此转载时,请也将下面“参考文章”的出处也一并加入!谢谢!
本文中难免有不足、遗漏、错别字和句子不通之处,如发现、或者有更新改变之处,请与我联系以及时修正和完善!

PS:由于也是刚刚接触nginx,因此此笔记还不是很完整,需研究几日再逐渐完善和更新。

系统信息:
OS : Ubuntu 9.04 Server版


使用说明:
绿色加粗字体的绝大部分是输入的命令和系统输出显示的结果。

参考文章:

[原创]Fedora8 + Nginx 0.6.3 + PHP 5.2.5

http://hi.baidu.com/meshikar/blog/item/afcde800485a8114738b6576.html

CentOS下Nginx配置笔记(一)安装准备篇
http://ipbfans.org/2008/06/centos-nginx-install

CentOS下Nginx配置笔记(二)PHP以及虚拟主机配置
http://ipbfans.org/2008/06/centos-nginx-php-virtualhost

Nginx 0.7.x + PHP 5.2.8(FastCGI)搭建胜过Apache十倍的Web服务器(第4版)[原创]
http://blog.s135.com/nginx_php_v4/

nginx+PHP +PHP-FPM(FastCGI)在Ubuntu上的安装和配置
http://blog.csdn.net/omohe/archive/2009/07/10/4336731.aspx

Nginx介绍:
Nginx (”engine x”) 是一个高性能的 HTTP 和反向代理服务器,也是一个 IMAP/POP3/SMTP 代理服务器。 Nginx 是由 Igor Sysoev 为俄罗斯访问量第二的 Rambler.ru 站点开发的,它已经在该站点运行超过两年半了。Igor 将源代码以类BSD许可证的形式发布。

Nginx 超越 Apache 的高性能和稳定性,使得国内使用 Nginx 作为 Web 服务器的网站也越来越多,其中包括新浪博客 、新浪播客 、网易新闻 等门户网站频道,六间房 、56.com 等视频分享网站,Discuz!官方论坛 、水木社区 等知名论坛,豆瓣 、YUPOO相册 、海内SNS 、迅雷在线 等新兴Web 2.0网站。


Nginx 的官方中文维基:http://wiki.nginx.org/NginxChs

一,安装并下载所需以及相关的软件:
为了少打sudo,我启用了ubuntu下的root帐号,方法:
e@u904:~$ sudo passwd
[sudo] password for e:                                    //输入当前用户e的密码进行身份验证
Enter new UNIX password:                                  //输入root的新密码
Retype new UNIX password:                                 //确认root的新密码
passwd: password updated successfully

1,安装所需的编译工具:
# apt-get install vim elinks gcc g++ make libncurses5-dev libpng12-dev libjpeg62-dev zlib1g-dev libxml2-dev libssl-dev openssl libperl-dev

2,下载nginx,mysql和php:
#cd /usr/local/src
#mkdir nginx     //存放nginx、mysql和php源代码的目录
#cd nginx
#wget http://mysql.mirrors.pair.com/Downloads/MySQL-5.1/mysql-5.1.39.tar.gz
#wget http://sysoev.ru/nginx/nginx-0.7.62.tar.gz
//***#wget http://cn2.php.net/get/php-5.2.11.tar.gz/from/cn.php.net/mirror
#wget http://cn2.php.net/get/php-5.3.0.tar.gz/from/cn.php.net/mirror

二,安装mysql:
# tar -zxvf mysql-5.1.39.tar.gz
# cd mysql-5.1.39
请看INSTALL-SOURCE文件,它会教你如何一步一步安装Mysql:
#vi INSTALL-SOURCE 增加运行mysql的用户mysql和组mysql:
#groupadd mysql
#useradd -g mysql mysql

配置mysql:根据需要将相关文件安装到相关的目录中去。依个人需要而定,请了解以下各参数的作用后再进行下一步:
# ./configure –prefix=/usr/local/mysql51 –sysconfdir=/usr/local/mysql51/etc –enable-thread-safe-client
# make
# make install

# mkdir /usr/local/mysql51/etc
# cp support-files/my-medium.cnf /usr/local/mysql51/etc/my.cnf

#cd /usr/local/mysql51
#chown -R mysql .
#chgrp -R mysql .
#./bin/mysql_install_db –user=mysql
#chown -R root .
#chown -R mysql var
#cp share/mysql/mysql.server /etc/init.d/mysqld51

启动mysql:
#/etc/init/mysqld51 start

查看mysql是否启动成功:
#netstat -tnlp | grep mysql
如果有看到这一行:
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      1328/mysqld
恭喜你,这说明mysql启动成功.
三,安装PHP[FastCGI模式]:

#cd /usr/local/src/nginx

#wget http://php-fpm.org/downloads/php-5.3.0-fpm-0.5.12.diff.gz
#tar -zxvf php-5.3.0.tar.gz
#gzip -cd php-5.3.0-fpm-0.5.12.diff.gz | patch -d php-5.3.0 -p1

./configure –prefix=/usr/local/php530 –with-mysql=/usr/local/mysql51 –with-gd –with-zlib –with-gettext –with-zlib-dir –with-jpeg-dir –enable-mbstring –with-iconv-dir –with-pdo-mysql=/usr/local/mysql –with-openssl –enable-sockets –enable-fpm

PS: PHP 5.3.X跟PHP 5.2.X有所不同,如果要启用fastcgi, PHP 5.2.X必须:–enable-fastcgi –enable-fpm,而5.3.X只要:–enable-fpm,具体请看:
#./configure –help | grep fpm
–enable-fpm              FastCGI: If this is enabled, the fastcgi support

#make
#make install
#cp php.ini-development /usr/local/php530/lib/php.ini

编辑php-fpm.conf文件:
#vi /usr/local/php530/etc/php-fpm.conf
修改:
Unix user of processes
nobody               –>
Unix group of processes
nobody      –>

为:
Unix user of processes
www
Unix group of processes
www

也可以更改php-fpm的端口等,当然根据自已喜欢而定,不过最好按标准,我把启动php-fpm的用户和组设为www.可以依情况而做相关变更。

启动php-fpm:
#/usr/local/php530/sbin/php-fpm start

看一下启动是否成功:
#netstat -tlnp | grep php
tcp        0      0 127.0.0.1:9000          0.0.0.0:*               LISTEN      12555/php-cgi

恭喜您,启动成功了!

三,安装Nginx:
先下载并解压pcre,因为Nginx中rewrite功能需要使用pcre库才能工作:
#cd /usr/local/src/nginx
#wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.9.tar.gz
#tar -zxvf
pcre-7.9.tar.gz

#cd /usr/local/src/nginx
#tar -zxvf nginx-0.7.62.tar.gz
#cd nginx-0.7.62
#./configure –prefix=/usr/local/nginx –with-pcre=/usr/local/src/nginx/pcre-7.9 –user=www –group=www –with-http_perl_module –with-http_stub_status_module

这行暂时取消://PS:ssl模块,支持https。

PS:–with-pcre需要指向pcre的源代码目录。

#make
#make install

编辑/usr/local/nginx/conf/nginx.conf配置文件,我服务器上的内容如下[下次再做较详细介绍]:
#vi /usr/local/nginx/conf/nginx.conf

###config file start ###

#user  nobody;
user  www www;
worker_processes  1;

error_log  /usr/local/nginx/logs/error.log crit;
#error_log  /usr/local/nginx/logs/error.log  notice;
#error_log  /usr/local/nginx/logs/error.log  info;

#pid        logs/nginx.pid;
pid        /usr/local/nginx/logs/nginx.pid;

worker_rlimit_nofile 51200;

events {
use epoll;
worker_connections  1024;
}

http {
include       mime.types;
default_type  application/octet-stream;

#log_format  main  ‘$remote_addr – $remote_user [$time_local] “$request” ‘
#                  ‘$status $body_bytes_sent “$http_referer” ‘
#                  ‘”$http_user_agent” “$http_x_forwarded_for”‘;

#access_log  /usr/local/nginx/logs/access.log  main;
access_log  /usr/local/nginx/logs/access.log;

server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 8m;

sendfile        on;
tcp_nopush     on;

#keepalive_timeout  0;
keepalive_timeout  65;

tcp_nodelay on;

fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 128k;

gzip on;
gzip_min_length  1k;
gzip_buffers     4 16k;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_types       text/plain application/x-javascript text/css application/xml;
gzip_vary on;

#gzip  on;

server {
listen       60080;
#server_name  localhost;
server_name  pto.3322.org;

#charset koi8-r;

#access_log  /usr/local/nginx/logs/pto.3322.org.access.log  main;
access_log  /usr/local/nginx/logs/pto.3322.org.access.log;

location / {
#root   /home/www/html;
root   html;
index  index.html index.htm index.php;
}

#error_page  404              /404.html;

# redirect server error pages to the static page /50x.html
#
error_page   500 502 503 504  /50x.html;
location = /50x.html {
#root   /home/www/html;
root   html;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ /.php$ {
#    proxy_pass   http://127.0.0.1 ;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ /.php$ {
root           html;
fastcgi_pass   127.0.0.1:9000;
fastcgi_index  index.php;
include        fcgi.conf;
}
location /nginx_status {
stub_status on;
access_log   off;
allow 59.58.97.2;
deny all;
}

# deny access to .htaccess files, if Apache’s document root
# concurs with nginx’s one
#
#location ~ //.ht {
#    deny  all;
#}
}

# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
#    listen       8000;
#    listen       somename:8080;
#    server_name  somename  alias  another.alias;

#    location / {
#        root   html;
#        index  index.html index.htm;
#    }
#}

# HTTPS server
#
#server {
#    listen       443;
#    server_name  localhost;

#    ssl                  on;
#    ssl_certificate      cert.pem;
#    ssl_certificate_key  cert.key;

#    ssl_session_timeout  5m;

#    ssl_protocols  SSLv2 SSLv3 TLSv1;
#    ssl_ciphers  ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
#    ssl_prefer_server_ciphers   on;

#    location / {
#        root   html;
#        index  index.html index.htm;
#    }
#}

}

###config file End ###

编辑/usr/local/nginx/conf/fcgi.conf
#vi /usr/local/nginx/conf/fcgi.conf

###config file End ###

fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
fastcgi_param  SERVER_SOFTWARE    nginx;

fastcgi_param  QUERY_STRING       $query_string;
fastcgi_param  REQUEST_METHOD     $request_method;
fastcgi_param  CONTENT_TYPE       $content_type;
fastcgi_param  CONTENT_LENGTH     $content_length;

fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
fastcgi_param  REQUEST_URI        $request_uri;
fastcgi_param  DOCUMENT_URI       $document_uri;
fastcgi_param  DOCUMENT_ROOT      $document_root;
fastcgi_param  SERVER_PROTOCOL    $server_protocol;

fastcgi_param  REMOTE_ADDR        $remote_addr;
fastcgi_param  REMOTE_PORT        $remote_port;
fastcgi_param  SERVER_ADDR        $server_addr;
fastcgi_param  SERVER_PORT        $server_port;
fastcgi_param  SERVER_NAME        $server_name;

# PHP only, required if PHP was built with –enable-force-cgi-redirect
fastcgi_param  REDIRECT_STATUS    200;

###config file End ###

启动Nginx:
#/usr/local/nginx/sbin/nginx

查看是否启动成功:

#netstat -tlnp | grep nginx
tcp        0      0 0.0.0.0:60080           0.0.0.0:*               LISTEN      30309/nginx

由于我把nginx的端口改为60080,所以看到的是60080.

四,测试Nginx+Mysql+PHP:

写一个php程序放在Doc root目录,即/home/www/html/phgg.php,内容如下:

phpinfo();
?>

打开您的浏览器,输入:

http://youipaddress:60080/phgg.php

如果能看到以下内容,恭喜你,你安装 Nginx+Mysql+PHP成功…

PHP Version 5.3.0

System Linux u904 2.6.28-11-server #42-Ubuntu SMP Fri Apr 17 02:48:10 UTC 2009 i686
Build Date Oct 9 2009 15:53:01
Configure Command ‘./configure’ ‘–prefix=/usr/local/php530′ ‘–with-mysql=/usr/local/mysql51′ ‘–with-gd’ ‘–with-zlib’ ‘–with-gettext’ ‘–with-zlib-dir’ ‘–with-jpeg-dir’ ‘–enable-mbstring’ ‘–with-iconv-dir’ ‘–with-pdo-mysql=/usr/local/mysql’ ‘–with-openssl’ ‘–enable-sockets’ ‘–enable-fpm’
Server API CGI/FastCGI
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/php530/lib
Loaded Configuration File /usr/local/php530/lib/php.ini
Scan this dir for additional .ini files (none)
Additional .ini files parsed (none)
PHP API 20090626
PHP Extension 20090626
Zend Extension 220090626
Zend Extension Build API220090626,NTS
PHP Extension Build API20090626,NTS
Debug Build no
Thread Safety disabled
Zend Memory Manager enabled
Zend Multibyte Support disabled
IPv6 Support enabled
Registered PHP Streams https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
Registered Stream Filters zlib.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies

PHP Credits


Configuration

cgi-fcgi

Directive Local Value Master Value
cgi.discard_path 0 0
cgi.fix_pathinfo 1 1
cgi.force_redirect 1 1
cgi.nph 0 0
cgi.redirect_status_env no value no value
cgi.rfc2616_headers 0 0
fastcgi.error_header no value no value
fastcgi.logging 1 1
php-fpm active
php-fpm version 0.5.12

Core

PHP Version 5.3.0
Directive Local Value Master Value
allow_call_time_pass_reference Off Off
allow_url_fopen On On
allow_url_include Off Off
always_populate_raw_post_data Off Off
arg_separator.input & &
arg_separator.output & &
asp_tags Off Off
auto_append_file no value no value
auto_globals_jit On On
auto_prepend_file no value no value
browscap no value no value
default_charset no value no value
default_mimetype text/html text/html
define_syslog_variables Off Off
disable_classes no value no value
disable_functions no value no value
display_errors On On
display_startup_errors On On
doc_root no value no value
docref_ext no value no value
docref_root no value no value
enable_dl Off Off
error_append_string no value no value
error_log no value no value
error_prepend_string no value no value
error_reporting 32767 32767
exit_on_timeout Off Off
expose_php On On
extension_dir /usr/local/php530/lib/php/extensions/no-debug-non-zts-20090626 /usr/local/php530/lib/php/extensions/no-debug-non-zts-20090626
file_uploads On On
highlight.bg #FFFFFF #FFFFFF
highlight.comment #FF8000 #FF8000
highlight.default #0000BB #0000BB
highlight.html #000000 #000000
highlight.keyword #007700 #007700
highlight.string #DD0000 #DD0000
html_errors On On
ignore_repeated_errors Off Off
ignore_repeated_source Off Off
ignore_user_abort Off Off
implicit_flush Off Off
include_path .:/php/includes .:/php/includes
log_errors On On
log_errors_max_len 1024 1024
magic_quotes_gpc Off Off
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off
mail.add_x_header On On
mail.force_extra_parameters no value no value
mail.log no value no value
max_execution_time 30 30
max_input_nesting_level 64 64
max_input_time 60 60
memory_limit 128M 128M
open_basedir no value no value
output_buffering 4096 4096
output_handler no value no value
post_max_size 88M 88M
precision 14 14
realpath_cache_size 16K 16K
realpath_cache_ttl 120 120
register_argc_argv Off Off
register_globals Off Off
register_long_arrays Off Off
report_memleaks On On
report_zend_debug On On
request_order GP GP
safe_mode Off Off
safe_mode_exec_dir no value no value
safe_mode_gid Off Off
safe_mode_include_dir no value no value
sendmail_from no value no value
sendmail_path -t -i -t -i
serialize_precision 100 100
short_open_tag Off Off
SMTP localhost localhost
smtp_port 25 25
sql.safe_mode Off Off
track_errors On On
unserialize_callback_func no value no value
upload_max_filesize 88M 88M
upload_tmp_dir no value no value
user_dir no value no value
user_ini.cache_ttl 300 300
user_ini.filename .user.ini .user.ini
variables_order GPCS GPCS
xmlrpc_error_number 0 0
xmlrpc_errors Off Off
y2k_compliance On On
zend.enable_gc On On

ctype

ctype functions enabled

date

Warning : phpinfo() [function.phpinfo ]: It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘Asia/Chongqing’ for ‘CST/8.0/no DST’ instead in /home/www/html/phgg.php on line 2

date/time support enabled
“Olson” Timezone Database Version 2009.10
Timezone Database internal
Default timezone Asia/Chongqing
Directive Local Value Master Value
date.default_latitude 31.7667 31.7667
date.default_longitude 35.2333 35.2333
date.sunrise_zenith 90.583333 90.583333
date.sunset_zenith 90.583333 90.583333
date.timezone no value no value

dom

DOM/XML enabled
DOM/XML API Version 20031129
libxml Version 2.6.32
HTML Support enabled
XPath Support enabled
XPointer Support enabled
Schema Support enabled
RelaxNG Support enabled

ereg

Regex Library Bundled library enabled

fileinfo

fileinfo support enabled
version 1.0.5-dev

filter

Input Validation and Filtering enabled
Revision $Revision: 1.52.2.39.2.16 $
Directive Local Value Master Value
filter.default unsafe_raw unsafe_raw
filter.default_flags no value no value

gd

GD Support enabled
GD Version bundled (2.0.34 compatible)
GIF Read Support enabled
GIF Create Support enabled
JPEG Support enabled
libJPEG Version 6b
PNG Support enabled
libPNG Version 1.2.27
WBMP Support enabled
XBM Support enabled
Directive Local Value Master Value
gd.jpeg_ignore_warning 0 0

gettext

GetText Support enabled

hash

hash support enabled
Hashing Engines md2 md4 md5 sha1 sha224 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost adler32 crc32 crc32b salsa10 salsa20 haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5

iconv

iconv support enabled
iconv implementation glibc
iconv library version 2.9
Directive Local Value Master Value
iconv.input_encoding ISO-8859-1 ISO-8859-1
iconv.internal_encoding ISO-8859-1 ISO-8859-1
iconv.output_encoding ISO-8859-1 ISO-8859-1

json

json support enabled
json version 1.2.1

libxml

libXML support active
libXML Compiled Version 2.6.32
libXML Loaded Version 20632
libXML streams enabled

mbstring

Multibyte Support enabled
Multibyte string engine libmbfl
HTTP input encoding translation disabled
mbstring extension makes use of “streamable kanji code filter and converter”, which is distributed under the GNU Lesser General Public License version 2.1.
Multibyte (japanese) regex support enabled
Multibyte regex (oniguruma) backtrack check On
Multibyte regex (oniguruma) version 4.7.1
Directive Local Value Master Value
mbstring.detect_order no value no value
mbstring.encoding_translation Off Off
mbstring.func_overload 0 0
mbstring.http_input pass pass
mbstring.http_output pass pass
mbstring.http_output_conv_mimetypes ^(text/|application/xhtml/+xml) ^(text/|application/xhtml/+xml)
mbstring.internal_encoding no value no value
mbstring.language neutral neutral
mbstring.strict_detection Off Off
mbstring.substitute_character no value no value

mysql

MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 5.1.39
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_INCLUDE -I/usr/local/mysql51/include/mysql
MYSQL_LIBS -L/usr/local/mysql51/lib/mysql -lmysqlclient
Directive Local Value Master Value
mysql.allow_local_infile On On
mysql.allow_persistent On On
mysql.connect_timeout 60 60
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket /tmp/mysql.sock /tmp/mysql.sock
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off

openssl

OpenSSL support enabled
OpenSSL Library Version OpenSSL 0.9.8g 19 Oct 2007
OpenSSL Header Version OpenSSL 0.9.8g 19 Oct 2007

pcre

PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version 7.9 2009-04-11
Directive Local Value Master Value
pcre.backtrack_limit 100000 100000
pcre.recursion_limit 100000 100000

PDO

PDO support enabled
PDO drivers sqlite, mysql, sqlite2

pdo_mysql

PDO Driver for MySQL enabled
Client API version 5.1.39

pdo_sqlite

PDO Driver for SQLite 3.x enabled
SQLite Library 3.6.15

Phar

Phar: PHP Archive support enabled
Phar EXT version 2.0.0-dev
Phar API version 1.1.1
CVS revision $Revision: 1.370.2.62 $
Phar-based phar archives enabled
Tar-based phar archives enabled
ZIP-based phar archives enabled
gzip compression enabled
bzip2 compression disabled (install pecl/bz2)
Native OpenSSL support enabled
Phar based on pear/PHP_Archive, original concept by Davey Shafik.
Phar fully realized by Gregory Beaver and Marcus Boerger.
Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle.
Directive Local Value Master Value
phar.cache_list no value no value
phar.readonly On On
phar.require_hash On On

posix

Revision $Revision: 1.70.2.3.2.16.2.15 $

Reflection

Reflection enabled
Version $Revision: 1.164.2.33.2.45.2.58 $

session

Session Support enabled
Registered save handlers files user sqlite
Registered serializer handlers php php_binary
Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 On On
session.bug_compat_warn On On
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_httponly Off Off
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 1000 1000
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.hash_bits_per_character 5 5
session.hash_function 0 0
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path no value no value
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies On On
session.use_trans_sid 0 0

SimpleXML

Simplexml support enabled
Revision $Revision: 1.151.2.22.2.35.2.32 $
Schema support enabled

sockets

Sockets Support enabled

SPL

SPL support enabled
Interfaces Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
Classes AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException

SQLite

SQLite support enabled
PECL Module version 2.0-dev $Id: sqlite.c,v 1.166.2.13.2.9.2.22 2009/06/25 09:38:04 johannes Exp $
SQLite Library 2.8.17
SQLite Encoding iso8859
Directive Local Value Master Value
sqlite.assoc_case 0 0

sqlite3

SQLite3 support enabled
SQLite3 module version 0.7-dev
SQLite Library 3.6.15
Directive Local Value Master Value
sqlite3.extension_dir no value no value

standard

Dynamic Library Support enabled
Path to sendmail -t -i
Directive Local Value Master Value
assert.active 1 1
assert.bail 0 0
assert.callback no value no value
assert.quiet_eval 0 0
assert.warning 1 1
auto_detect_line_endings 0 0
default_socket_timeout 60 60
safe_mode_allowed_env_vars PHP_ PHP_
safe_mode_protected_env_vars LD_LIBRARY_PATH LD_LIBRARY_PATH
url_rewriter.tags a=href,area=href,frame=src,input=src,form=fakeentry a=href,area=href,frame=src,input=src,form=fakeentry
user_agent no value no value

tokenizer

Tokenizer Support enabled

xml

XML Support active
XML Namespace Support active
libxml2 Version 2.6.32

xmlreader

XMLReader enabled

xmlwriter

XMLWriter enabled

zlib

ZLib Support enabled
Stream Wrapper support compress.zlib://
Stream Filter support zlib.inflate, zlib.deflate
Compiled Version 1.2.3.3
Linked Version 1.2.3.3
Directive Local Value Master Value
zlib.output_compression Off Off
zlib.output_compression_level -1 -1
zlib.output_handler no value no value

Additional Modules

Module Name

Environment

Variable Value
HOSTNAME no value
PATH /usr/local/bin:/usr/bin:/bin
TMP /tmp
TMPDIR /tmp
TEMP /tmp
OSTYPE no value
MACHTYPE no value
MALLOC_CHECK_ 2
USER www
HOME /home/www

PHP Variables

Variable Value
_COOKIE["rtime"] 2
_COOKIE["ltime"] 1255098950804
_COOKIE["cnzz_eid"] 18923336-1254889915-
_COOKIE["__utma"] 154373753.1092153835.1254891523.1255008301.1255098923.5
_COOKIE["__utmz"] 154373753.1254891523.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
_COOKIE["cnzz_a1684596"] 1
_COOKIE["vw1684596"] :33575984:36925242:
_COOKIE["sin1684596"] http://pto.3322.org:60080/wearelinuxer/
_COOKIE["__utmb"] 154373753.2.10.1255098923
_COOKIE["__utmc"] 154373753
_SERVER["HOSTNAME"] no value
_SERVER["PATH"] /usr/local/bin:/usr/bin:/bin
_SERVER["TMP"] /tmp
_SERVER["TMPDIR"] /tmp
_SERVER["TEMP"] /tmp
_SERVER["OSTYPE"] no value
_SERVER["MACHTYPE"] no value
_SERVER["MALLOC_CHECK_"] 2
_SERVER["USER"] www
_SERVER["HOME"] /home/www
_SERVER["FCGI_ROLE"] RESPONDER
_SERVER["GATEWAY_INTERFACE"] CGI/1.1
_SERVER["SERVER_SOFTWARE"] nginx
_SERVER["QUERY_STRING"] no value
_SERVER["REQUEST_METHOD"] GET
_SERVER["CONTENT_TYPE"] no value
_SERVER["CONTENT_LENGTH"] no value
_SERVER["SCRIPT_FILENAME"] /home/www/html/phgg.php
_SERVER["SCRIPT_NAME"] /phgg.php
_SERVER["REQUEST_URI"] /phgg.php
_SERVER["DOCUMENT_URI"] /phgg.php
_SERVER["DOCUMENT_ROOT"] /home/www/html
_SERVER["SERVER_PROTOCOL"] HTTP/1.1
_SERVER["REMOTE_ADDR"] 58.22.137.203
_SERVER["REMOTE_PORT"] 4933
_SERVER["SERVER_ADDR"] 59.58.97.5
_SERVER["SERVER_PORT"] 60080
_SERVER["SERVER_NAME"] pto.3322.org
_SERVER["REDIRECT_STATUS"] 200
_SERVER["HTTP_HOST"] pto.3322.org:60080
_SERVER["HTTP_USER_AGENT"] Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3
_SERVER["HTTP_ACCEPT"] text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
_SERVER["HTTP_ACCEPT_LANGUAGE"] zh-cn,zh;q=0.7,en;q=0.3
_SERVER["HTTP_ACCEPT_ENCODING"] gzip,deflate
_SERVER["HTTP_ACCEPT_CHARSET"] GB2312,utf-8;q=0.7,*;q=0.7
_SERVER["HTTP_KEEP_ALIVE"] 300
_SERVER["HTTP_CONNECTION"] keep-alive
_SERVER["HTTP_COOKIE"] rtime=2; ltime=1255098950804; cnzz_eid=18923336-1254889915-; __utma=154373753.1092153835.1254891523.1255008301.1255098923.5; __utmz=154373753.1254891523.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); cnzz_a1684596=1; vw1684596=%3A33575984%3A36925242%3A; sin1684596=http%3A//pto.3322.org%3A60080/wearelinuxer/; __utmb=154373753.2.10.1255098923; __utmc=154373753
_SERVER["PHP_SELF"] /phgg.php
_SERVER["REQUEST_TIME"] 1255098967

PHP License

This program is free software; you can redistribute it and/or modify it under the terms of the PHP License as published by the PHP Group and included in the distribution in the file: LICENSE

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If you did not receive a copy of the PHP license, or have any questions about PHP licensing, please contact [email protected] .

你可能感兴趣的:(技术笔记)