I have recently run into a problem where PHP scripts will not run correctly from a Jailshell SSH prompt, e.g.:
php -f myscript.php
The following error appears in the error_log:
The out of memory error triggers at exactly 20447232 bytes each time.
I have raised the memory_limit in php.ini to 256M or 512M, and the script outputs the correct memory limit when doing a echo ini_get('memory_limit').
The script completes without problems when run as root.
This leads me to believe the issue is somehow related to a non-PHP specific memory limit within the Jailshell environment.
I notice that the ulimit -v (virtual memory) is set to 200000 for the Jailshell account and unlimited for root. I don't know if this has anything to do with it, and neither am I able to raise the value for the jailshell.
Any help would be greatly appreciated!
Thanks in advance.
php -f myscript.php
The following error appears in the error_log:
Code:
PHP Fatal error: Out of memory (allocated 20447232) (tried to allocate 4096 bytes) in myscript.php
I have raised the memory_limit in php.ini to 256M or 512M, and the script outputs the correct memory limit when doing a echo ini_get('memory_limit').
The script completes without problems when run as root.
This leads me to believe the issue is somehow related to a non-PHP specific memory limit within the Jailshell environment.
I notice that the ulimit -v (virtual memory) is set to 200000 for the Jailshell account and unlimited for root. I don't know if this has anything to do with it, and neither am I able to raise the value for the jailshell.
Any help would be greatly appreciated!
Thanks in advance.