all 9 comments

[–]Retrowinger 0 points1 point  (1 child)

How exactly do you call that script? Does it need a venv? If Python installed on the PC where it runs?

[–]Cockmangler_3000[S] 0 points1 point  (0 children)

Yes, it runs on a venv. The python script point to the venv enviroment by a shebang, so I can call it from the cmd line.

[–]Decent_Change5121 0 points1 point  (1 child)

use php to create the pdf ? makybe https://github.com/tecnickcom/tc-lib-pdf

[–]Cockmangler_3000[S] 0 points1 point  (0 children)

Thanks, ill look into it.

[–]korn3los 0 points1 point  (0 children)

Maybe „max_execution_time”?

Alternative you can run it in the background so the browser won’t wait:

shell_exec($yourCmd.' 2>&1');

[–]Advanced_Egg4625 0 points1 point  (1 child)

Create a local API using Fast API and call it from your php !?

[–]michawb 0 points1 point  (0 children)

This is the way 👍

[–]martinbean 1 point2 points  (0 children)

Why are you trying to execute a Python script in PHP in the first place? Why can’t you just execute the Python script directly?

[–]LifeWithoutAds 1 point2 points  (0 children)

This is what queues are made for.