I'm trying to run python script from php using shell_exec() but it is not working. code is mentioned below
shell_exec() is working for other commands like checking version of python etc.
P.S - init.py is working normally when I run it through cmd.
test.php
<?php
shell_exec("python C:/wamp64/www/projectx/vc/init.py test123");
?>
init.py
from PIL import Image, ImageDraw, ImageFont
import sys
image = Image.open('images/background.png')
draw = ImageDraw.Draw(image)
font = ImageFont.truetype('Times New Roman Gras 700.ttf', size = 100)
(x, y) = (150, 100)
color = 'rgb(0, 0, 0)'
draw.text((x, y), sys.argv[1], fill = color, font = font)
image.save('images/image.png')