Jump to content
Froxlor Forum
  • 0

composer JSON-RPC PHP


Go to solution Solved by tt33tt,

Question

Hallo alle zusammen,

ich würde gerne auf eine API von Limesurvey zurückgreifen. Dafür muss ich installieren: https://github.com/weberhofer/jsonrpcphp

Kann ich in die composer.json einfach so hinzufügen? Ist das mit Froxlor kompatibel?

Das readme zeigt mir diese beiden Möglichkeiten:

To install

composer require weberhofer/jsonrpcphp

or add this to your composer.json, and composer update

{
    "require": {
        "weberhofer/jsonrpcphp": "~2"
    }
}
Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

OK, danke!

Dazu muss ich entsprechend hier einfach die Befehle ausführen https://getcomposer.org/download/

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '48e3236262b34d30969dca3c37281b3b4bbe3221bda826ac6a9a62d6444cdb0dcd0615698a5cbe587c3f0fe57a54d8f5') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

Aber in das root-Directory macht das kein Sinn. Muss ich das in der jeweiligen Domäne ausführen oder in irgendeiner PHP-Bibliothek, damit alle Domänen darauf zugreifen können?

Das kann ich dann sicherlich auch für die Froxlor-API benutzen.

Link to post
Share on other sites
  • 1

Öhm, Google bitte erstmal was Composer ist und wie das funktioniert...und k.a. was du da vorhast, aber du brauchst kein Composer um die froxlor api zu nutzen (außer du nutzt die gut version, dann brauchst du das natürlich um Abhängigkeiten zu installieren - im Archiv ist alles vorhanden)

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Similar Content

    • By d00p
      Dear Froxlor Community,
      I am proud to finally release the stable version of a new API based froxlor. Due to massive internal improvements and changes in the core (almost 600 commits since 0.9.40.1) users are now able to list/create/edit/delete resources and entities of froxlor via API (requires activation of api-usage in the settings and a user based API-key). The froxlor frontend itself uses the API backend too.
      Froxlor now uses composer to include some of its requirements like phpMailer, Logger, IdnaConvert and TwoFactorAuth libraries. All required files will be included in the official tarball so you do not need to worry about installing and using composer (only if you are using / testing the git-master, see https://github.com/Froxlor/Froxlor/wiki/Install-froxlor-from-git-sources).
      Most important changes:
      froxlor now requires at least php-7.0 or newer, php-5.6 is no longer supported because of its EOL almost a year ago you can access data via API, for more information see https://api.froxlor.org/doc/. An example can be found here: https://github.com/Froxlor/Froxlor/tree/master/doc/example PHPUnit tested API backend with MySQL 5.6, 5.7 and 8 as well as MariaDB 10.3 and 10.4, see https://travis-ci.com/Froxlor/Froxlor compatibility for MySQL8 2FA (two-factor-authentication) for admins/resellers/customers (email or authenticator app) all froxlor-database tables will automatically be converted to the InnoDB engine added support for Debian 10 (buster) and Ubuntu 18.04 (bionic beaver) implemented Let's Encrypt via acme.sh - Note: all your current Let's Encrypt certificates will be removed and re-created due to another structure customizable error/access log handling for webserver (format, level, pipe-to-script, etc.) deprecated Debian 7 (wheezy) and Ubuntu 14.04 (trusty tahr) support dropped support for Ubuntu 12.04 (precise pangolin) dropped ticketsystem Changes in 0.10.1:
      allow/disallow API access on a per-customer base new API parameters for Admins.add(), Admins.update(), Customers.add() and Customers.update() bool $api_allowed (default: false for Customers, true for Admins) add explicit tlsv1.3 ciphersuite setting fixed wrong behaviour in Ftps.add() if customer is newly created and setting customer.ftpatdomain is true added expiration date to SSL certificates loaded via API request fixed wrong return in Certificates.get() if given domain does not have a certificate allow setting http2 flag for (sub)domains in customer view, fixes #725 Changes in 0.10.2:
      force Let's Encrypt ACMEv2 API, fixed #728 added default-ssl-vhost settings and optionally allow including of non-ssl default-vhost settings, fixes #727 new API parameters for Domains.add() and Domains.update() string $ssl_specialsettings bool $include_specialsettings bool $dont_use_default_ssl_ipandport_if_empty removed API parameters in Domains.add() bool $use_default_ssl_ipandport_if_empty new API parameters for IpsAndPorts.add() and IpsAndPorts.update() string $ssl_specialsettings bool $include_specialsettings string $ssl_default_vhostconf_domain bool $include_default_vhostconf_domain implemented DomainZones.listing() to return custom stored dns entries fix registration and termination date to flip between empty-value and 0000-00-00 Changes in 0.10.3:
      fallback to /tmp/froxlor.log if file-log is activated but no file given or not writeable; fixes #737 added tls-settings per domain for admins with change_serversettings-flag set; fixes #519 new API parameter for Domains.add() and Domains.update() bool $override_tls (default: false) array $ssl_protocols string $ssl_cipher_list string $tlsv13_cipher_list preserve downward compatibility for 0.10.1 updaters regarding specialsettings for ssl-enabled domains; fixes #739 Changes in 0.10.4:
      added support for CIDR/netmask in mysql-access-hosts; fixes #564 fixed invalid handling of escape-sequences in api-endpoint, fixes #746 fixed an issue with adding the default ftp user for new customer when added by admin/reseller with no ftp-resources; fixes #741 fixed nginx configuration issue with fastcgi_split_path_info option; fixes #744 Changes in 0.10.5:
      bugfix release due to errors in Let's Encrypt re-new check; fixes #747 Changes in 0.10.6:
      introducing new API parameters sql_search, sql_limit, sql_offset, sql_orderby for almost all listing() calls introducing new API method listingCount() for almost all modules to return the total number of entities available changed behavior of SubDomains.listing() to return all fields from the domain table instead of the limited ones for customers when called as admin added new API module SysLog to query froxlor logs according to permission optimized panel_admins and panel_customers table to avoid mysql/mariadb warning: Row size too large (> 8126); fixes #752 corrected update of hosting plans via interface; fixes #753 implemented API method EmailForwarders.listing(); fixes #754 fixed parameters defaults for Domains.update() parameters ssl_ipandports and add new parameter (see below); fixes #756 new API parameters for Domains.update() bool $remove_ssl_ipandport Changes in 0.10.7:
      corrected behavior when changing mysql-access-host values; fixes #758 fix UI error "API keys not accessable due to missing Paging-class" fix trauncating of SysLog using SysLog.delete() corrected UI issue of incorrect listing of domains for customers and admin, fixes #759 corrected ordering of listings in UI regarding pagination added new settings to set default value of domain-edit-settings 'Apply specialsettings to all subdomains' and 'Apply php-config to all subdomains' corrected vhost-merging of specialsettings in nginx; fixes #757 Changes in 0.10.8:
      fix duplicate domain entries in customer-domain-list when domain has aliases fix searching for alias-domains by link in customer_domains use correct apiendpoint for lets encrypt; pass debug-flag onto acme.sh; fixes #762 fix removing of ssl-ip-relation to domain if no ssl-ip is selected via interface Debian package: Move mysql server dependency to redommends; fixes #761 Changes in 0.10.9:
      fix SQL error when searching for certificates by domainname, fixes #764 fix ordering of listings when natural sorting is activated, fixes #765 check for valid result when reading database usage from information_schema; fixes #766 Changes in 0.10.10:
      add new API function Froxlor.generatePassword() to return a random password based on froxlor settings regarding min-length, included characters, etc.; fixes #768 fix mysql8 issue with group by and sorting within; fixes #774 add new 'ssl-enabled' flag for domains and subdomains so ssl can be deactivated (by a customer too) even if there are ssl-ip/ports assigned; introduce new honorcipherorder and sessiontickets flags for more control over ssl-related settings on a per domain base (admin only); fixes #767 and #769 new API parameters for Domains.add() and Domains.update() bool $sslenabled bool $honorcipherorder bool $sessiontickets new API parameters for SubDomains.add() and SubDomains.update() bool $sslenabled new API method Froxlor.generatePassword() Changes in 0.10.11:
      apply 'notryfiles', 'writeaccesslog' and 'writeerrorlog' flags to subdomains when editing a domain fix SysLog.delete(), SysLog.listing() and SysLog.listingCount() whencalled as admin/reseller withouth customers_see_all permission add option to disable SSL sessiontickets globally for older systems, fixes #784 ability to add custom config to PHPFPM version, fixes #643 new API parameters for FpmDaemons.add() and FpmDaemons.update() string $custom_config Changes in 0.10.12:
      allow using more advanced LogFormat for webserver and awstats fix issue in PhpHelper::trimArray() returning an empty array, fixes #751 fix wrong behaviour of Emails.update() which allowed setting iscatchall-flag for more than one address of the same domain fix writable-check of froxlor-logfile if logfile did not exist Changes in 0.10.13:
      validate nameserver ip-addresses for binds allow-transfer block; fixes #791 fix IpsAndPorts when checking for system.ipaddress in update() and delete() fix Domains.update() if called as admin/reseller without change_serversettings privileges, thx to rseffner fix the case that the spf record is not inserted with its quotes, and so the condition fails and 2 spf records are inserted in the domain fix wrongly initialized resource-usage when re-calculating it; fixes #797 update php-fpm defaults; update paths for current stable php-7.3; read froxlor default php.ini from file rather then using phpconfig with id=1; fixes #796 Changes in 0.10.14:
      require set password complexity for admins too when resetting password; display correct error message if password complexity is not satisfied do not require enabled vhost-container for froxlor-vhost to change sslsessiontickets-setting disable sslsessiontickets-option in domain-add/edit if globally disabled in the settings fix listing of customer email addresses if 'domain' section is hidden via settings, fixes #803 add Froxlor.integrityCheck() API call to externally run integrity/consistency check, fixes #801 new API method Froxlor.integrityCheck() make customer firstname,name,company and customer-no available for all templates; fixes #808 store ace-string of domain besides idn-converted string to have correct sorting in the frontend; fixes #809 allow private ip ranges in ips-and-ports as some configurations require that; fixes #802 Changes in 0.10.15:
      fixed temporary userdata file creation results in an empty file on installation; fixes #815 Changes in 0.10.16:
      remove ssl-certificates connected to domains that are being deleted when deleting a customer; fixes #818 fix removing ip address if ip is set as system-ipaddress but there are other entries of that ip with a different port fixed parsing due to changes in dovecots default mail_log_prefix restructure acmesh implementation and let acme.sh take care of renewing the certificates itself; fixes #792, fixes #816 Double check whether installation of acme.sh worked when not installed yet and do not continue if not; fixes #823 add optional dns validation for let's encrypt activated domains; fixes #817 let send-to-alternative-email be optional if no address is given instead of displaying error that the email address is invalid; fixes #829 Changes in 0.10.17:
      fix minor issue with let's encrypt and uppercase letters in domainnames validate we're using the required minimum version of php in frontend and cron, not only on installation adding email addresses via webinterface results in error if domains are hidden from customers; fixes #803 fix including of language-strings in reports-cron, fixes #836 Changes in 0.10.18:
      remove TLSv1 from the list of default SSL-protocols marked Ubuntu 16.04 configuration templates as deprecated removed Ubuntu 14.04 configuration templates added configuration-templates for Ubuntu 20.04 added configuration-templates for CentOS 8 added distribution detection on installation and OS possibility for specific setting-adjustments (for later use) read certificate data folder from acme.sh.env file, fixes #846 corrected API docs, fixes #856 and #857 Changes in 0.10.19:
      return full domain object on Domains.update() call, fixes #861 add missing parmeter customerid for SubDomains.delete() which is required when called as admin; fixes #862 check for possible CNAME overrides of A/AAAA record in dns-editor, fixes #864 corrected timestamp-check for let's encrypt filesystem sync, fixes #865 Changes in 0.10.20:
      fix permanent rebuilding of vhost configs when using let's encrypt updated jquery library, fixes #872 unset any limit as we do not have pagination when showing search-results, fixes #869 fix missing query-parameters for IpsAndPorts.listing() when using sql_search show current count of results besides total count in listings, fixes #869 remove underscore from dkim-selector, refs #619 use overridden limit_extensions and idle_timeout values in vhost config when using fpm and not mod_proxy Download: 0.10.20

      Note: Debian/Ubuntu packages are available as of 21th of October 2019 - Note that there are no packages for oldoldstable (jessie) anymore

      Visit http://www.froxlor.org or join our IRC channel #froxlor on irc.freenode.net for support, help, participation or just a chat

      Thank you,
      d00p
    • By d00p
      Dear Froxlor Commuity,
      finally - the first release candidate of our new API based version 0.10.0! A lot of work has gone into this, many internal changes (you might miss any frontend-changes, but be patient...) most importantly the API backend which not only is used by froxlor frontend itself but can also be uses from within your website/scripts/etc.
      Froxlor now uses composer to include some of its requirements like phpMailer, Logger, IdnaConvert and TwoFactorAuth libraries.
      Here are some of the new features besides API that found their way in:
      - 2FA / TwoFactor Authentication for accounts - MySQL8 compatibility - new implementation of Let's Encrypt (acme.sh) - customizable error/access log handling for webserver (format, level, pipe-to-script, etc.) - lots and lots of bugfixes and small enhancements You can see all changes on Github at https://github.com/Froxlor/Froxlor/compare/0.9.40.1...0.10.0-rc2
      Download: 0.10.0-rc2

      Note: There will be no Debian packages for release-candidates.

      Visit http://www.froxlor.org or join our IRC channel #froxlor on irc.freenode.net.

      Thank you,
      d00p
    • By H4nSolo
      Hallöchen zusammen,
      ich hätte mal eine Frage bezüglich Froxlor und Cloudflare.
       
      Da einige die Froxlor benutzen, bestimmt auch bei cloudflare ihre domain eingetragen haben, stellt sich mir die Frage ob man dies nicht gleich auch mit cloudflare verbinden kann um so seine subdomains / Domains miteinzurichten, ohne sich immer zusätzlich bei cloudflare anzumelden.

      Cloudflare bringt ja von Haus aus eine API mit womit man sich auch über Scripte und einen Authentifikations Key extern anmelden kann.
      Cloudflare API: https://api.cloudflare.com/
       
      Ich für meinen Teil würde es Prima finden wenn zum Beispiel Kunden ihren Login Key eintragen, und damit bequem auch bei erstellung von subdomains gleichzeitig (sofern sie ihre Domain beim Cloudflare registriert haben) alles in einem abwickeltn können.
       
       
      Was haltet ihr von der Idee und könnte man es überhaubt verwirklichen für Froxlor?
       
      lg H4nSolo
    • By john doe
      Hello,
      I have a couple hundred e-mail accounts to create, is there a better way to do that than creating one account at a time? An API that I can use, or some batch mode?
       
      Thanks.
    • By v1ktor
      Hey guys, I like Froxlor and wanted to ask couple of easy questions to get a better understanding:
       
      1. I noticed in the forums, version 1 has been mentioned to have API as far back as 2010. Do you know when v1 might be coming out?
      2. Is it possible to create client accounts on Froxlor remotely without an API, maybe directly in database? I saw similar question and answer about sessions, but we don't need clients to access panel. Just to provision an account for them.
      3. Can Froxlor manage multiple servers from one panel?
       
      Great job on the platform!
       
      Thanks,
      Viktor
×
×
  • Create New...