Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Remove hard coded ini_set('memory_limit') #5583
Good programming practise is not to use hard coded configuration values to override global, enviromental, system nor project basis settings.
Hard coded memory_limit ini setting override in vendor component is causing hours of extra work for programmers and system administrators as the common approach to adjust the ini setting via php.ini, apache.conf, .htaccess or enviromental variables are not taking affect. In worst case scenario all of the possible approaches are tested causing multiple restarts of services starting from php-fpm instances, apache servers and pdfreactor jetty webservices before the bad practise from the source code gets located.
Steps to reproduce
Please do render for example gigabyte size of pdf-file with pimcore and pdfreactor to reproduce (in press and print production the gigabyte is small document as printing quality requirements are high and there for system administrators will end up configuring php.ini directives).
// remove following line from the source ini_set('memory_limit', '2048M');
As otherwise sysadmin nor programmer cannot overcome the following /var/logs/php.log error:
PHP Fatal error: Allowed memory size of 2147483648 bytes exhausted
Current approach will also "hide" system requirement.