I disabled the Yoast SEO plugin so that I can update a very large page (11,125 lines – 111,897 words — In Text Mode).
I was able to successfully make changes to the page with very little lag, but when I saved the page, I received the following error; Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 72 bytes) in /home/prcessmodel/public_html/wp-includes/compat.php on line 123
.
Upon returning back to the page, the page did update / save changes.
<?php phpinfo(); ?>
fileThe line 123 of compat.php contains the following line of code (in bold);
]]>if ( _wp_can_use_pcre_u() ) {
// Use the regex unicode support to separate the UTF-8 characters into an array
preg_match_all( ‘/./us’, $str, $match );
return count( $match[0] );
}
“Warning: require(/home/abdalis/public_html/wp-includes/random_compat/random.php): failed to open stream: No such file or directory in /home/abdalis/public_html/wp-includes/compat.php on line 338
Fatal error: require(): Failed opening required ‘/home/abdalis/public_html/wp-includes/random_compat/random.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/abdalis/public_html/wp-includes/compat.php on line 338″
Please give me solution for this problem.
Thanks
Line 30:
preg_match_all (‘/./us’, $ str, $ match);
function belongs _mb_substr, which invoke a function of mb_substr, located in the same file, line 17.
In comments to function _mb_substr written:
// The solution below, works only for utf-8, so in case of a different
// Charset, just use built-in substr
For solve the problems I emulate function _mb_substr for other encodings.
Replacing line 18
return _mb_substr ($ str, $ start, $ length, $ encoding);
on the line
return is_null ($ length)? substr ($ str, $ start): substr ($ str, $ start, $ length);
As a result, the site is up and started working.
Actually the question:
This is the core file of WordPress, and it is included in version 4.0. Errors occur for more than 2 years. Maybe we should correct the mistake? or explain what the function does and how to get around this bottleneck in the subject, without making changes to the kernel.
I updated wordpress. Now I get this message. I have tried removing the ‘)’ as suggested by the error message (Parse error: syntax error, unexpected ‘)’ in /data/27/1/39/128/1202780/user/1281666/htdocs/wp-includes/compat.php on line 97) and I just get another error message. I reinstalled wp-includes as suggested in some forums, but it did not work.
How can I fix this, please?
Dennis
Warning: require(/home/outlawzh/public_html/wp-includes/compat.php): failed to open stream: No such file or directory in /home/outlawzh/public_html/wp-settings.php on line 68 Fatal error: require(): Failed opening required ‘/home/outlawzh/public_html/wp-includes/compat.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /home/outlawzh/public_html/wp-settings.php on line 68
Can any one help?
]]>/wp-includes/compat.php on line 136
]]>