Jump to content

exec/system problems


Nunners

Recommended Posts

I've setup an automated script that thens selects some other scripts to run depending on day, time (which I would have done on a cron but it needs other info dependant on whether work is open or not!) however I've hit a problem.

 

The following....

<?php

$cron["script"]="/cronjobs/db_tidy.hourly.php";

$return = exec("/usr/bin/php /var/www/vhosts/website/httpsdocs".$cron["script"], $return_var);

?>

 

Produces....

sh: /php: No such file or directory

 

If I call the script from the command line it works fine, however from using either exec or system calls from within php, it doesn't.

 

Can anyone shed any light on why it might be happening?

 

Thanks

Nunners

Link to comment
https://forums.phpfreaks.com/topic/143595-execsystem-problems/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.