wordpress安装插件提示“wordpress发生意外错误,可能WordPress.org或服务器配置文件存在问题”
2016-08-15 17:39
1096 查看
安装wordpress插件,提示报错“wordpress发生意外错误,可能WordPress.org或服务器配置文件存在问题”
出问题的页面是http://*.*.*.*/wp-admin/update.php?action=install-plugin&plugin=bbpress&_wpnonce=39e9668a43
查看/wp-admin/update.php这个文件,处理action=install-plugin这个get请求的代码如下
继续查看wp-admin/includes/plugin-install.php的plugins_api方法:
经过了一下午的挣扎,然后想,访问wordpress的时候一直比较慢,是不是连接超时了呢?
在ping.chinaz.com上ping api.wordpress.com,找了一个比较快的ip地址66.155.40.186,配置到/etc/host中,果然好了
祝病魔早日战胜方校长!!!!!!
出问题的页面是http://*.*.*.*/wp-admin/update.php?action=install-plugin&plugin=bbpress&_wpnonce=39e9668a43
查看/wp-admin/update.php这个文件,处理action=install-plugin这个get请求的代码如下
} elseif ( 'install-plugin' == $action ) { if ( ! current_user_can('install_plugins') ) wp_die( __( 'You do not have sufficient permissions to install plugins on this site.' ) ); include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); //for plugins_api.. check_admin_referer( 'install-plugin_' . $plugin ); $api = plugins_api( 'plugin_information', array( 'slug' => $plugin, 'fields' => array( 'short_description' => false, 'sections' => false, 'requires' => false, 'rating' => false, 'ratings' => false, 'downloaded' => false, 'last_updated' => false, 'added' => false, 'tags' => false, 'compatibility' => false, 'homepage' => false, 'donate_link' => false, ), ) );
继续查看wp-admin/includes/plugin-install.php的plugins_api方法:
if ( false === $res ) { $url = $http_url = 'http://api.wordpress.org/plugins/info/1.0/'; if ( $ssl = wp_http_supports( array( 'ssl' ) ) ) $url = set_url_scheme( $url, 'https' ); $http_args = array( 'timeout' => 15, 'body' => array( 'action' => $action, 'request' => serialize( $args ) ) ); $request = wp_remote_post( $url, $http_args ); if ( $ssl && is_wp_error( $request ) ) { trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE ); $request = wp_remote_post( $http_url, $http_args ); } if ( is_wp_error($request) ) { print_r($request->error_data); echo $request->errors; $res = new WP_Error('plugins_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ), $request->get_error_message() ); } else { $res = maybe_unserialize( wp_remote_retrieve_body( $request ) ); if ( ! is_object( $res ) && ! is_array( $res ) ) $res = new WP_Error('plugins_api_failed', __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ), wp_remote_retrieve_body( $request ) ); }
经过了一下午的挣扎,然后想,访问wordpress的时候一直比较慢,是不是连接超时了呢?
在ping.chinaz.com上ping api.wordpress.com,找了一个比较快的ip地址66.155.40.186,配置到/etc/host中,果然好了
祝病魔早日战胜方校长!!!!!!
相关文章推荐
- 打开项目时提示如下错误:Visual Studio .NET 无法创建应用程序 。问题很可能是因为本地 Web 服务器上没有安装所需的组件
- mysql安装常见问题(系统找不到指定的文件、发生系统错误 1067 进程意外终止)
- Windows 64位操作系统安装mysql 绿色版 mysql安装常见问题(系统找不到指定的文件、发生系统错误 1067 进程意外终止)
- mysql安装常见问题(系统找不到指定的文件、发生系统错误 1067 进程意外终止)
- mysql安装常见问题(系统找不到指定的文件、发生系统错误 1067 进程意外终止)
- 打开项目时提示如下错误:Visual Studio .NET 无法创建应用程序 。问题很可能是因为本地 Web 服务器上没有安装所需的组件
- mysql安装常见问题(系统找不到指定的文件、发生系统错误 1067 进程意外终止)
- mysql安装常见问题(系统找不到指定的文件、发生系统错误 1067 进程意外终止)
- mysql安装常见问题(系统找不到指定的文件、发生系统错误 1067 进程意外终止)
- mysql安装常见问题(系统找不到指定的文件、发生系统错误 1067 进程意外终止)
- 安装SQL Server 2000时出现以下错误提示:“以前的某个程序安装已在安装计算机创建挂起的文件操作,运行安装程序之前必须重新启动计算机” 说明:如果重启计算机无法解决问题,可能有以下两个原因
- 【转载】mysql安装常见问题(系统找不到指定的文件、发生系统错误 1067 进程意外终止)
- mysql安装常见问题(系统找不到指定的文件、发生系统错误 1067 进程意外终止)
- mysql安装常见问题(系统找不到指定的文件、发生系统错误 1067 进程意外终止)
- mysql安装常见问题(系统找不到指定的文件、发生系统错误 1067 进程意外终止)
- mysql安装常见问题(系统找不到指定的文件、发生系统错误 1067 进程意外终止)
- 使用Ajax.net遇到的问题-使用会话时提示错误"只有在配置文件或 Page 指令中将启用会话状态设置为真时,才可以使用会话状态
- WIN7 64位旗舰版安装OFFICE2003 提示:“错误1919,配置ODBC数据源MS Access Database时发生错误ODEC错误”
- 解决google地球 google地球无法连接验证服务器或者提示需要安装google插件 的问题
- 错误提示之:SQL—无法在服务器上访问指定的路径或文件。请确保您具有必需的安全权限且该路径或文件存在。