Error while trying to run PHP script from Python -


i have wamp installed on windows pc. have python script has following code, supposed run php script located in www of wamp (c:\wamp64\www)

import subprocess subprocess.call("php c:\wamp64\www\index.php") 

i tried below did not work also

import subprocess subprocess.call("c:\wamp64\bin\php\php5.6.31\php.exe c:\wamp64\www\index.php") 

however, when run python code ipython following error. (see image)

error in ipython

add full path of php

subprocess.call("c:/wamp64/bin/php/php5.6.31 c:/wamp64/www/index.php") 

or add php environment variables. open cmd , type:

set path=%path%;c:\wamp64\bin\php\php5.6.31 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -