• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Binary (wkhtmltopdf) not found / executable

Primate

New Pleskian
Hello, good morning.
I have a problem with a system plugin that I am not able to use in a web; The plugin is wkhtmltopdf, which is saved in /usr/bin/wkhtmltopdf but from the web I don't have access. It is worth mentioning that this website was fully functional before migrating it to the new server with plesk. I have tried to change the permissions in that folder, and even to put it in another one with chmod 777.

Error returned by cakePhp:
is_executable(): open_basedir restriction in effect. File(/usr/bin/wkhtmltopdf) is not within the allowed path(s): (/var/www/vhosts/my_domain/:/tmp/) [ROOT/vendor/friendsofcake/cakepdf/src/Pdf/Engine/WkHtmlToPdfEngine.php, line 110]

wkhtmltopdf binary is not found or not executable: /usr/bin/wkhtmltopdf
I think that I'm missing something, Help T_T (I'm new with plesk)
 
Hello, good morning.
I have a problem with a system plugin that I am not able to use in a web; The plugin is wkhtmltopdf, which is saved in /usr/bin/wkhtmltopdf but from the web I don't have access. It is worth mentioning that this website was fully functional before migrating it to the new server with plesk. I have tried to change the permissions in that folder, and even to put it in another one with chmod 777.

Error returned by cakePhp:
is_executable(): open_basedir restriction in effect. File(/usr/bin/wkhtmltopdf) is not within the allowed path(s): (/var/www/vhosts/my_domain/:/tmp/) [ROOT/vendor/friendsofcake/cakepdf/src/Pdf/Engine/WkHtmlToPdfEngine.php, line 110]

wkhtmltopdf binary is not found or not executable: /usr/bin/wkhtmltopdf
I think that I'm missing something, Help T_T (I'm new with plesk)
you have clearly an open_basedir problem... your authorized path for this domain are /var/www/vhosts/my_domain/:/tmp/ (that is the normal path) and you are trying to access to an outside binary path. You must change your openbasedir or disable it, in anycase, it's very dangerous to give to an website, the ability to access to this binary directory!!!! You must understand what you are doing before.
 
you have clearly an open_basedir problem... your authorized path for this domain are /var/www/vhosts/my_domain/:/tmp/ (that is the normal path) and you are trying to access to an outside binary path. You must change your openbasedir or disable it, in anycase, it's very dangerous to give to an website, the ability to access to this binary directory!!!! You must understand what you are doing before.

but I copied the binary in / var / www / vhosts / my_domain / tmp /bin
and have the same problem

wkhtmltopdf binary is not found or not executable
 
i put de binary in
/var/www/vhosts/mydomain.es/tmp/bin
to solve :
Error returned by cakePhp:
is_executable(): open_basedir restriction in effect. File(/usr/bin/wkhtmltopdf) is not within the allowed path(s): (/var/www/vhosts/my_domain/:/tmp/) [ROOT/vendor/friendsofcake/cakepdf/src/Pdf/Engine/WkHtmlToPdfEngine.php, line 110]

then
I tried with
'binary' => 'bin/wkhtmltopdf',
'binary' => '/bin/wkhtmltopdf',
'binary' => 'tmp/bin/wkhtmltopdf',
'binary' => '/tmp/bin/wkhtmltopdf',



i tried with this 2 option :
{DOCROOT}{/}{:}{TMP}{/}
{WEBSPACEROOT}{/}{:}{TMP}{/}

only worked with option none and the path :

'binary' => '/usr/local/bin/wkhtmltopdf';
 
i put de binary in
/var/www/vhosts/mydomain.es/tmp/bin
to solve :
Error returned by cakePhp:
is_executable(): open_basedir restriction in effect. File(/usr/bin/wkhtmltopdf) is not within the allowed path(s): (/var/www/vhosts/my_domain/:/tmp/) [ROOT/vendor/friendsofcake/cakepdf/src/Pdf/Engine/WkHtmlToPdfEngine.php, line 110]

then
I tried with
'binary' => 'bin/wkhtmltopdf',
'binary' => '/bin/wkhtmltopdf',
'binary' => 'tmp/bin/wkhtmltopdf',
'binary' => '/tmp/bin/wkhtmltopdf',



i tried with this 2 option :
{DOCROOT}{/}{:}{TMP}{/}
{WEBSPACEROOT}{/}{:}{TMP}{/}

only worked with option none and the path :

'binary' => '/usr/local/bin/wkhtmltopdf';
With correct /var/www/vhosts/my_domain/tmp/bin path, it should work as open_basedir include /var/www/vhosts/my_domain
 
With correct /var/www/vhosts/my_domain/tmp/bin path, it should work as open_basedir include /var/www/vhosts/my_domain
Thanks a lot, with the absolute path it works . (/var/www/vhosts/my_domain/tmp/bin)
and ($_SERVER["DOCUMENT_ROOT"].'/tmp/bin/wkhtmltopdf') works to.


I thought that script execution used the documentroot as root
 
Back
Top