A PHP Error was encountered
Severity: Notice
Message: Only variable references should be returned by reference
Filename: core/Common.php
Line Number: 257
原代码:
return $_config[0] =& $config;
修改后:
$_config[0] =& $config;
return $_config[0];...
date_default_timezone_set()
在写php程序中有时会出现这样的警告:
PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for '8.0/no DST' instead in D:\PHPW...
make: *** [sapi/cli/php] 错误 1
ext/iconv/.libs/iconv.o: In function `php_iconv_stream_filter_ctor':
/home/king/php-5.2.13/ext/iconv/iconv.c:2491: undefined reference to `libiconv_open'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
[root@test php-5.2.13]# vi Makefile
在安裝 PHP 到系统中时要是发生「undefined reference to libiconv_open'」之类的错误信息,那表示在「./configure 」沒抓好一些环境变数值。错误发生点在建立「-o sapi/cli/...
BackWPup backwpup 错误: 没有发现 MySQLi 扩展,请安装它
备份插件测试出错,错误日志显示 “ backwpup 错误: 没有发现 MySQLi 扩展,请安装它”,很明显编译php的时候没有添加mysqli模块,重新添加该模块:
切换到源码目录下 /var/src/php-5.6.0/ext/mysqli/
运行php安装目录下的phpize
/usr/local/php/bin/phpize
编译安装mysqli扩展
#./configure --prefix=/usr/local/mysqli --with-php-config=/usr/local/php/bin/php-config --with-mysqli=/usr/local/mysql/bin/mysql_config
编译可能会报错
Configuring for:
PHP Api Version: 20041225
Ze...
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script
运行/usr/local/php/bin/phpize添加php模块时出现:
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.
查阅之后的解决方法:
cd /usr/src
wget http://ftp.gnu.org/gnu/m4/m4-1.4.9.tar....