- Server operating system version
- CentOS Linux 7.9.2009 (Core)
- Plesk version and microupdate number
- Plesk Obsidian v18.0.55_build1800230919.07 os_CentOS 7
Hello,
I'm trying to install the GoCardless library into a site in my Plesk server.
The instructions say to try this from the command line having cd'd to the root directory of the site in question:
However that gets me this:
So next up I tried uploading the composer.json that's listed in github, using the Plesk Composer GUI.
For completeness, that looks like this:
After that 'something' happened in that the vendor directory on my site changed. However when I try the test script
So that's not a success either. Am I using the Plesk composer uploader right? Am I supposed to be doing something other than uploading the composer.json file?
I'm arguably the wrong man for the job as I'm new to Plesk, new to GoCardless and new to PHP Composer. Yet here we are.
I'd certainly appreciate any help.
I'm trying to install the GoCardless library into a site in my Plesk server.
The instructions say to try this from the command line having cd'd to the root directory of the site in question:
composer require gocardless/gocardless-pro
However that gets me this:
/usr/bin/env: php: No such file or directory
So next up I tried uploading the composer.json that's listed in github, using the Plesk Composer GUI.
For completeness, that looks like this:
{
"name": "gocardless/gocardless-pro",
"description": "GoCardless Pro PHP Client Library",
"version": "5.3.0",
"keywords": [
"gocardless",
"direct debit",
"api"
],
"homepage": "Online Payment Processing Solution",
"license": "MIT",
"authors": [
{
"name": "GoCardless and contributors",
"homepage": "Contributors to gocardless/gocardless-pro-php"
}
],
"require": {
"php": ">=8.1",
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"guzzlehttp/guzzle": "^7.4"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^3.6",
"php-coveralls/php-coveralls": "^2.4"
},
"autoload": {
"psr-4": {
"GoCardlessPro\\" : "lib/"
}
},
"autoload-dev": {
"psr-4": {
"GoCardlessPro\\": "tests/"
}
}
}
After that 'something' happened in that the vendor directory on my site changed. However when I try the test script
require 'vendor/autoload.php
$client = new \GoCardlessPro\Client(
...
I get this error:AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Class "GoCardlessPro\\Client" not found in /var/www/vhosts/0maths.com/httpdocs/test.php:9\nStack trace:\n#0 {main}\n thrown in /var/www/vhosts/0maths.com/httpdocs/test.php on line 9'
So that's not a success either. Am I using the Plesk composer uploader right? Am I supposed to be doing something other than uploading the composer.json file?
I'm arguably the wrong man for the job as I'm new to Plesk, new to GoCardless and new to PHP Composer. Yet here we are.
I'd certainly appreciate any help.