Link to home
Create AccountLog in
Avatar of intoxicated_curveball
intoxicated_curveball

asked on

How to get this library to work load?

I want to load this library on my php page but I can't install composer on my hosting service.

https://github.com/vgrem/phpSPO
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Ask your hosting service to install the library for you.  My host does this for me all the time -- all it takes is a phone call!
Avatar of intoxicated_curveball
intoxicated_curveball

ASKER

I asked and they said no - it's shared hosting. Unfortunately I'm stuck with the corporately approved hosting provider.

How can I load this library without Composer?
Avatar of Scott Fell
I saw your Gig.  You don't need to use composer.  Just download the the git and upload to your hosting service.  

There are some libraries that are difficult to run without composer, this does not appear to be one of those.
Without composer, it looks like you would change the settings.php file to your own and include that https://github.com/vgrem/phpSPO/blob/master/examples/Settings.php
The Settings is just an array of variables. It doesn't load anything.

I already tried downloading, uploading to my server... I don't really know after that how to load it.

The vendor/autoload.php wants composer.

Note the examples all use autoload.php as well.
I can look at this tomorrow.   Another option I have done in the past is to run composer locally with the same file structure as my web server, then upload everything.  You don't have to have composer running on the web server. But the autoload created locally saves a lot of work.
ASKER CERTIFIED SOLUTION
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
This worked for me as well - I can connect and read the SP site. Though i have an issue adding items, I'll post another Q. So thanks.