Phpword: Installing without composer

Created on 19 Apr 2016  路  10Comments  路  Source: PHPOffice/PHPWord

Tell me please. How to install without using the composer PHPword?

All 10 comments

+1

+1

+1

What's your problem with composer?
With composer it's easier to manage updates from library.
It's not recommendable, install without composer.

Hi,
I know that composer is a better way to install and manage libraries,
but due to host limitation, I doesn't have ssh access to my website (only ftp access),
therefore, I'm not able install composer nor install composer libraries.
All I can do is to drag and drop files and manage everything manually
(which might not be the best way, I admit, but it's the only one for me)
Regards

Arnaud

Dude you need to get off your shitty provider! asap. There are so many cool cloud offerings out there that give you root access to vm machines. Choose one. :)

I have my reason to keep this provider (quite good quality service, no need of credit card/paypal or any internet banking, nice privacy politics). I have also some budget limitation which forbid me to add the ssh option with the same provider.
Maybe I'm the only one in this case, maybe not.

(also sorry for possible confusion coming from my bad english)

Anyway, the ugly workaround I have found is to install PHPWord on my local machine using composer, then paste it on the server. It works (my local configuration is the same as the one of the website).

Also in the case that you're building add-ons for software that requires distributing.

It's very simple though.

Download PHPWord and run composer install on your local machine in the folder. Rename the folder from say PHPWord-0.13.0 to PHPWord and put it into your project (in my case, this was lib/PHPWord.

Then you can include it like:

include("lib/PHPWord/bootstrap.php");

The size of this library was 130mb for me - just take note of that!

Tell me please. How to install without using the composer PHPword?

If the problem is about the "slowness" of Composer then all you need is to install a plugin as stated in this stackoverflow answer. I hope it helps for those who got frustrated.

Was this page helpful?
0 / 5 - 0 ratings