前段时间,我尝试通过FTP上传到WordPress主题,但每当我尝试查看预览时,它都会一直给我以下错误:
PHP致命错误:第818行的E:\ Domains \ joseramosadvogados.com.br \ wwwroot \ wp-includes \ option.php中允许的内存大小为134217728个字节(试图分配261904个字节)
CREATE OR REPLACE FUNCTION user_trigger() RETURNS TRIGGER
LANGUAGE plpgsql
AS $$
BEGIN
EXECUTE 'CREATE USER ' || quote_ident(NEW.id) || ' NOLOGIN';
END;
$$;
但是有一段时间它给了我另一个错误屏幕:
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 \中第471行l10n.php
/**
* 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知之甚少,所以你们能帮助我找到这两个问题的根源吗? (我已尝试过人们通过互联网说的一些内容,例如.htaccess,添加" set_include_path('。');"在/**
* 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;
}
行之后,停用插件......
答案 0 :(得分:0)
open_basedir restriction in effect
表示您正在使用生活在黑暗时代的虚拟主机。这些天没有人open_basedir
被禁用。
PHP没有足够的内存来运行也指向主机。尝试添加&#34;定义&#34;在wp-config.php文件的下方,在文件中的开头<?php
下方的几行空白处输入:
define('WP_MEMORY_LIMIT', '64M');
看看你是否至少可以摆脱内存错误。
如果没有,请找一个新的虚拟主机。