I've got XAMPP running on my local Windows machine to process some simple text files using PHP. It's a fresh install so there's no history of issues prior.
I get the following error:
PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 704384 bytes)
I thought the solution would be pretty easy. I've tried increasing the memory size to 256M (not 256MB!), I've also tried the bytes version of it (268435456). There was only php.ini in the C:\xampp\php folder, there's nothing in the apache\bin regarding php.ini
Also tried setting the memory manually in the script itself using
ini_set('memory_limit','256M');
With no luck. The task itself is very basic - reading in a 640KB file.
Any ideas on what I else I can try?
ini_set('memory_limit', '256M');
or
php.ini => memory_limit = 256M
or
php_value memory_limit 256M
PHP's config can be set in multiple places:
Also note that PHP generally has different .ini files for command-line and webserver-based operation. Checking phpinfo() from the command line will report different values than if you'd run it in a web-based script.