2

I installed cutycapt as root user
I tried it from command prompt

xvfb-run --server-args="-screen 0, 1024x768x24" /root/cutycapt/CutyCapt/CutyCapt --url=http://www.poochh.com --out=/tmp/example.png

But when I am executing it from php exec()
I am getting this error on var_dump($output); of exec()

array(1) { [0]=> string(80) "/usr/bin/xvfb-run: line 166: /root/cutycapt/CutyCapt/CutyCapt: Permission denied" }
Wazy
  • 8,822
  • 10
  • 53
  • 98

1 Answers1

4

Check the user php runs as! You may need to make sure it has rights to run cutycapt

Try running

echo exec('whoami'); 

to check who php is running as

Toby Allen
  • 10,997
  • 11
  • 73
  • 124
  • Thanks for your quick response...But How to check that – Wazy Dec 04 '12 at 15:07
  • 1
    @Wazzy Try running `echo exec('whoami');` to see who PHP is running as. [Exec - PHP.net](http://uk3.php.net/manual/en/function.exec.php) – Daryl Gill Dec 04 '12 at 15:12