我用centos linux系统配置php服务器,别的都没有问题,就是配置php.ini不生效我用phpinfo看了 15
LoadedConfigurationFile:/usr/local/php5/lib/php.ini显示正常,配置后也重起了httpd但是还是不生效,但是能正常运行,就...
Loaded Configuration File :/usr/local/php5/lib/php.ini 显示正常,配置后也重起了httpd但是还是不生效,但是能正常运行,就是我把php.ini删了都能运行,请各位高手帮忙看看怎么回事?
展开
展开全部
# PHP
cd /lamp/php-5.2.6
./configure \
--prefix=/usr/local/php/ \
--with-config-file-path=/usr/local/php/etc/ \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-mysql=/usr/local/mysql/ \
--with-libxml-dir=/usr/local/libxml2/ \
--with-jpeg-dir=/usr/local/jpeg6/ \
--with-freetype-dir=/usr/local/freetype/ \
--with-gd=/usr/local/gd2/ \
--with-mcrypt=/usr/local/libmcrypt/ \
--with-mysqli=/usr/local/mysql/bin/mysql_config \
--enable-soap \
--enable-mbstring=all \
--enable-sockets
make && make install
cp php.ini-dist /usr/local/php/etc/php.ini
echo "Addtype application/x-httpd-php .php .phtml" >> /etc/httpd/httpd.conf
/usr/local/apache2/bin/apachectl restart
/usr/local/apache2/bin/apachectl stop
/usr/local/apache2/bin/apachectl start
cd /lamp/php-5.2.6
./configure \
--prefix=/usr/local/php/ \
--with-config-file-path=/usr/local/php/etc/ \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-mysql=/usr/local/mysql/ \
--with-libxml-dir=/usr/local/libxml2/ \
--with-jpeg-dir=/usr/local/jpeg6/ \
--with-freetype-dir=/usr/local/freetype/ \
--with-gd=/usr/local/gd2/ \
--with-mcrypt=/usr/local/libmcrypt/ \
--with-mysqli=/usr/local/mysql/bin/mysql_config \
--enable-soap \
--enable-mbstring=all \
--enable-sockets
make && make install
cp php.ini-dist /usr/local/php/etc/php.ini
echo "Addtype application/x-httpd-php .php .phtml" >> /etc/httpd/httpd.conf
/usr/local/apache2/bin/apachectl restart
/usr/local/apache2/bin/apachectl stop
/usr/local/apache2/bin/apachectl start
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询