sbin/php-fpm -y etc/php-fpm.conf -c etc/php.ini
kill 10856
./bin/php -m
./configure \
--prefix=/usr/local/php2 \
--enable-fpm \
--with-config-file-path=/usr/local/php2/etc \
--with-libxml-dir \
--with-gd \
--with-jpeg-dir \
--with-png-dir \
--with-freetype-dir \
--with-iconv-dir \
--with-zlib-dir \
--with-bz2 \
--with-openssl \
--with-mcrypt \
--enable-soap \
--enable-gd-native-ttf \
--enable-mbstring \
--enable-sockets \
--enable-exif \
--disable-ipv6
make
make install
/usr/local/php2/bin/phpize
./configure --with-php-config=/usr/local/php2/bin/php-config --with-mysql=/usr/local/mysql/
make
make install
http.conf 解析php文件
LoadModule php5_module modules/libphp5.so
DirectoryIndex index.php
AddType application/x-httpd-php .php
http.conf 加载 php.ini配置
PHPIniDir /usr/local/php2/etc/php.ini
php.ini
extension=/usr/local/php2/lib/php/extensions/no-debug-non-zts-20100525/mysql.so
;
; ... or with a path:
;
;extension_dir=/usr/local/php/lib/php/extensions//usr/local/php/lib/php/extensions/no-debug-non-zts-20100525
extension=/usr/local/php2/lib/php/extensions/no-debug-non-zts-20100525/pdo_mysql.so
用apache 查看php加载了哪些库 php -m
showdoc 连接数据库需要加载 pdo_mysql.so 动态库
index.php
<?php
phpinfo();
?>
网友评论