I am able to easily call a python script from php using system()
, although there are several options. They all work fine, except they all fail. Through trial and error I have narrowed it down to it failing on
import MySQLdb
I am not too familiar with php, but I am using it in a pinch. I understand while there could be reasons why such a restriction would be in place, but this will be on a local server, used in house, and the information in the mysql db is backed up and not to critical. Meaning such a restriction can be reasonably ignored.
But how to allow php to call a python script that imports mysql? I am on a Linux machine (centOs) if that is relevant.