hcgcloud / pterodactyl-sdk

Pterodactyl Panel PHP SDK/API wrapper
https://hcgcloud.github.io/pterodactyl-sdk-docs/
MIT License
27 stars 25 forks source link

Internal Server Error #3

Closed proxene closed 5 years ago

proxene commented 5 years ago

Hello, I have a problem with your API. When I use it I get an internal server error.

require __DIR__.'/requests/api/vendor/autoload.php';
$pterodactyl = new \HCGCloud\Pterodactyl\Pterodactyl("XXXXXXXXXXXXX","https://mypanel.com");

    $user = $pterodactyl->createUser([
        "email" => 'test@test.com',
        "username" => 'TestUser',
        "first_name" => 'Test',
        "last_name" => 'User',
        "language" => 'en',
        "password" => '123456'
    ]);

Can you help me ? Thank you in advance

Best regards,

tyson239 commented 5 years ago

Have you followed the install instruction?

proxene commented 5 years ago

Yes of course. I don't have a particular error except maybe one.

Carbon 1 is deprecated, see how to migrate to Carbon 2.
https://carbon.nesbot.com/docs/#api-carbon-2
You can run './vendor/bin/upgrade-carbon' to get help in updating carbon and other frameworks and libraries that depend on it.

If the API is base on carbon 2 and I must execute the command to resolve my problem I have an error :

/usr/bin/composer: line 8: 24499 Killed                  "$COMPOSER_BIN" "$@"
PHP Fatal error:  Class 'Composer\Composer' not found in /var/www/mywebsite/api/vendor/nesbot/carbon/src/Carbon/Upgrade.php on line 131
tyson239 commented 5 years ago

seems not properly installed with composer.