PHPRPC模式在 php 5.4 版本下的错误Cannot redeclare gzdecode() in compat.php on line 182
2013-04-24 20:14
651 查看
问题描述:当启用PHPRPC模式时,假如服务器端的php引擎为5.4以上版本,则会出现错误
Fatal error: Cannot redeclare gzdecode() in X:\myweb\ThinkPHP\Extend\Vendor\phpRPC\compat.php on line 181
复制代码
问题原因:php在5.4版本后,已经自包含了gzdecode()函数,开发者自己定义的gzdecode()函数会与其冲突。
解决方案:打开ThinkPHP\Extend\Vendor\phpRPC\compat.php,在第72行(可能有差异)找到function gzdecode($data, &$filename = '', &$error = '', $maxlength = null) ,把这个函数用下面的代码包括起来
if (! function_exists('gzdecode')) {
//将gzdecode函数包括进来
}
Fatal error: Cannot redeclare gzdecode() in X:\myweb\ThinkPHP\Extend\Vendor\phpRPC\compat.php on line 181
复制代码
问题原因:php在5.4版本后,已经自包含了gzdecode()函数,开发者自己定义的gzdecode()函数会与其冲突。
解决方案:打开ThinkPHP\Extend\Vendor\phpRPC\compat.php,在第72行(可能有差异)找到function gzdecode($data, &$filename = '', &$error = '', $maxlength = null) ,把这个函数用下面的代码包括起来
if (! function_exists('gzdecode')) {
//将gzdecode函数包括进来
}
相关文章推荐
- phprpc的使用示例以及报错Fatal error: Cannot redeclare gzdecode() in D:\wamp\www\immoc\phprpc\compat.php 处理
- php错误 Fatal error: Cannot use object of type stdClass as array in……
- PHP在升级到5.4版本的php可能会出现这种错误
- [PHP问题]Cannot redeclare xxxxxx() (previously declared in C:\WWW\xxx.xxx:xxx)
- PHP严重致命错误处理:php Fatal error: Cannot redeclare clas
- Android SDK低版本切换高版本错误 Error:The number of method references in a .dex file cannot exceed 64K.
- PHP错误Cannot use object of type stdClass as array in错误的解决办法
- ecshop在PHP 5.4以上版本各种错误问题处理
- DedeCMS不支持PHP5.3、5.4及以上版本后台500错误白屏的解决方法
- ecshop php5.4以上版本错误之preg_replace 替换成 preg_replace_callback
- PHP严重致命错误处理:php Fatal error: Cannot redeclare class or function
- 编译php5.4的时候出现错误----configure: error: in `/usr/local/src/php540/php-5.4.0':
- Fatal error: Cannot redeclare class Config in /Applications/XAMPP/xamppfiles/lib/php/Config.php on l
- 配置THinkPHP版本3.1.3完整版出现错误:Fatal error: Cannot redeclare t()。
- DedeCMS不支持PHP5.3、5.4及以上版本后台500错误白屏的解决方法
- DedeCMS不支持PHP5.3、5.4及以上版本后台500错误白屏的解决方法
- PHP严重致命错误处理:php Fatal error: Cannot redeclare clas
- magento -- PHP版本引起的错误Fatal error: Method Varien_Object::__tostring() cannot take arguments
- **PHP错误Cannot use object of type stdClass as array in错误的
- phpmyadmin错误:Cannot start session without errors, please check errors given in your PHP and/or we