views:

23

answers:

1

Hi all,

I have an own webserver and for one of my clients I need to be able to search through PDF's. I've asked my hostingprovider to install the xPDF package. Now I've come to testing and I'm calling this line of code in a PHP script:

$content = shell_exec('/usr/local/bin/pdftotext test.pdf -');

The only thing is, I'm getting a NULL result with. So, my question, is there a way to validate if the program is really installed? Btw, I'm not even sure if the path is correct. I'm pretty new if it comes to having an own webserver. I've taken this example from : http://davidwalsh.name/read-pdf-doc-file-php

I hope someone can assist me with this one ;)

Thanks in advance!

Ben

A: 

If you have shell access, log in using SSH, and try

whereis pdftotext

if the only thing you get is a

pdftotext:

then it is most likely not (or not properly) installed.

Pekka
Thanks! I found it the path was incorrect. As I was trying your solution, the hostingprovider allready came with an answer telling me the path was wrong!
Ben Fransen