良玉的博客 点点滴滴,积水成河_良玉的博客_页游、手游linux运维工程师之路

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 2611816 bytes)解决

今天要用php代码来处理一个580M的日志文件,总共有219万多行记录,因为是.log的文件,在windows下面很难将文件按照条数来分割,于是在linux下用split -l 10000 filename 前缀名 将整个文件按10000行一个分割成了200多个小文件,之后用php来循环处理这200多个文件,可是执行到后来就出现了题目上面的错误:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 2611816 bytes)

阅读全文...

PHP Warning: exec() has been disabled for security reasons in

PHP Warning:  exec() has been disabled for security reasons in /home/cacti/lib/poller.php on line 126
PHP Warning:  popen() has been disabled for security reasons in /home/cacti/lib/rrd.php on line 52
原因:在php.ini中存在 disable_functions配置,默认配置中,cli执行函数都是被 禁止的,如果需要的话,需要在php.ini中将 disable_functions = exec , popen, system …. ,将你需要执行的函数从列表中删掉在重启web服务即可 。


阅读全文...