Search found 4 matches

by mssbcons
2012-07-10T02:53:33-07:00
Forum: Users
Topic: exec Path
Replies: 5
Views: 12198

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.
by mssbcons
2012-07-08T03:18:42-07:00
Forum: Users
Topic: exec Path
Replies: 5
Views: 12198

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 ...
by mssbcons
2012-07-07T08:50:08-07:00
Forum: Users
Topic: exec Path
Replies: 5
Views: 12198

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 ...
by mssbcons
2012-07-06T06:21:10-07:00
Forum: Users
Topic: exec Path
Replies: 5
Views: 12198

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 ...