【发布时间】:2015-06-07 21:07:06
【问题描述】:
不久前,我尝试通过 FTP 将主题上传到 WordPress,但每当我尝试查看预览时,它总是给我以下错误:
PHP 致命错误:第 818 行的 E:\Domains\joseramosadvogados.com.br\wwwroot\wp-includes\option.php 中允许的内存大小为 134217728 字节已用尽(试图分配 261904 字节)
/**
* Delete user interface settings.
*
* Deleting settings would reset them to the defaults.
* This function has to be used before any output has started as it calls setcookie().
*
* @since 2.7.0
*
* @param mixed $names The name or array of names of the setting to be deleted.
* @return bool true if deleted successfully/false if not.
*/
function delete_user_setting( $names ) {
if ( headers_sent() ) {
return false;
}
$all_user_settings = get_all_user_settings();
$names = (array) $names;
$deleted = false;
foreach ( $names as $name ) {
if ( isset( $all_user_settings[$name] ) ) {
unset( $all_user_settings[$name] );
$deleted = true; /*line 818*/
}
}
if ( $deleted ) {
return wp_set_all_user_settings( $all_user_settings );
}
return false;
}
但过了一会儿,它又给了我另一个错误屏幕:
PHP 警告:is_readable() [function.is-readable]:open_basedir 限制生效。文件(/languages//pt_BR.mo)不在允许的路径内:(E:\Domains\joseramosadvogados.com.br)在 E:\Domains\joseramosadvogados.com.br\wwwroot\wp-includes\ l10n.php 在第 471 行
/**
* Filter MO file path for loading translations for a specific text domain.
*
* @since 2.9.0
*
* @param string $mofile Path to the MO file.
* @param string $domain Text domain. Unique identifier for retrieving translated strings.
*/
$mofile = apply_filters( 'load_textdomain_mofile', $mofile, $domain );
if ( !is_readable( $mofile ) ) return false; /*line 471*/
$mo = new MO();
if ( !$mo->import_from_file( $mofile ) ) return false;
if ( isset( $l10n[$domain] ) )
$mo->merge_with( $l10n[$domain] );
$l10n[$domain] = &$mo;
return true;
}
我对PHP知之甚少,请问各位大神能帮我找出这两个问题的根源吗? (我尝试了一些人们通过互联网说的东西,比如 .htaccess,在 <?php 行之后添加“set_include_path('.');”,停用插件...
【问题讨论】:
标签: php wordpress localization themes wordpress-theming