Good day, I have the following script in python
that is called test.py
:
import subprocess
subprocess.call(["php", "load_data.php"])
The idea is to run another script php
in which I do LOAD DATA INFILE
to a table of MySQL
, but it generates the following error:
Traceback <most recent call last>:
File "test.py", line 3, in <module>
subprocess.call<["php","load_data.php"]>
File "C:\Python34\lib\subprocess.py", line 537, in call
with Popen<*popenargs, **kwargs> as p:
File "C:\Python34\lib\subprocess.py" line 859, in __init__
restore_signals, start_new_session>
File "C:\Python34\lib\subprocess.py", line 1114, in _execute_child startupinfo>
FileNotFoundError: [WinError 2] The system cannot find the file specified
If I run the script load_data.php
direct in a web browser, it works without any problem so I think the problem is in python
, it should be mentioned that I have done this correctly before but with python 3.6
, some idea if I need to configure something or add a library.
I have php5.3
, apache 2.2.21
, mysql5.5.20
, python3.4
Greetings!