6 months ago

Python function failing in PHP exec()

Posted 6 months ago by BennyWalden

I am running Laravel Homestead 5.7. have a command script for a python program which runs perfectly when I execute it through the terminal, however when I enter the command into php's exec function, it always fails.

I believe it might have something to do with the wrong version of python being called at runtime. I can run "python --version" in my terminal, which gives me version 2.7, however in php's exec function, it just returns a blank line.

Does anyone know why this could be happening?

Please sign in or create an account to participate in this conversation.