Results 1 to 5 of 5

Thread: API or script to change site PHP version

  1. #1
    Join Date
    Oct 2019
    Posts
    2

    API or script to change site PHP version

    I looked through the API docs and do not see a feature to allow change of site PHP version via command line or call. Is there a way to accomplish this task without the need to login to the panel via browser or manually modifying configuration files?

  2. #2
    Join Date
    Oct 2008
    Posts
    328
    This would be a great feature!! +1

  3. #3
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    13,796

  4. #4
    Join Date
    Oct 2019
    Posts
    2
    Though this requires either implementing in a script using the login credentials, am I correct? What we are looking for here is something similar to cPanel's command line API call that can be ran as root.
    --
    https://documentation.cpanel.net/dis...vhost_versions
    --

    What we would like to be able to do is simply issue a command via shell to change PHP version of a domain/vhost while logged in as root (or DA user) without the need to pass login credentials or create session or url to make an http request.

    Am I missing something here?

  5. #5
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    13,796
    Yes, API requires admin's credentials at minimum.

    For a CLI version you might check this one: https://github.com/poralix/directadm...main_phpver.sh written by me some time ago.

    Either modify it to fit your needs, or test and post your comments and suggestions on how to improve the script.
    Regards, Alex G.

    - Get the best commercial DirectAdmin support and hire me on poralix.com
    - Follow and like @Poralix on Facebook

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •