首页 > 代码库 > LAMP平台部署及应用

LAMP平台部署及应用

1、LAMP平台的构成组件

  • Linux操作系统
  • Apache网站服务器
  • MySQL数据库服务器
  • PHP/Perl/Python网页编程语言

2、构建PHP运行环境

  PHP即"Hypertext Preprocessor"(超级文本预处理语言)的缩写,是一种服务端的HTML嵌入式脚本语言

这里构建PHP运行环境,以实现LANP协同架构。apache和mysql、参考前面的文章

  • 准备工作

根据时间安装情况可卸载php、php-cli、php-ldap、php-common、php-mysql等。

需要安装zlib-devel和libxml2-devel包。

[root@www /]# rpm -e php php-cli php-ldap php-common php-mysql --nodeps[root@www /]# yum -y install zlib-devel libxml2-devel
  • 安装扩展工具库

数据库加密工具libmcrypt、mhash、mcrypt等

  • 安装libmcrypt
[root@www /]# tar zxf libmcrypt-2.5.8.tar.gz [root@www /]# cd libmcrypt-2.5.8[root@www libmcrypt-2.5.8]# ./configure [root@www libmcrypt-2.5.8]# make && make install[root@www libmcrypt-2.5.8]# echo $?0
[root@www libmcrypt-2.5.8]# ln -s /usr/local/lib/libmcrypt.* /usr/lib
  • 安装mhash
[root@www /]# tar zxf mhash-0.9.9.9.tar.gz [root@www /]# cd mhash-0.9.9.9[root@www mhash-0.9.9.9]# ./configure [root@www mhash-0.9.9.9]# make && make install[root@www mhash-0.9.9.9]# ln -s /usr/local/lib/libmhash* /usr/lib
  • 安装mcrypt
[root@www /]# tar zxf mcrypt-2.6.8.tar.gz [root@www /]# cd mcrypt-2.6.8[root@www mcrypt-2.6.8]# ./configureconfigure: error: *** libmcrypt was not found[root@www mcrypt-2.6.8]# export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH  //解决configure配置报错[root@www mcrypt-2.6.8]# ./configure [root@www mcrypt-2.6.8]# make && make install

3、编译安装PHP

  •  解压、配置、编译及安装
[root@www /]# tar zxf php-5.3.28.tar.gz [root@www /]# cd php-5.3.28[root@www php-5.3.28]# ./configure --prefix=/usr/local/php5 --with-mcrypt --with-apxs2=/usr/local/httpd/bin/apxs --with-mysql=/usr/local/mysql --with-config-file-path=/usr/local/php5 --enable-mbstring--prefix :指定将php程序安装目录--with-mcrypt:加载数据加密等扩展工具支持--with-apxs2:设置Apache 提供的apxs模块支持程序的文件位置--with-mysql:设置MySQL数据库服务程序的安装位置--with-config-file-path:设置PHP的配置文件php.ini将要存放的位置--enable-mbstring:启用多字节字符串功能,以便中文等代码[root@www php-5.3.28]# echo $?0[root@www php-5.3.28]# make && make install[root@www php-5.3.28]# echo $?0

 

4、设置LAMP组件环境

  • php.ini配置调整
[root@www php-5.3.28]# ls php.ini-development php.ini-development     //开发版样例文件,用于学习、测试[root@www php-5.3.28]# ls php.ini-production php.ini-production      //生产版样例文件,用于实际运营root@www php-5.3.28]# cp php.ini-development /usr/local/php5/php.ini[root@www php-5.3.28]# cd /usr/local/php5/[root@www php5]# vim php.ini default_charset = "utf-8"     //设置默认字符集为utf-8file_uploads = On                //允许通过PHP网页上传文件upload_max_filesize = 2M   //允许上传文件大小限制max_file_uploads = 20       //每个HTTP最多允许请求上传的文件数post_max_size = 8M      //每次通过表单post提交数据的流量限制short_open_tag = On     //允许识别PHP短语法标记,即<?...?>

 

  • 添加ZendGuardLoader优化模块
[root@www /]# tar zxf ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz [root@www /]# cd ZendGuardLoader-php-5.3-linux-glibc23-x86_64/php-5.3.x/[root@www php-5.3.x]# cp ZendGuardLoader.so /usr/local/php5/lib/php修改php.ini配置文件,添加加载及启用ZendGuardLoader.so模块的配置语句。[root@www php-5.3.x]# vim /usr/local/php5/php.ini +1900 //直接到达文本里1900行zend_extension=/usr/local/php5/lib/php/ZendGuardLoader.sozend_loader.enable=1

 

  • httpd.conf配置调整
LoadModule php5_module        modules/libphp5.soAddType application/x-httpd-php .phpDirectoryIndex index.html index.html[root@www /]# /usr/local/httpd/bin/apachectl restart  //重启服务以更新配置LoadModule行应该会在安装php的过程中自动添加,其中"php5_module"表示模块名称;"modules/libphp5.so"表示模块文件位置。而AddType行需要手动添加,DirectoryIndex行在原有基础上修改即可。

 

5、测试LAMP协同工作

  • 测试PHP网页能否正确显示
[root@www /]# vim /usr/local/httpd/htdocs/test1.php<?phpinfo();?>

 

[root@www httpd]# curl 192.168.119.131/test1.php<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><style type="text/css">body {background-color: #ffffff; color: #000000;}body, td, th, h1, h2 {font-family: sans-serif;}pre {margin: 0px; font-family: monospace;}a:link {color: #000099; text-decoration: none; background-color: #ffffff;}a:hover {text-decoration: underline;}table {border-collapse: collapse;}.center {text-align: center;}.center table { margin-left: auto; margin-right: auto; text-align: left;}.center th { text-align: center !important; }td, th { border: 1px solid #000000; font-size: 75%; vertical-align: baseline;}h1 {font-size: 150%;}h2 {font-size: 125%;}.p {text-align: left;}.e {background-color: #ccccff; font-weight: bold; color: #000000;}.h {background-color: #9999cc; font-weight: bold; color: #000000;}.v {background-color: #cccccc; color: #000000;}.vr {background-color: #cccccc; text-align: right; color: #000000;}img {float: right; border: 0px;}hr {width: 600px; background-color: #cccccc; border: 0px; height: 1px; color: #000000;}</style><title>phpinfo()</title><meta name="ROBOTS" content="NOINDEX,NOFOLLOW,NOARCHIVE" /></head><body><div class="center"><table border="0" cellpadding="3" width="600"><tr class="h"><td><a href=http://www.mamicode.com/"http://www.php.net/"><img border="0" src=http://www.mamicode.com/"/test1.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42" alt="PHP Logo" /></a><h1 class="p">PHP Version 5.3.28</h1></td></tr></table><br /><table border="0" cellpadding="3" width="600"><tr><td class="e">System </td><td class="v">Linux www 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 </td></tr><tr><td class="e">Build Date </td><td class="v">Oct  3 2016 07:19:24 </td></tr><tr><td class="e">Configure Command </td><td class="v"> &#039;./configure&#039;  &#039;--prefix=/usr/local/php5&#039; &#039;--with-mcrypt&#039; &#039;--with-apxs2=/usr/local/httpd/bin/apxs&#039; &#039;--with-mysql=/usr/local/mysql&#039; &#039;--with-config-file-path=/usr/local/php5&#039; &#039;--enable-mbstring&#039; </td></tr><tr><td class="e">Server API </td><td class="v">Apache 2.0 Handler </td></tr><tr><td class="e">Virtual Directory Support </td><td class="v">disabled </td></tr><tr><td class="e">Configuration File (php.ini) Path </td><td class="v">/usr/local/php5 </td></tr><tr><td class="e">Loaded Configuration File </td><td class="v">/usr/local/php5/php.ini </td></tr><tr><td class="e">Scan this dir for additional .ini files </td><td class="v">(none) </td></tr><tr><td class="e">Additional .ini files parsed </td><td class="v">(none) </td></tr><tr><td class="e">PHP API </td><td class="v">20090626 </td></tr><tr><td class="e">PHP Extension </td><td class="v">20090626 </td></tr><tr><td class="e">Zend Extension </td><td class="v">220090626 </td></tr><tr><td class="e">Zend Extension Build </td><td class="v">API220090626,NTS </td></tr><tr><td class="e">PHP Extension Build </td><td class="v">API20090626,NTS </td></tr><tr><td class="e">Debug Build </td><td class="v">no </td></tr><tr><td class="e">Thread Safety </td><td class="v">disabled </td></tr><tr><td class="e">Zend Memory Manager </td><td class="v">enabled </td></tr><tr><td class="e">Zend Multibyte Support </td><td class="v">disabled </td></tr><tr><td class="e">IPv6 Support </td><td class="v">enabled </td></tr><tr><td class="e">Registered PHP Streams </td><td class="v">php, file, glob, data, http, ftp, phar   </td></tr><tr><td class="e">Registered Stream Socket Transports </td><td class="v">tcp, udp, unix, udg </td></tr><tr><td class="e">Registered Stream Filters </td><td class="v">convert.iconv.*, mcrypt.*, mdecrypt.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk </td></tr></table><br /><table border="0" cellpadding="3" width="600"><tr class="v"><td><a href=http://www.mamicode.com/"http://www.zend.com/"><img border="0" src=http://www.mamicode.com/"/test1.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42" alt="Zend logo" /></a>This program makes use of the Zend Scripting Language Engine:<br />Zend&nbsp;Engine&nbsp;v2.3.0,&nbsp;Copyright&nbsp;(c)&nbsp;1998-2013&nbsp;Zend&nbsp;Technologies<br />&nbsp;&nbsp;&nbsp;&nbsp;with&nbsp;Zend&nbsp;Guard&nbsp;Loader&nbsp;v3.3,&nbsp;Copyright&nbsp;(c)&nbsp;1998-2010,&nbsp;by&nbsp;Zend&nbsp;Technologies<br /></td></tr></table><br /><hr /><h1><a href=http://www.mamicode.com/"/test1.php?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000">PHP Credits</a></h1><hr /><h1>Configuration</h1><h2><a name="module_apache2handler">apache2handler</a></h2><table border="0" cellpadding="3" width="600"><tr><td class="e">Apache Version </td><td class="v">Apache/2.2.31 (Unix) PHP/5.3.28 </td></tr><tr><td class="e">Apache API Version </td><td class="v">20051115 </td></tr><tr><td class="e">Server Administrator </td><td class="v">you@example.com </td></tr><tr><td class="e">Hostname:Port </td><td class="v">www.httpd.com:0 </td></tr><tr><td class="e">User/Group </td><td class="v">daemon(2)/2 </td></tr><tr><td class="e">Max Requests </td><td class="v">Per Child: 10000 - Keep Alive: on - Max Per Connection: 100 </td></tr><tr><td class="e">Timeouts </td><td class="v">Connection: 300 - Keep-Alive: 5 </td></tr><tr><td class="e">Virtual Server </td><td class="v">No </td></tr><tr><td class="e">Server Root </td><td class="v">/usr/local/httpd </td></tr><tr><td class="e">Loaded Modules </td><td class="v">core mod_authn_file mod_authn_default mod_authz_host mod_authz_groupfile mod_authz_user mod_authz_default mod_auth_basic mod_include mod_filter mod_charset_lite mod_log_config mod_env mod_setenvif mod_version prefork http_core mod_mime mod_status mod_autoindex mod_asis mod_cgi mod_negotiation mod_dir mod_actions mod_userdir mod_alias mod_rewrite mod_so mod_php5 </td></tr></table><br /><table border="0" cellpadding="3" width="600"><tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr><tr><td class="e">engine</td><td class="v">1</td><td class="v">1</td></tr><tr><td class="e">last_modified</td><td class="v">0</td><td class="v">0</td></tr><tr><td class="e">xbithack</td><td class="v">0</td><td class="v">0</td></tr></table><br /><h2>Apache Environment</h2><table border="0" cellpadding="3" width="600"><tr class="h"><th>Variable</th><th>Value</th></tr><tr><td class="e">HTTP_USER_AGENT </td><td class="v">curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 </td></tr><tr><td class="e">HTTP_HOST </td><td class="v">192.168.119.131 </td></tr><tr><td class="e">HTTP_ACCEPT </td><td class="v">*/* </td></tr><tr><td class="e">PATH </td><td class="v">/sbin:/usr/sbin:/bin:/usr/bin </td></tr><tr><td class="e">SERVER_SIGNATURE </td><td class="v"><i>no value</i> </td></tr><tr><td class="e">SERVER_SOFTWARE </td><td class="v">Apache/2.2.31 (Unix) PHP/5.3.28 </td></tr><tr><td class="e">SERVER_NAME </td><td class="v">192.168.119.131 </td></tr><tr><td class="e">SERVER_ADDR </td><td class="v">192.168.119.131 </td></tr><tr><td class="e">SERVER_PORT </td><td class="v">80 </td></tr><tr><td class="e">REMOTE_ADDR </td><td class="v">192.168.119.131 </td></tr><tr><td class="e">DOCUMENT_ROOT </td><td class="v">/usr/local/httpd/htdocs </td></tr><tr><td class="e">SERVER_ADMIN </td><td class="v">you@example.com </td></tr><tr><td class="e">SCRIPT_FILENAME </td><td class="v">/usr/local/httpd/htdocs/test1.php </td></tr><tr><td class="e">REMOTE_PORT </td><td class="v">46641 </td></tr><tr><td class="e">GATEWAY_INTERFACE </td><td class="v">CGI/1.1 </td></tr><tr><td class="e">SERVER_PROTOCOL </td><td class="v">HTTP/1.1 </td></tr><tr><td class="e">REQUEST_METHOD </td><td class="v">GET </td></tr><tr><td class="e">QUERY_STRING </td><td class="v"><i>no value</i> </td></tr><tr><td class="e">REQUEST_URI </td><td class="v">/test1.php </td></tr><tr><td class="e">SCRIPT_NAME </td><td class="v">/test1.php </td></tr></table><br /><h2>HTTP Headers Information</h2><table border="0" cellpadding="3" width="600"><tr class="h"><th colspan="2">HTTP Request Headers</th></tr><tr><td class="e">HTTP Request </td><td class="v">GET /test1.php HTTP/1.1 </td></tr><tr><td class="e">User-Agent </td><td class="v">curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 </td></tr><tr><td class="e">Host </td><td class="v">192.168.119.131 </td></tr><tr><td class="e">Accept </td><td class="v">*/* </td></tr><tr class="h"><th colspan="2">HTTP Response Headers</th></tr><tr><td class="e">X-Powered-By </td><td class="v">PHP/5.3.28 </td></tr><tr><td class="e">Transfer-Encoding </td><td class="v">chunked </td></tr><tr><td class="e">Content-Type </td><td class="v">text/html; charset=utf-8 </td></tr></table><br /><h2><a name="module_Core">Core</a></h2><table border="0" cellpadding="3" width="600"><tr><td class="e">PHP Version </td><td class="v">5.3.28 </td></tr></table><br /><table border="0" cellpadding="3" width="600"><tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr><tr><td class="e">allow_call_time_pass_reference</td><td class="v">Off</td><td class="v">Off</td></tr><tr><td class="e">allow_url_fopen</td><td class="v">On</td><td class="v">On</td></tr><tr><td class="e">allow_url_include</td><td class="v">Off</td><td class="v">Off</td></tr><tr><td class="e">always_populate_raw_post_data</td><td class="v">Off</td><td class="v">Off</td></tr><tr><td class="e">arg_separator.input</td><td class="v">&amp;</td><td class="v">&amp;</td></tr><tr><td class="e">arg_separator.output</td><td class="v">&amp;</td><td class="v">&amp;</td></tr><tr><td class="e">asp_tags</td><td class="v">Off</td><td class="v">Off</td></tr><tr><td class="e">auto_append_file</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">auto_globals_jit</td><td class="v">On</td><td class="v">On</td></tr><tr><td class="e">auto_prepend_file</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">browscap</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">default_charset</td><td class="v">utf-8</td><td class="v">utf-8</td></tr><tr><td class="e">default_mimetype</td><td class="v">text/html</td><td class="v">text/html</td></tr><tr><td class="e">define_syslog_variables</td><td class="v">Off</td><td class="v">Off</td></tr><tr><td class="e">disable_classes</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">disable_functions</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">display_errors</td><td class="v">On</td><td class="v">On</td></tr><tr><td class="e">display_startup_errors</td><td class="v">On</td><td class="v">On</td></tr><tr><td class="e">doc_root</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">docref_ext</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">docref_root</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">enable_dl</td><td class="v">Off</td><td class="v">Off</td></tr><tr><td class="e">error_append_string</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">error_log</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">error_prepend_string</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">error_reporting</td><td class="v">32767</td><td class="v">32767</td></tr><tr><td class="e">exit_on_timeout</td><td class="v">Off</td><td class="v">Off</td></tr><tr><td class="e">expose_php</td><td class="v">On</td><td class="v">On</td></tr><tr><td class="e">extension_dir</td><td class="v">/usr/local/php5/lib/php/extensions/no-debug-non-zts-20090626</td><td class="v">/usr/local/php5/lib/php/extensions/no-debug-non-zts-20090626</td></tr><tr><td class="e">file_uploads</td><td class="v">On</td><td class="v">On</td></tr><tr><td class="e">highlight.bg</td><td class="v"><font style="color: #FFFFFF">#FFFFFF</font></td><td class="v"><font style="color: #FFFFFF">#FFFFFF</font></td></tr><tr><td class="e">highlight.comment</td><td class="v"><font style="color: #FF8000">#FF8000</font></td><td class="v"><font style="color: #FF8000">#FF8000</font></td></tr><tr><td class="e">highlight.default</td><td class="v"><font style="color: #0000BB">#0000BB</font></td><td class="v"><font style="color: #0000BB">#0000BB</font></td></tr><tr><td class="e">highlight.html</td><td class="v"><font style="color: #000000">#000000</font></td><td class="v"><font style="color: #000000">#000000</font></td></tr><tr><td class="e">highlight.keyword</td><td class="v"><font style="color: #007700">#007700</font></td><td class="v"><font style="color: #007700">#007700</font></td></tr><tr><td class="e">highlight.string</td><td class="v"><font style="color: #DD0000">#DD0000</font></td><td class="v"><font style="color: #DD0000">#DD0000</font></td></tr><tr><td class="e">html_errors</td><td class="v">On</td><td class="v">On</td></tr><tr><td class="e">ignore_repeated_errors</td><td class="v">Off</td><td class="v">Off</td></tr><tr><td class="e">ignore_repeated_source</td><td class="v">Off</td><td class="v">Off</td></tr><tr><td class="e">ignore_user_abort</td><td class="v">Off</td><td class="v">Off</td></tr><tr><td class="e">implicit_flush</td><td class="v">Off</td><td class="v">Off</td></tr><tr><td class="e">include_path</td><td class="v">.:/usr/local/php5/lib/php</td><td class="v">.:/usr/local/php5/lib/php</td></tr><tr><td class="e">log_errors</td><td class="v">On</td><td class="v">On</td></tr><tr><td class="e">log_errors_max_len</td><td class="v">1024</td><td class="v">1024</td></tr><tr><td class="e">magic_quotes_gpc</td><td class="v">Off</td><td class="v">Off</td></tr><tr><td class="e">magic_quotes_runtime</td><td class="v">Off</td><td class="v">Off</td></tr><tr><td class="e">magic_quotes_sybase</td><td class="v">Off</td><td class="v">Off</td></tr><tr><td class="e">mail.add_x_header</td><td class="v">On</td><td class="v">On</td></tr><tr><td class="e">mail.force_extra_parameters</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">mail.log</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">max_execution_time</td><td class="v">30</td><td class="v">30</td></tr><tr><td class="e">max_file_uploads</td><td class="v">20</td><td class="v">20</td></tr><tr><td class="e">max_input_nesting_level</td><td class="v">64</td><td class="v">64</td></tr><tr><td class="e">max_input_time</td><td class="v">60</td><td class="v">60</td></tr><tr><td class="e">max_input_vars</td><td class="v">1000</td><td class="v">1000</td></tr><tr><td class="e">memory_limit</td><td class="v">128M</td><td class="v">128M</td></tr><tr><td class="e">open_basedir</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">output_buffering</td><td class="v">4096</td><td class="v">4096</td></tr><tr><td class="e">output_handler</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">post_max_size</td><td class="v">8M</td><td class="v">8M</td></tr><tr><td class="e">precision</td><td class="v">14</td><td class="v">14</td></tr><tr><td class="e">realpath_cache_size</td><td class="v">16K</td><td class="v">16K</td></tr><tr><td class="e">realpath_cache_ttl</td><td class="v">120</td><td class="v">120</td></tr><tr><td class="e">register_argc_argv</td><td class="v">Off</td><td class="v">Off</td></tr><tr><td class="e">register_globals</td><td class="v">Off</td><td class="v">Off</td></tr><tr><td class="e">register_long_arrays</td><td class="v">Off</td><td class="v">Off</td></tr><tr><td class="e">report_memleaks</td><td class="v">On</td><td class="v">On</td></tr><tr><td class="e">report_zend_debug</td><td class="v">On</td><td class="v">On</td></tr><tr><td class="e">request_order</td><td class="v">GP</td><td class="v">GP</td></tr><tr><td class="e">safe_mode</td><td class="v">Off</td><td class="v">Off</td></tr><tr><td class="e">safe_mode_exec_dir</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">safe_mode_gid</td><td class="v">Off</td><td class="v">Off</td></tr><tr><td class="e">safe_mode_include_dir</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">sendmail_from</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">sendmail_path</td><td class="v">/usr/sbin/sendmail&nbsp;-t&nbsp;-i&nbsp;</td><td class="v">/usr/sbin/sendmail&nbsp;-t&nbsp;-i&nbsp;</td></tr><tr><td class="e">serialize_precision</td><td class="v">17</td><td class="v">17</td></tr><tr><td class="e">short_open_tag</td><td class="v">On</td><td class="v">On</td></tr><tr><td class="e">SMTP</td><td class="v">localhost</td><td class="v">localhost</td></tr><tr><td class="e">smtp_port</td><td class="v">25</td><td class="v">25</td></tr><tr><td class="e">sql.safe_mode</td><td class="v">Off</td><td class="v">Off</td></tr><tr><td class="e">track_errors</td><td class="v">On</td><td class="v">On</td></tr><tr><td class="e">unserialize_callback_func</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">upload_max_filesize</td><td class="v">2M</td><td class="v">2M</td></tr><tr><td class="e">upload_tmp_dir</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">user_dir</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">user_ini.cache_ttl</td><td class="v">300</td><td class="v">300</td></tr><tr><td class="e">user_ini.filename</td><td class="v">.user.ini</td><td class="v">.user.ini</td></tr><tr><td class="e">variables_order</td><td class="v">GPCS</td><td class="v">GPCS</td></tr><tr><td class="e">xmlrpc_error_number</td><td class="v">0</td><td class="v">0</td></tr><tr><td class="e">xmlrpc_errors</td><td class="v">Off</td><td class="v">Off</td></tr><tr><td class="e">y2k_compliance</td><td class="v">On</td><td class="v">On</td></tr><tr><td class="e">zend.enable_gc</td><td class="v">On</td><td class="v">On</td></tr></table><br /><h2><a name="module_ctype">ctype</a></h2><table border="0" cellpadding="3" width="600"><tr><td class="e">ctype functions </td><td class="v">enabled </td></tr></table><br /><h2><a name="module_date">date</a></h2><table border="0" cellpadding="3" width="600"><tr><td class="e">date/time support </td><td class="v">enabled </td></tr><tr><td class="e">&quot;Olson&quot; Timezone Database Version </td><td class="v">2013.3 </td></tr><tr><td class="e">Timezone Database </td><td class="v">internal </td></tr><br /><b>Warning</b>:  phpinfo() [<a href=http://www.mamicode.com/function.phpinfo>function.phpinfo</a>]: It is not safe to rely on the systems 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 <b>/usr/local/httpd/htdocs/test1.php</b> on line <b>2</b><br /><tr><td class="e">Default timezone </td><td class="v">Asia/Chongqing </td></tr></table><br /><table border="0" cellpadding="3" width="600"><tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr><tr><td class="e">date.default_latitude</td><td class="v">31.7667</td><td class="v">31.7667</td></tr><tr><td class="e">date.default_longitude</td><td class="v">35.2333</td><td class="v">35.2333</td></tr><tr><td class="e">date.sunrise_zenith</td><td class="v">90.583333</td><td class="v">90.583333</td></tr><tr><td class="e">date.sunset_zenith</td><td class="v">90.583333</td><td class="v">90.583333</td></tr><tr><td class="e">date.timezone</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr></table><br /><h2><a name="module_dom">dom</a></h2><table border="0" cellpadding="3" width="600"><tr><td class="e">DOM/XML </td><td class="v">enabled </td></tr><tr><td class="e">DOM/XML API Version </td><td class="v">20031129 </td></tr><tr><td class="e">libxml Version </td><td class="v">2.7.6 </td></tr><tr><td class="e">HTML Support </td><td class="v">enabled </td></tr><tr><td class="e">XPath Support </td><td class="v">enabled </td></tr><tr><td class="e">XPointer Support </td><td class="v">enabled </td></tr><tr><td class="e">Schema Support </td><td class="v">enabled </td></tr><tr><td class="e">RelaxNG Support </td><td class="v">enabled </td></tr></table><br /><h2><a name="module_ereg">ereg</a></h2><table border="0" cellpadding="3" width="600"><tr><td class="e">Regex Library </td><td class="v">Bundled library enabled </td></tr></table><br /><h2><a name="module_fileinfo">fileinfo</a></h2><table border="0" cellpadding="3" width="600"><tr><td class="e">fileinfo support </td><td class="v">enabled </td></tr><tr><td class="e">version </td><td class="v">1.0.5-dev </td></tr></table><br /><h2><a name="module_filter">filter</a></h2><table border="0" cellpadding="3" width="600"><tr><td class="e">Input Validation and Filtering </td><td class="v">enabled </td></tr><tr><td class="e">Revision </td><td class="v">$Id: 209a1c3c98c04a5474846e7bbe8ca72054ccfd4f $ </td></tr></table><br /><table border="0" cellpadding="3" width="600"><tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr><tr><td class="e">filter.default</td><td class="v">unsafe_raw</td><td class="v">unsafe_raw</td></tr><tr><td class="e">filter.default_flags</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr></table><br /><h2><a name="module_hash">hash</a></h2><table border="0" cellpadding="3" width="600"><tr><td class="e">hash support </td><td class="v">enabled </td></tr><tr><td class="e">Hashing Engines </td><td class="v">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  </td></tr></table><br /><h2><a name="module_iconv">iconv</a></h2><table border="0" cellpadding="3" width="600"><tr><td class="e">iconv support </td><td class="v">enabled </td></tr><tr><td class="e">iconv implementation </td><td class="v">glibc </td></tr><tr><td class="e">iconv library version </td><td class="v">2.12 </td></tr></table><br /><table border="0" cellpadding="3" width="600"><tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr><tr><td class="e">iconv.input_encoding</td><td class="v">ISO-8859-1</td><td class="v">ISO-8859-1</td></tr><tr><td class="e">iconv.internal_encoding</td><td class="v">ISO-8859-1</td><td class="v">ISO-8859-1</td></tr><tr><td class="e">iconv.output_encoding</td><td class="v">ISO-8859-1</td><td class="v">ISO-8859-1</td></tr></table><br /><h2><a name="module_json">json</a></h2><table border="0" cellpadding="3" width="600"><tr><td class="e">json support </td><td class="v">enabled </td></tr><tr><td class="e">json version </td><td class="v">1.2.1 </td></tr></table><br /><h2><a name="module_libxml">libxml</a></h2><table border="0" cellpadding="3" width="600"><tr><td class="e">libXML support </td><td class="v">active </td></tr><tr><td class="e">libXML Compiled Version </td><td class="v">2.7.6 </td></tr><tr><td class="e">libXML Loaded Version </td><td class="v">20706 </td></tr><tr><td class="e">libXML streams </td><td class="v">enabled </td></tr></table><br /><h2><a name="module_mbstring">mbstring</a></h2><table border="0" cellpadding="3" width="600"><tr><td class="e">Multibyte Support </td><td class="v">enabled </td></tr><tr><td class="e">Multibyte string engine </td><td class="v">libmbfl </td></tr><tr><td class="e">HTTP input encoding translation </td><td class="v">disabled </td></tr></table><br /><table border="0" cellpadding="3" width="600"><tr class="h"><th>mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.</th></tr></table><br /><table border="0" cellpadding="3" width="600"><tr><td class="e">Multibyte (japanese) regex support </td><td class="v">enabled </td></tr><tr><td class="e">Multibyte regex (oniguruma) backtrack check </td><td class="v">On </td></tr><tr><td class="e">Multibyte regex (oniguruma) version </td><td class="v">4.7.1 </td></tr></table><br /><table border="0" cellpadding="3" width="600"><tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr><tr><td class="e">mbstring.detect_order</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">mbstring.encoding_translation</td><td class="v">Off</td><td class="v">Off</td></tr><tr><td class="e">mbstring.func_overload</td><td class="v">0</td><td class="v">0</td></tr><tr><td class="e">mbstring.http_input</td><td class="v">pass</td><td class="v">pass</td></tr><tr><td class="e">mbstring.http_output</td><td class="v">pass</td><td class="v">pass</td></tr><tr><td class="e">mbstring.http_output_conv_mimetypes</td><td class="v">^(text/|application/xhtml\+xml)</td><td class="v">^(text/|application/xhtml\+xml)</td></tr><tr><td class="e">mbstring.internal_encoding</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">mbstring.language</td><td class="v">neutral</td><td class="v">neutral</td></tr><tr><td class="e">mbstring.strict_detection</td><td class="v">Off</td><td class="v">Off</td></tr><tr><td class="e">mbstring.substitute_character</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr></table><br /><h2><a name="module_mcrypt">mcrypt</a></h2><table border="0" cellpadding="3" width="600"><tr class="h"><th>mcrypt support</th><th>enabled</th></tr><tr class="h"><th>mcrypt_filter support</th><th>enabled</th></tr><tr><td class="e">Version </td><td class="v">2.5.8 </td></tr><tr><td class="e">Api No </td><td class="v">20021217 </td></tr><tr><td class="e">Supported ciphers </td><td class="v">cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes  </td></tr><tr><td class="e">Supported modes </td><td class="v">cbc cfb ctr ecb ncfb nofb ofb stream  </td></tr></table><br /><table border="0" cellpadding="3" width="600"><tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr><tr><td class="e">mcrypt.algorithms_dir</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">mcrypt.modes_dir</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr></table><br /><h2><a name="module_mysql">mysql</a></h2><table border="0" cellpadding="3" width="600"><tr class="h"><th>MySQL Support</th><th>enabled</th></tr><tr><td class="e">Active Persistent Links </td><td class="v">0 </td></tr><tr><td class="e">Active Links </td><td class="v">0 </td></tr><tr><td class="e">Client API version </td><td class="v">5.5.22 </td></tr><tr><td class="e">MYSQL_MODULE_TYPE </td><td class="v">external </td></tr><tr><td class="e">MYSQL_SOCKET </td><td class="v">/tmp/mysql.sock </td></tr><tr><td class="e">MYSQL_INCLUDE </td><td class="v">-I/usr/local/mysql/include </td></tr><tr><td class="e">MYSQL_LIBS </td><td class="v">-L/usr/local/mysql/lib -lmysqlclient  </td></tr></table><br /><table border="0" cellpadding="3" width="600"><tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr><tr><td class="e">mysql.allow_local_infile</td><td class="v">On</td><td class="v">On</td></tr><tr><td class="e">mysql.allow_persistent</td><td class="v">On</td><td class="v">On</td></tr><tr><td class="e">mysql.connect_timeout</td><td class="v">60</td><td class="v">60</td></tr><tr><td class="e">mysql.default_host</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">mysql.default_password</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">mysql.default_port</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">mysql.default_socket</td><td class="v">/tmp/mysql.sock</td><td class="v">/tmp/mysql.sock</td></tr><tr><td class="e">mysql.default_user</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">mysql.max_links</td><td class="v">Unlimited</td><td class="v">Unlimited</td></tr><tr><td class="e">mysql.max_persistent</td><td class="v">Unlimited</td><td class="v">Unlimited</td></tr><tr><td class="e">mysql.trace_mode</td><td class="v">Off</td><td class="v">Off</td></tr></table><br /><h2><a name="module_pcre">pcre</a></h2><table border="0" cellpadding="3" width="600"><tr><td class="e">PCRE (Perl Compatible Regular Expressions) Support </td><td class="v">enabled </td></tr><tr><td class="e">PCRE Library Version </td><td class="v">8.32 2012-11-30 </td></tr></table><br /><table border="0" cellpadding="3" width="600"><tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr><tr><td class="e">pcre.backtrack_limit</td><td class="v">1000000</td><td class="v">1000000</td></tr><tr><td class="e">pcre.recursion_limit</td><td class="v">100000</td><td class="v">100000</td></tr></table><br /><h2><a name="module_PDO">PDO</a></h2><table border="0" cellpadding="3" width="600"><tr class="h"><th>PDO support</th><th>enabled</th></tr><tr><td class="e">PDO drivers </td><td class="v">sqlite, sqlite2 </td></tr></table><br /><h2><a name="module_pdo_sqlite">pdo_sqlite</a></h2><table border="0" cellpadding="3" width="600"><tr class="h"><th>PDO Driver for SQLite 3.x</th><th>enabled</th></tr><tr><td class="e">SQLite Library </td><td class="v">3.7.7.1 </td></tr></table><br /><h2><a name="module_Phar">Phar</a></h2><table border="0" cellpadding="3" width="600"><tr class="h"><th>Phar: PHP Archive support</th><th>enabled</th></tr><tr><td class="e">Phar EXT version </td><td class="v">2.0.1 </td></tr><tr><td class="e">Phar API version </td><td class="v">1.1.1 </td></tr><tr><td class="e">SVN revision </td><td class="v">$Id: 21d763042eb5769ae0a09dc1118df2b5aae6fb33 $ </td></tr><tr><td class="e">Phar-based phar archives </td><td class="v">enabled </td></tr><tr><td class="e">Tar-based phar archives </td><td class="v">enabled </td></tr><tr><td class="e">ZIP-based phar archives </td><td class="v">enabled </td></tr><tr><td class="e">gzip compression </td><td class="v">disabled (install ext/zlib) </td></tr><tr><td class="e">bzip2 compression </td><td class="v">disabled (install pecl/bz2) </td></tr><tr><td class="e">OpenSSL support </td><td class="v">disabled (install ext/openssl) </td></tr></table><br /><table border="0" cellpadding="3" width="600"><tr class="v"><td>Phar based on pear/PHP_Archive, original concept by Davey Shafik.<br />Phar fully realized by Gregory Beaver and Marcus Boerger.<br />Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle.</td></tr></table><br /><table border="0" cellpadding="3" width="600"><tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr><tr><td class="e">phar.cache_list</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">phar.readonly</td><td class="v">On</td><td class="v">On</td></tr><tr><td class="e">phar.require_hash</td><td class="v">On</td><td class="v">On</td></tr></table><br /><h2><a name="module_posix">posix</a></h2><table border="0" cellpadding="3" width="600"><tr><td class="e">Revision </td><td class="v">$Id: 5a2da3946b96c5afbf3aff8db8a8681f8bedee85 $ </td></tr></table><br /><h2><a name="module_Reflection">Reflection</a></h2><table border="0" cellpadding="3" width="600"><tr class="h"><th>Reflection</th><th>enabled</th></tr><tr><td class="e">Version </td><td class="v">$Id: 4af6c4c676864b1c0bfa693845af0688645c37cf $ </td></tr></table><br /><h2><a name="module_session">session</a></h2><table border="0" cellpadding="3" width="600"><tr><td class="e">Session Support </td><td class="v">enabled </td></tr><tr><td class="e">Registered save handlers </td><td class="v">files user sqlite  </td></tr><tr><td class="e">Registered serializer handlers </td><td class="v">php php_binary  </td></tr></table><br /><table border="0" cellpadding="3" width="600"><tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr><tr><td class="e">session.auto_start</td><td class="v">Off</td><td class="v">Off</td></tr><tr><td class="e">session.bug_compat_42</td><td class="v">On</td><td class="v">On</td></tr><tr><td class="e">session.bug_compat_warn</td><td class="v">On</td><td class="v">On</td></tr><tr><td class="e">session.cache_expire</td><td class="v">180</td><td class="v">180</td></tr><tr><td class="e">session.cache_limiter</td><td class="v">nocache</td><td class="v">nocache</td></tr><tr><td class="e">session.cookie_domain</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">session.cookie_httponly</td><td class="v">Off</td><td class="v">Off</td></tr><tr><td class="e">session.cookie_lifetime</td><td class="v">0</td><td class="v">0</td></tr><tr><td class="e">session.cookie_path</td><td class="v">/</td><td class="v">/</td></tr><tr><td class="e">session.cookie_secure</td><td class="v">Off</td><td class="v">Off</td></tr><tr><td class="e">session.entropy_file</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">session.entropy_length</td><td class="v">0</td><td class="v">0</td></tr><tr><td class="e">session.gc_divisor</td><td class="v">1000</td><td class="v">1000</td></tr><tr><td class="e">session.gc_maxlifetime</td><td class="v">1440</td><td class="v">1440</td></tr><tr><td class="e">session.gc_probability</td><td class="v">1</td><td class="v">1</td></tr><tr><td class="e">session.hash_bits_per_character</td><td class="v">5</td><td class="v">5</td></tr><tr><td class="e">session.hash_function</td><td class="v">0</td><td class="v">0</td></tr><tr><td class="e">session.name</td><td class="v">PHPSESSID</td><td class="v">PHPSESSID</td></tr><tr><td class="e">session.referer_check</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">session.save_handler</td><td class="v">files</td><td class="v">files</td></tr><tr><td class="e">session.save_path</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">session.serialize_handler</td><td class="v">php</td><td class="v">php</td></tr><tr><td class="e">session.use_cookies</td><td class="v">On</td><td class="v">On</td></tr><tr><td class="e">session.use_only_cookies</td><td class="v">On</td><td class="v">On</td></tr><tr><td class="e">session.use_trans_sid</td><td class="v">0</td><td class="v">0</td></tr></table><br /><h2><a name="module_SimpleXML">SimpleXML</a></h2><table border="0" cellpadding="3" width="600"><tr class="h"><th>Simplexml support</th><th>enabled</th></tr><tr><td class="e">Revision </td><td class="v">$Id: 02ab7893b36d51e9c59da77d7e287eb3b35e1e32 $ </td></tr><tr><td class="e">Schema support </td><td class="v">enabled </td></tr></table><br /><h2><a name="module_SPL">SPL</a></h2><table border="0" cellpadding="3" width="600"><tr class="h"><th>SPL support</th><th>enabled</th></tr><tr><td class="e">Interfaces </td><td class="v">Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject </td></tr><tr><td class="e">Classes </td><td class="v">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 </td></tr></table><br /><h2><a name="module_SQLite">SQLite</a></h2><table border="0" cellpadding="3" width="600"><tr class="h"><th>SQLite support</th><th>enabled</th></tr><tr><td class="e">PECL Module version </td><td class="v">2.0-dev $Id$ </td></tr><tr><td class="e">SQLite Library </td><td class="v">2.8.17 </td></tr><tr><td class="e">SQLite Encoding </td><td class="v">iso8859 </td></tr></table><br /><table border="0" cellpadding="3" width="600"><tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr><tr><td class="e">sqlite.assoc_case</td><td class="v">0</td><td class="v">0</td></tr></table><br /><h2><a name="module_sqlite3">sqlite3</a></h2><table border="0" cellpadding="3" width="600"><tr class="h"><th>SQLite3 support</th><th>enabled</th></tr><tr><td class="e">SQLite3 module version </td><td class="v">0.7-dev </td></tr><tr><td class="e">SQLite Library </td><td class="v">3.7.7.1 </td></tr></table><br /><table border="0" cellpadding="3" width="600"><tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr><tr><td class="e">sqlite3.extension_dir</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr></table><br /><h2><a name="module_standard">standard</a></h2><table border="0" cellpadding="3" width="600"><tr><td class="e">Dynamic Library Support </td><td class="v">enabled </td></tr><tr><td class="e">Path to sendmail </td><td class="v">/usr/sbin/sendmail -t -i  </td></tr></table><br /><table border="0" cellpadding="3" width="600"><tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr><tr><td class="e">assert.active</td><td class="v">1</td><td class="v">1</td></tr><tr><td class="e">assert.bail</td><td class="v">0</td><td class="v">0</td></tr><tr><td class="e">assert.callback</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">assert.quiet_eval</td><td class="v">0</td><td class="v">0</td></tr><tr><td class="e">assert.warning</td><td class="v">1</td><td class="v">1</td></tr><tr><td class="e">auto_detect_line_endings</td><td class="v">0</td><td class="v">0</td></tr><tr><td class="e">default_socket_timeout</td><td class="v">60</td><td class="v">60</td></tr><tr><td class="e">from</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr><tr><td class="e">safe_mode_allowed_env_vars</td><td class="v">PHP_</td><td class="v">PHP_</td></tr><tr><td class="e">safe_mode_protected_env_vars</td><td class="v">LD_LIBRARY_PATH</td><td class="v">LD_LIBRARY_PATH</td></tr><tr><td class="e">url_rewriter.tags</td><td class="v">a=href,area=href,frame=src,input=src,form=fakeentry</td><td class="v">a=href,area=href,frame=src,input=src,form=fakeentry</td></tr><tr><td class="e">user_agent</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr></table><br /><h2><a name="module_tokenizer">tokenizer</a></h2><table border="0" cellpadding="3" width="600"><tr><td class="e">Tokenizer Support </td><td class="v">enabled </td></tr></table><br /><h2><a name="module_xml">xml</a></h2><table border="0" cellpadding="3" width="600"><tr><td class="e">XML Support </td><td class="v">active </td></tr><tr><td class="e">XML Namespace Support </td><td class="v">active </td></tr><tr><td class="e">libxml2 Version </td><td class="v">2.7.6 </td></tr></table><br /><h2><a name="module_xmlreader">xmlreader</a></h2><table border="0" cellpadding="3" width="600"><tr><td class="e">XMLReader </td><td class="v">enabled </td></tr></table><br /><h2><a name="module_xmlwriter">xmlwriter</a></h2><table border="0" cellpadding="3" width="600"><tr><td class="e">XMLWriter </td><td class="v">enabled </td></tr></table><br /><h2><a name="module_Zend Guard Loader">Zend Guard Loader</a></h2><table border="0" cellpadding="3" width="600"><tr><td class="e">Zend Guard Loader </td><td class="v">enabled </td></tr><tr><td class="e">License Path </td><td class="v"><i>no value</i> </td></tr><tr><td class="e">Obfuscation level </td><td class="v">3 </td></tr></table><br /><h2>Additional Modules</h2><table border="0" cellpadding="3" width="600"><tr class="h"><th>Module Name</th></tr></table><br /><h2>Environment</h2><table border="0" cellpadding="3" width="600"><tr class="h"><th>Variable</th><th>Value</th></tr><tr><td class="e">TERM </td><td class="v">linux </td></tr><tr><td class="e">LD_LIBRARY_PATH </td><td class="v">/usr/local/httpd/lib </td></tr><tr><td class="e">PATH </td><td class="v">/sbin:/usr/sbin:/bin:/usr/bin </td></tr><tr><td class="e">RUNLEVEL </td><td class="v">3 </td></tr><tr><td class="e">runlevel </td><td class="v">3 </td></tr><tr><td class="e">PWD </td><td class="v">/ </td></tr><tr><td class="e">LANGSH_SOURCED </td><td class="v">1 </td></tr><tr><td class="e">LANG </td><td class="v">en_US.UTF-8 </td></tr><tr><td class="e">PREVLEVEL </td><td class="v">N </td></tr><tr><td class="e">previous </td><td class="v">N </td></tr><tr><td class="e">CONSOLETYPE </td><td class="v">vt </td></tr><tr><td class="e">SHLVL </td><td class="v">2 </td></tr><tr><td class="e">UPSTART_INSTANCE </td><td class="v"><i>no value</i> </td></tr><tr><td class="e">UPSTART_EVENTS </td><td class="v">runlevel </td></tr><tr><td class="e">UPSTART_JOB </td><td class="v">rc </td></tr><tr><td class="e">_ </td><td class="v">/usr/local/httpd/bin/httpd </td></tr></table><br /><h2>PHP Variables</h2><table border="0" cellpadding="3" width="600"><tr class="h"><th>Variable</th><th>Value</th></tr><tr><td class="e">_SERVER["HTTP_USER_AGENT"]</td><td class="v">curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2</td></tr><tr><td class="e">_SERVER["HTTP_HOST"]</td><td class="v">192.168.119.131</td></tr><tr><td class="e">_SERVER["HTTP_ACCEPT"]</td><td class="v">*/*</td></tr><tr><td class="e">_SERVER["PATH"]</td><td class="v">/sbin:/usr/sbin:/bin:/usr/bin</td></tr><tr><td class="e">_SERVER["SERVER_SIGNATURE"]</td><td class="v"><i>no value</i></td></tr><tr><td class="e">_SERVER["SERVER_SOFTWARE"]</td><td class="v">Apache/2.2.31 (Unix) PHP/5.3.28</td></tr><tr><td class="e">_SERVER["SERVER_NAME"]</td><td class="v">192.168.119.131</td></tr><tr><td class="e">_SERVER["SERVER_ADDR"]</td><td class="v">192.168.119.131</td></tr><tr><td class="e">_SERVER["SERVER_PORT"]</td><td class="v">80</td></tr><tr><td class="e">_SERVER["REMOTE_ADDR"]</td><td class="v">192.168.119.131</td></tr><tr><td class="e">_SERVER["DOCUMENT_ROOT"]</td><td class="v">/usr/local/httpd/htdocs</td></tr><tr><td class="e">_SERVER["SERVER_ADMIN"]</td><td class="v">you@example.com</td></tr><tr><td class="e">_SERVER["SCRIPT_FILENAME"]</td><td class="v">/usr/local/httpd/htdocs/test1.php</td></tr><tr><td class="e">_SERVER["REMOTE_PORT"]</td><td class="v">46641</td></tr><tr><td class="e">_SERVER["GATEWAY_INTERFACE"]</td><td class="v">CGI/1.1</td></tr><tr><td class="e">_SERVER["SERVER_PROTOCOL"]</td><td class="v">HTTP/1.1</td></tr><tr><td class="e">_SERVER["REQUEST_METHOD"]</td><td class="v">GET</td></tr><tr><td class="e">_SERVER["QUERY_STRING"]</td><td class="v"><i>no value</i></td></tr><tr><td class="e">_SERVER["REQUEST_URI"]</td><td class="v">/test1.php</td></tr><tr><td class="e">_SERVER["SCRIPT_NAME"]</td><td class="v">/test1.php</td></tr><tr><td class="e">_SERVER["PHP_SELF"]</td><td class="v">/test1.php</td></tr><tr><td class="e">_SERVER["REQUEST_TIME"]</td><td class="v">1475452960</td></tr></table><br /><h2>PHP License</h2><table border="0" cellpadding="3" width="600"><tr class="v"><td><p>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</p><p>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.</p><p>If you did not receive a copy of the PHP license, or have any questions about PHP licensing, please contact license@php.net.</p></td></tr></table><br /></div></body></html>

 

或通过浏览器访问测试页

技术分享

  • 测试PHP网页能否访问MySQL数据库
[root@www httpd]# vim /usr/local/httpd/htdocs/test2.php<?php$link=mysql_connect(localhost,root);    //连接MySQL数据库、这里没有密码if($link) echo "数据库连接成功!!!";mysql_close();?>[root@www httpd]# curl 192.168.119.131/test2.php数据库连接成功!!!

 

     LAMP搭建完成

5、LAMP架构应用案例

  • 部署phpMyAdmin系统

phpMyAdmin是一个使用php语言编写,用来管理MysQL数据库的web应用系统。

phpMyAdmin的源码包下载地址 官方站点http://www.phpmyadmin.net

  • 解包并复制到网站目录
[root@www /]# tar zxf phpMyAdmin-4.2.5-all-languages.tar.gz [root@www /]# mv phpMyAdmin-4.2.5-all-languages /usr/local/httpd/htdocs/phpMyAdmin

 

  • 建立配置文件config.inc.php

默认提供的眼里配置文件为config.sample.inc.php

[root@www /]# cd /usr/local/httpd/htdocs/phpMyAdmin/[root@www phpMyAdmin]# cp config.sample.inc.php config.inc.php

 

  • 访问phpMyAdmin的web管理界面

如果能看到phpMyAdmin系统的登陆界面、则表示部署成功,使用mysql数据库的用户(不能是密码为空的用户)

技术分享

 

LAMP平台部署及应用