Zaffar Saffee
Zaffar Saffee

Reputation: 6305

passthru not working in pdftk

I am new so ssh and terminal commands I am installed pdftk on my web server (Linus Cent-Os dedicated virtual server) using the stack overflow.

Although got initially problems because all of my experience was GUI, but somehow following the instructions, I succeeded in installing pdftk

Now when I type command whereis pdftk

the response is

pdftk :/usr/bin/pdftk /usr/local/bin/pdftk/

when I was following the instructiion, the last step was to copy the folder to /usr/local/bin/ that went successful. now when I issue the command pdftk --version it runs successfully, returning the version info.

in my php, when I try to use this with

passthru('/usr/local/bin/pdftk --version')

nothis is displayed

can somebody guide me what Can I do?

Upvotes: 2

Views: 1815

Answers (2)

I had to set

safe_mode = Off

in /etc/php5/cli/php.ini, otherwise I only got

sh: /pdftk: No such file or directory.

Upvotes: 0

WebChemist
WebChemist

Reputation: 4411

does it work when you leave out local and just do:

<?php echo passthru('/usr/bin/pdftk --version'); ?>

tried it on my server, /usr/bin/ does display version data but /user/local/bin doesnt

Upvotes: 1

Related Questions