查找PHP的配置文件

查找PHP的配置文件

先写了一个

<?php
phpinfo();
?>
然后在浏览器中浏览一下(之前我百度说在Configuration File  这个位置看)

结果竟然显示 Loaded Configuration File  none ;

让别人问了问才知道。需要把源码包中的文件复制过去才行

cp /usr/local/src/php-5.3.28/php.ini-production /usr/local/php/etc/php.ini

然后再重新启动apache,

Loaded Configuration File/usr/local/php/etc/php.ini 

显示正常。另一个查看配置文件文件的方法

/usr/local/php/bin/php -i |head

phpinfo()
PHP Version => 5.3.28

System => Linux cuizhipeng 2.6.32-431.el6.i686 #1 SMP Fri Nov 22 00:26:36 UTC 2013 i686
Build Date => Jan 7 2015 23:37:31
Configure Command => './configure' '--prefix=/usr/local/php' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-config-file-path=/usr/local/php/etc' '--with-mysql=/usr/local/mysql' '--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'
Server API => Command Line Interface     //配置PHP时的参数
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /usr/local/php/etc
Loaded Configuration File => /usr/local/php/etc/php.ini   //配置文件为位置

转载于:https://www.cnblogs.com/cuizhipeng/p/4223899.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值