主要是drupal6中采用了一些php5.2的函数,而5.3已经将这些函数弃用了。
解决办法有一些,如下:
Drupal6.14在PHP5.3上安装问题的解决
vmware虚拟机上装好了centos,再下载了一个xampp1.7.2,下载Drupal最新发布的6.14,安装时出现了以下报错:
Function ereg() is deprecated in … … \includes\file.inc on line 905
查了下,原来,Drupal6.x只适合于安装在PHP5.2上,我下载的xampp1.7.2是PHP5.3,解决办法可参照这里,修改\includes\file.inc文件的905行:
Change
elseif ($depth >= $min_depth && ereg($mask, $file)) {
to
elseif ($depth >= $min_depth && mb_ereg($mask, $file)) {
问题解决。
问题一:Object-valued by-reference parameters
这是最常见的问题,修改includes/module.inc 462行
//修改前
return call_user_func_array($function, $args);
//修改后
return call_user_func_array($function, &$args);
Function ereg() is deprecated——drupal6.13 & PHP5.3
Hi all,
Function ereg() is deprecated in drupal-6.13\includes\file.inc on line 895
open the file.inc in a good text editor other than notepad, go to the line number 895 to see the following line. Then comment the line and in the next line type the replaced code. this will solve the instalation issues and also most of other issues related to the same issue.
Change
elseif ($depth >= $min_depth && ereg($mask, $file)) {
to
elseif ($depth >= $min_depth && mb_ereg($mask, $file)) {
mb_ereg fortunatly is not deprecated
星期六, 05/07/2011 - 11:42 — 杨超