0

Server : Ubantu 16 Php version : 7

i have php 7 installed on ubantu 16 .i have also installed imagemagick.

now my php file say index.php with code below

echo exec("whoami");
echo exec("/usr/bin/convert '/var/www/html/slc.png' '/var/www/html/slc.ppm'");

now when i run it in browser say example.com/index.php , it show output

www-data

But convert command does not gets executed.

but when i run it via cli new ppm file is created

php index.php

can you please tell me how to fix this issue

pcoder
  • 1
  • 1
  • 2

0 Answers0