My question is similar to this:
I’ve been trying all night to get php to execute uglifyjs. I’ve tried:
die(shell_exec('NODE_PATH="/home/app/nodejs/node_modules/"; export NODE_PATH; uglifyjs -o /home/app/public_html/js/profile.min5.js /home/app/public_html/js/profile.js'));
die(shell_exec('node /home/app/nodejs/node_modules/uglify-js/bin/uglifyjs -o /home/app/public_html/js/profile.min33.js /home/app/public_html/js/profile.js'));
and a bunch of other crazy combinations but nothing works. Everything works fine if I do it manually in the shell. Can anyone help please?
Problem courtesy of: Yuriy
Have you tried looking at the following (I’ll go for the obvious since you haven’t said what you’ve already tried):
user apache/www-data is allowed access to /home/app : sometimes /home directories are closed off (chmod 0700)
on your server in effect? From the command line, try:
php -i | grep safe_mode
Then, look at the output of:
Which version of PHP are you using (might well be irrelevant)?
Solution courtesy of: Michiel