Search found 4 matches
Re: exec Path
I have discovered 'safe mode' on php needs to be set to off for exec to work. I now get a permissions error which I will follow up on. Thanks again for your help.
Re: exec Path
Thanks again for helping
Regardless of path this returns an empty array and a screen output of 1.
$strPDF = $_SERVER['DOCUMENT_ROOT']."/imageTest.php";
$array=array();
echo "<pre>";
exec("/usr/local/bin/convert $strPDF -colorspace RGB -geometry 1024 output.png 2>&1", $array);
echo "<br>".print_r ...
Regardless of path this returns an empty array and a screen output of 1.
$strPDF = $_SERVER['DOCUMENT_ROOT']."/imageTest.php";
$array=array();
echo "<pre>";
exec("/usr/local/bin/convert $strPDF -colorspace RGB -geometry 1024 output.png 2>&1", $array);
echo "<br>".print_r ...
Re: exec Path
Thanks for the path advice I have used both:
But
$strPDF = $_SERVER['DOCUMENT_ROOT']."pdfTest.pdf";
exec("/usr/local/bin/convert $strPDF -colorspace RGB -geometry 1024 output.png");
print "finished";
gives
finished
But output.png is not generated
How know what exec is returning as an error ...
But
$strPDF = $_SERVER['DOCUMENT_ROOT']."pdfTest.pdf";
exec("/usr/local/bin/convert $strPDF -colorspace RGB -geometry 1024 output.png");
print "finished";
gives
finished
But output.png is not generated
How know what exec is returning as an error ...
exec Path
My admin installed Ghostscript and ImageMagik which I am told is at /usr/bin (eg /usr/bin/convert). As I am converting pdf to png, jpegs ect what would my full exec line be?
I found this but surely the path has to be included
<?php
//the path to the PDF file
$strPDF = "my_pdf.pdf";
exec ...
I found this but surely the path has to be included
<?php
//the path to the PDF file
$strPDF = "my_pdf.pdf";
exec ...