ashly Posted February 26, 2007 Share Posted February 26, 2007 Hi, I am working with php5 and i have a script that should have to be executed as a cron. The main purpose of the script is to send reports as pdf files to different users. The problem is when i generate a number of pdfs, the script fails to complete the process and results in display a page with network error. It is creating around 6 types of pdf files in each execution, each having an average size of 500 KB. The memory_get_usage() returns the value -51507298 after a function call in ezpdf library. just before the function call the value for the same was 1967298. Default php.ini setting for memory_limit is 50 MB. I have set the memory limit in the script to 500 MB. ini_set("memory_limit", "500M"); I am using the library ezpdf to generate pdf files. Can anyone help me to sort out the problem...? Thanks in advance Ashly Link to comment https://forums.phpfreaks.com/topic/40168-script-execution-fails/ Share on other sites More sharing options...
ToonMariner Posted February 26, 2007 Share Posted February 26, 2007 try running it through the browser - sending just one lot of pdf's to you and see if any errors crop up. If that is ok then i suggest you clear any memory cache on each loop so that it doesn't fail next time round... Link to comment https://forums.phpfreaks.com/topic/40168-script-execution-fails/#findComment-194339 Share on other sites More sharing options...
ashly Posted February 27, 2007 Author Share Posted February 27, 2007 i am running it through the browser.. tried each pdf's separately.. but the same problem exists.. Link to comment https://forums.phpfreaks.com/topic/40168-script-execution-fails/#findComment-194977 Share on other sites More sharing options...
itsmeArry Posted February 28, 2007 Share Posted February 28, 2007 I thin you should do this using cron job i.e. a backend process not from the browser because the browser times out the max execution time before the script gets executed fully. Link to comment https://forums.phpfreaks.com/topic/40168-script-execution-fails/#findComment-195889 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.