DiscuZ error:undefined function set_magic_quotes_runtime()
在XAMPP中运行DiscuZ的程序包的时候,你可能会遇到如题所示的错误。
具体如下:
Fatal error: Uncaught Error: Call to undefined function set_magic_quotes_runtime() in /opt/lampp/htdocs/discuz/install/index.php:12 Stack trace: #0 {main} thrown in /opt/lampp/htdocs/discuz/install/index.php on line 12
如图:
对于这种情况,解决方法如下:
1 2 3 |
[root@lnmpme lampp]# cat /opt/lampp/htdocs/discuz/install/index.php | grep --color "set_magic_quotes_runtime" //@set_magic_quotes_runtime(0); [root@lnmpme lampp]# |
注释掉,错误中显示的文件:/opt/lampp/htdocs/discuz/install/index.php,中的:@set_magic_quotes_runtime。
然后,再次访问DiscuZ的webapp,问题就解决了:
另一种方法:
有的时候,还可以采用修改php.ini文件中的配置解决。
如下:
1 2 3 4 |
[root@lnmpme lampp]# cat etc/php.ini | grep magic_quotes_runtime --color ;magic_quotes_runtime=Off magic_quotes_runtime=On [root@lnmpme lampp]# |
将其中“magic_quotes_runtime=off”改为:magic_quotes_runtime=on。
——————————————
Done。