Forum How do I...?

PHP - convert_string_to_file debugging

parisi
How do I debug the following:

$content = "<p>Hello</p>";
require_once 'prince.php';
$prince = new Prince('/usr/local/bin/prince');
$result = $prince->convert_string_to_file($content,"x.pdf" );

I get no errors but the pdf file is not produced. I have also tried it with a full path and still no file and no results.

How do I debug this futher?

Thanks,
Paul.

I am using Centos 6 x 64

Edited by parisi

parisi
I did try to process an html file from the command line and that does work.

Edited by parisi

mikeday
It should probably be /usr/bin/prince if you installed the CentOS RPM.
parisi
Nailed it - thanks so much! Nice to have such great support.