Reply
Member
Posts: 1
Registered: ‎10-22-2015

PHP SDK setup issue

I am trying to install the SDK. 

I downloaded it from github.

When I run autoload.php, classmap.php tries to load files from a "vendor" subfolder which does not even exist (not present in the download)

 

Any help will be greatly appreciated.

 

Juan

 

Member
Posts: 3
Registered: ‎10-21-2015

Re: PHP SDK setup issue

I just went through this myself a few days ago. Yes I'm a novice.

 

It's all more involved than it seems. You pretty much HAVE to use Composer. Composer will get tons of extraneous files NOT included in the SDK and will create a vendor subfolder for you within the SDK on your server.

 

Change that autoload.php require to point to the SDK. Mine is:

 

require 'anet_php_sdk/vendor/autoload.php'; 

 

I downloaded the SDK, and renamed the master folder to anet_php_sdk. As I said, vendor won't be in there until you run Composer. When I ran Composer, it required me to get a key from Github (free, and relatively easy). It will download a ton, then stop and ask you for the key. Just type it in and it'll store the key on the server and finish.

 

If you need more help, let me know. I wish there was someone to help me when I went through it. Support was a little "short" with my questions. Everyone's a newb at some point!

 

Sam