Y
Y
Yaroslav Urbanevich2015-08-11 13:20:18
PHP
Yaroslav Urbanevich, 2015-08-11 13:20:18

Problems with memory size when executing a file in the console. How to eliminate?

Good afternoon.
When executing a php file in the console, it constantly gives the following error:

Allowed memory size of 262144 bytes exhausted (tried to allocate 49152 bytes) in /var/www/test/update_price.php on line 80

php.ini has a limit of 3 GB. Php_info() shows these 3 GB. There are no separate settings for memory_limit in the php script. If the first line is var_dump(ini_get("memory_limit")); die; it still gives the same error.
Apace2 overloaded does not help.
Any ideas?
Linux Mint Server 17.1 + Apache2 + PHP 5.5.27-1+deb.sury.org~trusty+1 (cli) (built: Jul 15 2015 12:14:44)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2015-08-11
@alexey-m-ukolov

Apache and CLI use different php.ini files, most likely you did not increase memory_limit there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question