Welcome Guest, Not a member yet? Register   Sign In
error log from exec?
#2

(07-14-2020, 01:04 PM)richb201 Wrote: I am running this line in my controller where I am converting a pdf to an png. 

exec('soffice --convert-to png {$file_uploaded} --outdir {$file_image}');  //convert to image

It is not working but I don't know why? Is there a place where error message from exec are logged? 

You can pass a 2nd and 3rd argument to the exec function. The 2nd argument must be an array and the 3rd must be an integer.

PHP Code:
$output = [];
$return = -1;
exec('soffice --convert-to-png {$file_uploaded} --outdir {$file_image}'$output$return);

// print the output
print_r($output);

// is this an error?
echo $return// if 1, then error; 0 if successful 
Reply


Messages In This Thread
error log from exec? - by richb201 - 07-14-2020, 01:04 PM
RE: error log from exec? - by paulbalandan - 07-17-2020, 03:54 AM
RE: error log from exec? - by richb201 - 07-17-2020, 01:46 PM
RE: error log from exec? - by paulbalandan - 07-18-2020, 01:20 PM
RE: error log from exec? - by richb201 - 07-18-2020, 02:02 PM
RE: error log from exec? - by paulbalandan - 07-18-2020, 02:40 PM



Theme © iAndrew 2016 - Forum software by © MyBB