워드프레스 아바다 테마 › 게시판 › 게시판 › Fatal error: Allowed memory size of… meta.php 문제입니다.
-
글쓴이글
-
-
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 71 bytes) in /home/solomonpmc62/www/wp-includes/meta.php on line 781
메뉴항목에 들어가는데 위와 같은 메세지가 출력됩니다.
wp-config.php 파일에
define(‘WP_MEMORY_LIMIT’,’128M’);
define(‘FS_METHOD’,’direct’);
문구를 넣었습니다.meta.php 의 781번째 줄로 가보니
$cache[$mpid][$mkey][] = $mval; 라고 나오는데요
어떻게 해결해야하는지 모르겠습니다 ㅠㅠ
—————————————–meta.php———————————————-
/**
* Update the metadata cache for the specified objects.
*
* @since 2.9.0
* @uses $wpdb WordPress database object for queries.
*
* @param string $meta_type Type of object metadata is for (e.g., comment, post, or user)
* @param int|array $object_ids array or comma delimited list of object IDs to update cache for
* @return mixed Metadata cache for the specified objects, or false on failure.
*/
function update_meta_cache($meta_type, $object_ids) {
if ( empty( $meta_type ) || empty( $object_ids ) )
return false;if ( ! $table = _get_meta_table($meta_type) )
return false;$column = sanitize_key($meta_type . ‘_id’);
global $wpdb;
if ( !is_array($object_ids) ) {
$object_ids = preg_replace(‘|[^0-9,]|’, ”, $object_ids);
$object_ids = explode(‘,’, $object_ids);
}$object_ids = array_map(‘intval’, $object_ids);
$cache_key = $meta_type . ‘_meta’;
$ids = array();
$cache = array();
foreach ( $object_ids as $id ) {
$cached_object = wp_cache_get( $id, $cache_key );
if ( false === $cached_object )
$ids[] = $id;
else
$cache[$id] = $cached_object;
}if ( empty( $ids ) )
return $cache;// Get meta info
$id_list = join( ‘,’, $ids );
$id_column = ‘user’ == $meta_type ? ‘umeta_id’ : ‘meta_id’;
$meta_list = $wpdb->get_results( “SELECT $column, meta_key, meta_value FROM $table WHERE $column IN ($id_list) ORDER BY $id_column ASC”, ARRAY_A );if ( !empty($meta_list) ) {
foreach ( $meta_list as $metarow) {
$mpid = intval($metarow[$column]);
$mkey = $metarow[‘meta_key’];
$mval = $metarow[‘meta_value’];// Force subkeys to be array type:
if ( !isset($cache[$mpid]) || !is_array($cache[$mpid]) )
$cache[$mpid] = array();
if ( !isset($cache[$mpid][$mkey]) || !is_array($cache[$mpid][$mkey]) )
$cache[$mpid][$mkey] = array();// Add a value to the current pid/key:
$cache[$mpid][$mkey][] = $mval; <— 781번줄
}
}foreach ( $ids as $id ) {
if ( ! isset($cache[$id]) )
$cache[$id] = array();
wp_cache_add( $id, $cache[$id], $cache_key );
}return $cache;
} -
위와같이 한번 해보세요
그래도 안되면 다시 글 남겨 주세요 -
마스터님이 알려주신 위 링크데로
.htaccess파일을 만들어서 넣어도 같은 증상이네요
그래서 다시 데이터베이스지우고 워드프레스 다시 설치한후에 작업중입니다.
.htaccess파일을 만들어서 WWW폴더안에 넣어두었고
혹식몰라 wp-config파일에도 메모리 128로 넣어놨습니다.데모버전때문에 그런가 싶어서 데모 없이 작업중이고 아직까지는 그런일이 없습니다만
phpinfo파일을 열어보면memory_limit 64M 128M
이렇게 나와있는것이 이상합니다. Local Value값이 128로 같아야 하는거 아닌가요?
Local Value와 Master Value값이 같이 128로 나와야 하는거 같은데요 안바뀝니다. ㅠㅠ
-
-
글쓴이글
- 게시판 ‘게시판’가 새 게시글과 답변으로 마감했습니다.