Posts: 726
Threads: 208
Joined: Sep 2017
Reputation:
0
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
Posts: 726
Threads: 208
Joined: Sep 2017
Reputation:
0
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
Posts: 115
Threads: 3
Joined: Jul 2020
Reputation:
2
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.
Posts: 115
Threads: 3
Joined: Jul 2020
Reputation:
2
Can you try editing the max_execution_time ini setting?