lucatacconi / crunz-ui

Natural graphical user interface for Crunz (Crunzphp/Crunz). Allows users to setup tasks natively written in PHP and schedule them configuringing date and time of start, intervals and conditions of init and execution.
MIT License
12 stars 0 forks source link

Engine Error: Error - Task execution Error - Related to Logs All Settings appear correct #9

Closed clwehunt closed 3 years ago

clwehunt commented 3 years ago

Describe the bug When attempting to run a task manually, the following error is shown: Engine Error: Error - Task execution Error

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Tasks table'
  2. Click on '...'
  3. Click on 'Execute and wait log'
  4. See the error (see below for screenshots)

Expected behavior I would expect the task to run and show the log, or at least show the task ran successfully or indicate if there were any errors.

Screenshots Screenshot of Error: image

Screenshot Confirming that the Log file directories and settings all check out: image

Desktop (please complete the following information):

Additional context The error is generated by the following block in task.php.

if(empty($log_file_name)){ throw new Exception("ERROR - Task execution error"); }

lucatacconi commented 3 years ago

Hi Clwehunt, sorry for the delay have you installed Crunz-ui on your machine or on a virtual machine? is Crunz-ui served by Apache server or Xampp? If you are using Xampp do you have a PHP installed on your machine too?

lucatacconi commented 3 years ago

While I wait for your answer I can tell you i encountered a similar error when i used Crunz-ui delivered by Xampp while i had Apache and PHP installed on the same machine.

in the situation above, Web interface in fact is served by Xampp Apache and PHP but scheduled task execution is executed by PHP installed in the machine. When you try to start execution by web interface Xampp try to use PHP installed on the same machine with modules and libraries installed in Xampp end obviously get an error.

Mc systems are derived from linux systems, so the solution I am about to propose could work there too You can avoid error replacing the php symlink in the /usr/bin directory and pointing it to Xampp's php.

Do not delete the original symbolic link but save or rename it