Welcome Guest, Not a member yet? Register   Sign In
php cli problem *edit title*
#1

[eluser]jesterhead[/eluser]
*Edit title from shell exec problem*

I have a cron that runs a task every 15 minutes. The cron command is:

Code:
curl -L --insecure https://mysite.com/cron/test

and inside the function, I have this command:

Code:
echo shell_exec('/usr/bin/php '.WEBPATH.'index.php some_controller another_test');

and it's technically not working.

What I mean by that is, if I execute the command on the terminal it will output the right results. The code will output the right results when viewed on my dev site BUT it won't output anything on the production site.

I was thinking that it might be some permission issue but wouldn't those also apply to my dev site?

I tested shell_exec with another type of command
Code:
echo shell_exec('whoami');
to compare the output, and the dev site and production site both output the expected results (apache)




Theme © iAndrew 2016 - Forum software by © MyBB