词条信息

admin
超级管理员
版本创建者 发短消息   
简易百科旧版 >> PHP5.4/5.5环境下HDwiki安装后空白问题解决方法 >> 历史版本

最新历史版本 :PHP5.4/5.5环境下HDwiki安装后空白问题解决方法 返回词条



 【修改之前做好备份】
1、先打开index.php文件中的  error_reporting(E_ALL);
2、如果出现类似截图中的错误提示,作如下修改
2.jpg

错误提示错误提示

 

错误提示:Strict Standards: Non-static method file::haddslashes() ...
修改方法:
1、找到lib下的string.class.php文件中的 haddslashes()方法
2、在此方法之前添加 static  ,例如  static  function haddslashes()

错误提示:Strict Standards: Non-static method file::writetofile() ...
修改方法:
1、找到lib下的file.class.php文件,中的 writetofile()方法
2、在此方法之前添加 static  ,例如  static  function writetofile()
3、可以优先修改control\index.php、user.php、doc.php、category.php这几个文件中的,修改方法如下

sed -i 's/$this->base( & $get,& $post)/$this->base($get,$post)/g' ~/Desktop/test/*
 
4、将control\文件中所有的文件全部打开,在文件的开头,找到截图中类似的代码,将红圈中的符号去掉,control中所有的文件都需要修改

3.jpg

 

例如  control\index.php文件的开头,找到类似的代码,修改对应的代码为描红部分,即:
将$this->base( & $get, &$post);  修改为$this->base(  $get,$post); 

 错误提示:Deprecated: Function set_magic_quotes_runtime() is deprecated in /var/www/html/hdwiki-original/index.php on line 6

修改方法:

将index.php中set_magic_quotes_runtime(0); 想知道更多内容:

修改为:

@set_magic_quotes_runtime(false);
ini_set('magic_quotes_runtime', 0);
 

5、修改完之后,将index.php文件中的错误提示关掉 ,修改为 error_reporting(0); 注:附上本人已经修改完成支持php5.4的安装包