Difference Between Calling A Python Script By Terminal And By Php? Where Is The Error?
I have a PHP script, that calls a python script by $call_python = 'python ../python/lp_3.py '.$author; $python_output = Null; $mystring = exec($call_python, $output_python); This
Solution 1:
In your PHP code, you're just calling "python", and letting PHP decide which version of Python to use. Use an explicit path to a specific Python binary, (e.g. /usr/bin/python2.6).
You need to know the exact path to the version of Python that has MySQLdb installed.
Post a Comment for "Difference Between Calling A Python Script By Terminal And By Php? Where Is The Error?"