Hi all,
I am trying to run Prince 7.1 via PHP on a OSX system with MAMP, but it does not seem to work. The error message I am getting is:
"Fatal error: Class 'Prince' not found in /Users/...."
with the PHP code:
I've already looked around the forums and the un-commenting of two lines in envars did not solve the problem. As you can see in the code i've already tried a passthru command and this nicely returns the correct version in prince.log.
Whatever I do, I get the same message that Class prince is not found.
I hope that someone can help me!
Regards,
Wout
Edit: I'm using MAMP 1.9.4 with PHP 5.3.2, PHP 5.2.13 also didn't work..
I am trying to run Prince 7.1 via PHP on a OSX system with MAMP, but it does not seem to work. The error message I am getting is:
"Fatal error: Class 'Prince' not found in /Users/...."
with the PHP code:
<?php
$prince = new Prince("/usr/local/bin/prince");
include ('prince.php');
$text1 = $_REQUEST['text1'];
//passthru ('/usr/local/bin/prince --version > /tmp/prince.log 2>&1');
header('Content-Type: application/pdf');
header('Content-Disposition: attachment; filename="foo.pdf"');
convert_string_to_passthru($text1);
?>
I've already looked around the forums and the un-commenting of two lines in envars did not solve the problem. As you can see in the code i've already tried a passthru command and this nicely returns the correct version in prince.log.
Whatever I do, I get the same message that Class prince is not found.
I hope that someone can help me!
Regards,
Wout
Edit: I'm using MAMP 1.9.4 with PHP 5.3.2, PHP 5.2.13 also didn't work..