job.answiz.com
  • 0
Votes
name
name Punditsdkoslkdosdkoskdo

Open server fatal error out of memory in php.

My problem is:

Fatal error: Out of memory (allocated 2097152) (tried to allocate 8791446257187 bytes) in C:OpenServerdomainswhitecrossvet.localwp-includesunctions.php on line 5235

When I restart open server all becomes fine. But when I try to the load image to my wordpress site, which I'm developing, I get this problem. I've tried to add:

ini_set('memory_limit', '-1');

but this didn't help.

Parse error: syntax error, unexpected '['

This error comes in two variatians:

Variation 1

$arr = [1, 2, 3];

This array initializer syntax was only introduced in PHP 5.4; it will raise a parser error on versions before that. If possible, upgrade your installation or use the old syntax:

$arr = array(1, 2, 3);

See also this example from the manual.

Variation 2

$suffix = explode(',', 'foo,bar')[1];

Array dereferencing function results was also introduced in PHP 5.4. If it's not possible to upgrade you need to use a (temporary) variable:

$parts = explode(',', 'foo,bar');
$suffix = $parts[1];

See also this example from the manual.

  • 0
Reply Report