Running phantomjs with shell_exec under cron job

0

I have something like this:

$re = shell_exec("sudo /usr/local/share/phantomjs --version");

Unfortunately this gives me another problem:

 sudo: no tty present and no askpass program specified
 Sorry, try again.

User that cron runs under is bokac so Using visudo as root I added line in /etc/sudoers :

  bokac ALL = NOPASSWD: /usr/local/share/phantomjs

I have to mention that /usr/local/share/phantomjs is a sym link to executable under /usr/local/share/phantomjs-master/bin/phantomjs.

Basically, this is not working, I keep getting error message stated above. Is my sudoers line correct? What am I doing or not doing wrong? Any help appreciated.

skywalker

Posted 2013-04-17T14:37:49.333

Reputation: 103

Answers

0

All this was solved by chmod 0777 on executable file that sym link was pointing at, and no need for changing sudoers any more. That made more confusion then help.

skywalker

Posted 2013-04-17T14:37:49.333

Reputation: 103