1.编译:
./configure --prefix=/test/php --with-config-file-path=/test/php/etc --enable-fpm --with-
fpm-user=php-fpm --with-fpm-group=php-fpm --with-oci8=/install_pkg/oracle_tmp --
with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-
iconv-dir --with-zlib-dir --enable-soap --enable-gd-native-ttf --enable-ftp --enable-
mbstring --enable-exif --disable-ipv6 --with-pear --with-curl --enable-bcmath --enable-
sockets --with-gettext --with-apxs2=/test/httpd/bin/apxs
2.安装:
make install
3.配置 dm php(详情可参考 DM7_Program.pdf 手册):
a.将 ext 目录拷贝到 php 目录下:
cp ext/ /test/php/ -r
b.在 httpd.conf 文件中添加
DirectoryIndex default.php default.phtml default.php3 default.html default.htm
AddType application/x-httpd-php .php .phtml .php3 .inc
AddType application/x-httpd-php-source .phps
c.修改 php.ini 配置文件
定位 php.ini 文件:
[root@cc2 other]# locate php.ini
/install_pkg/other/php.ini
/install_pkg/php-5.5.38/php.ini-development
/install_pkg/php-5.5.38/php.ini-production
[root@cc2 other]# cp /install_pkg/php-5.5.38/php.ini-development /test/php/etc/php.ini
修改/test/php/etc/php.ini 文件:
Directory in which the loadable extensions (modules) reside.
http://php.net/extension-dir
extension_dir = "./"
On windows:
extension_dir=/test/php/ext //注意路径为绝对路径
评论