sqliteCentOS PHP-5.4.8 编译安装之初体验

Loaded Configuration File:         /data/application/php/lib/php.ini

/etc/php.d/sqlite3.ini,

[root@Test php-5.4.8]# ./configure –help |grep scan

/etc/php.d/zip.ini

drwxr-xr-x 3 root root 4096 Mar  8 17:59 lib

Configuration File (php.ini) Path: /data/application/php/lib

Configuration File (php.ini) Path: /data/application/php/lib

[PHP Modules]

session

Additional .ini files parsed:      (none)

[root@Testphp php]# cd /data/php-5.4.8/ext/

xmlwriter

total 20

libxml

pdo_sqlite

[root@Test php-5.4.8]# cd php-5.4.8

pcre

json

pcre

Additional .ini files parsed:      (none)

ctype

那儿再次翻开php 记载的模块,可以见到新安装的pcntl已经加载进去

SPL

extension=pcntl.so

充实两行配置:

/etc/php.d/dom.ini,

[root@Testphp php]# cp -a
/data/php-5.4.8/php.ini-production /data/application/php/lib/php.ini

PDO

那时候得以将/data/php-5.4.8/php.ini-production 文件copy
到那么些目录中,即可加载此布局文件

Scan for additional .ini files in: (none)

翻看安装后加载的安顿文件音讯

/etc/php.d/xmlwriter.ini,

Loaded Configuration File:         (none)

/etc/php.d/json.ini,

[root@Testphp php]# ll

[root@Testphp php]# php -m

standard

/data/application/php/lib/php/extensions/no-debug-non-zts-20100525/pcntl.so

hash

tokenizer

Loaded Configuration File:         /data/application/php/lib/php.ini

下边的是其它一台机械 选择 YUM安装情势的默许配置信息,可以视作相比较学习

filter

SimpleXML

Scan for additional .ini files in: (none)

session

extension_dir =
“/data/application/php/lib/php/extensions/no-debug-non-zts-20100525/”
(假如存在则仅将pcntl.so 放到该目录中去即可)

[root@Test php-5.4.8]# ./configure
–prefix=/data/application/php && make && make install

[root@Test2 ~]# php –ini

[root@Test data] wget
http://museum.php.net/php5/php-5.4.8.tar.gz

drwxr-xr-x 2 root root 4096 Mar  8 17:27 bin

/etc/php.d/mbstring.ini,

  1. 下载5.4.8 版本

[root@Testphp php]# vim
/data/application/php/lib/php.ini

drwxr-xr-x 3 root root 4096 Mar  8 17:27 include

[root@Test php-5.4.8]# php –ini

[PHP Modules]

posix

/etc/php.d/curl.ini,

[Zend Modules]

iconv

xmlreader

posix

/etc/php.d/xmlrpc.ini,

/etc/php.d/odbc.ini,

sqlite3

fileinfo

date

/etc/php.d/xsl.ini,

Core

[root@Testphp php]# php –ini

此措施默许安装后的布署文件路径为:

drwxr-xr-x 2 root root 4096 Mar  8 17:46 etc

Configuration File (php.ini) Path: /data/application/php/lib

/etc/php.d/pdo_odbc.ini,

其余模块则足以参照此方案举行,越发表明,php.ini默许不知道include *.ini

filter

[root@Testphp ext]#  cd pcntl

tokenizer

PDO

/etc/php.d/fileinfo.ini,

json

/etc/php.d/xmlreader.ini,

  1. 解压

/etc/php.d/mysqli.ini,

Phar

可以看到有诸多的增添,以pcntl(php 多进度管理模块) 为例:

可以看出默许php.ini 是读取/data/application/php/lib目录中的文件

编辑/data/application/php/lib/php.ini

drwxr-xr-x 3 root root 4096 Mar  8 17:27 php

Additional .ini files parsed:      (none)

iconv

/etc/php.d/wddx.ini,

Scan for additional .ini files in: (none)

hash

SimpleXML

  1. 编译安装

[root@Testphp php]# php -m

/etc/php.d/mysql.ini,

[root@Testphp php]# 
/data/application/php/bin/phpize

Phar

Additional .ini files parsed:      /etc/php.d/bcmath.ini,

此时会扭转一个pcntl.so文件,存放路径为:

[Zend Modules]

xml

date

Reflection

Loaded Configuration File:         /etc/php.ini

Reflection

ereg

pcntl

xmlwriter

xmlreader

ctype

可以将额外的安插文件放置到此目录下,若是未指定那不加载

Configuration File (php.ini) Path: /etc

pdo_sqlite

dom

/etc/php.d/phar.ini,

/etc/php.d/pdo_sqlite.ini,

sqlite3

/etc/php.d/pdo.ini,

/etc/php.d/imap.ini,

/etc/php.d/pdo_mysql.ini,

/etc/php.d/mcrypt.ini,

Core

[root@Test php-5.4.8]# cd /data/application/php/

xml

Scan for additional .ini files in: /etc/php.d

/etc/php.d/ldap.ini,

fileinfo

standard

/etc/php.d/gd.ini,

libxml

SPL

这时即使想安装一个未加载的模块,那可以依据一出手续进行

  –with-config-file-scan-dir=PATH

ereg

dom

[root@Test php-5.4.8]# tar xzf php-5.4.8.tar.gz

                          Set the path where to scan for configuration
files

[root@Testphp php]# php –ini

[root@Testphp php]# ./configure
–with-php-config=/data/application/php/bin/php-config && make && make
install

这时候得以看来配置文件已经加载正常,此时查阅一下php 默认加载的模块

网站地图xml地图