Forum How do I...?

Unable to locate prince binary using PHP wrapper

rbrotherton
EDIT Accidentally posted to the wrong forum, move to 'How Do I...?'please.


I installed prince, here you can see Ubuntu telling me where the binary and library files are:

user@HOST:~$ whereis prince
prince: /usr/bin/prince /usr/lib/prince /usr/share/man/man1/prince.1.gz


Then running my PHP script, which thus far, looks like this:
<?php $prince = new Prince('/usr/bin/prince'); ?>


Results in the following output:
Fatal error: Class 'Prince' not found in /app/webroot/test/index.php on line 2


Any ideas why it cant find the binary, when it is obviously there? A permissions error perhaps? I'm not a linux expert but the binary appears to be enabled for anonymous execution:

user@HOST:/usr/bin$ ll | grep 'prince'
-rwxr-xr-x  1 root   root         49 Oct  8  2010 prince*


Thanks for any insight you can provide.

mikeday
The PHP error is that it cannot find the Prince class, so it isn't a problem with the binary. Have you included prince.php, from the PHP wrapper?
rbrotherton
Almost too embarrassed to reply to this....guess that's what happens when you're burnt out from the week at the end of Friday.

I'm an idiot, thanks Mike.
sohail.malik
I have a similar issue, I am running it on windows machine, prince.php is included and is saved in the web root directory as well but it give me, Help!!!

Fatal error: Uncaught Error: Class "Prince" not found in C:\xampp\htdocs\convert.php:5 Stack trace: #0 {main} thrown in C:\xampp\htdocs\convert.php on line 5
sohail.malik
Ignore me :) its sorted