error log from exec? |
I am running this line in my controller where I am converting a pdf to an png.
exec('soffice --convert-to png {$file_uploaded} --outdir {$file_image}'); //convert to image It is not working but I don't know why? Is there a place where error message from exec are logged?
proof that an old dog can learn new tricks
(07-14-2020, 01:04 PM)richb201 Wrote: I am running this line in my controller where I am converting a pdf to an png. You can pass a 2nd and 3rd argument to the exec function. The 2nd argument must be an array and the 3rd must be an integer. PHP Code: $output = [];
Thanks. I managed to get this going. The only issue I have now is that if I am converting a large pdf (for example 20M) it takes a while. I have no problem with this but after 60 seconds (while it is still busy)I get a popup "An error has occurred on uploading.". Is there a timeout setting in php.ini that controls this?
proof that an old dog can learn new tricks
If the script takes some time, maybe you can put a set_time_limit(); at the beginning of the time consuming script. Just pass as argument to set_time_limit your desired number of seconds before the script times out. Passing 0 will give unlimited time.
(07-18-2020, 01:20 PM)paulbalandan Wrote: If the script takes some time, maybe you can put a set_time_limit(); at the beginning of the time consuming script. Just pass as argument to set_time_limit your desired number of seconds before the script times out. Passing 0 will give unlimited time.I tried it out set_time_limit(). It is still timing out at 60 seconds.
proof that an old dog can learn new tricks
|
Welcome Guest, Not a member yet? Register Sign In |