3

I would like to install mPDF for use on my website. However, I don't own my own server, and am using shared web hosting. I can log in using FTP, but AFAIK I do not have access to a terminal nor root access on the server.

Is there some other way to install this thing? Maybe by just copying files over using FTP? I don't know a whole lot about Unix or Linux.

Here's what my FTP folder tree looks like:

enter image description here

There's more stuff at the bottom I didn't capture.

1
  • When you say "Simply unzip the files and subfolders" - from where? Which zip is being unzipped?
    – user104855
    Sep 24, 2019 at 1:02

1 Answer 1

3

To install mPDF root privileges are not required, FTP access will be sufficient and it should work fine on shared hosting environments. Simply unzip the files and subfolders and then copy them into a folder called mpdf, then you can use the mPDF library by using a line like require_once('mpdf/mpdf.php'); to load the functionality.

To clarify, mPDF is a number of PHP classes in .php files rather than a compiled binary module which must be loaded into the core PHP service/daemon. To PHP or webserver configuation changes will be required unless a prerequisite PHP module is not loaded or misconfigured.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.