Ryu Unsun
asked 8 years ago

first I’m not good at english. 🙂 I met the errors that
Warning: preg_replace() function.preg-replace: Compilation failed: missing terminating ] for character class at offset 6 in searching result. another error is that Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 30720 bytes) in /www/thebike_co_kr/wp-admin/includes/ajax-actions.php on line 895 I put the code define(‘WP_MEMORY_LIMIT’,’128M’); to wp-config.php how can I solve these errors? theme is DW FOCUS wp version is latest. thanks.

2 Answers
answered 8 years ago


Do you have confused? DW Focus don’t have ajax search.

answered 8 years ago


  • Issue 1:
    You can use an Unicode character class. pL covers pretty much all letter symbols.
    if (!preg_match("/^[a-zA-Z\s,.'-\pL]+$/u", $name))
    See also http://www.regular-expressions.info/unicode.html, but beware that PHP/PCRE only understands the abbreviated class names.
  • Issue 2: Please try the following solution.
    1. Try adding this line to your wp-config.php file:
    define(‘WP_MEMORY_LIMIT’, ’64M’);
    2. If you have access to your PHP.ini file, change the line in PHP.ini
    If your line shows 32M try 64M:
    memory_limit = 64M ; Maximum amount of memory a script may consume (64MB)

    3. If you don’t have access to PHP.ini try adding this to an .htaccess file:
    php_value memory_limit 64M
    4. Talk to your host.
    Hope this helps !

Powered by DW Question & Answer Pro