Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. LAMP
  3. Using PHP-CLI 8.1 as default

Using PHP-CLI 8.1 as default

Scheduled Pinned Locked Moved LAMP
4 Posts 2 Posters 757 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • FoksVHoxF Offline
      FoksVHoxF Offline
      FoksVHox
      wrote on last edited by
      #1

      Hello

      Would it be possible to move the PHP CLI up to php 8.1? So we don't have to use php8.1 as a command? This would be very useful for composer projects.

      girishG 1 Reply Last reply
      0
      • FoksVHoxF FoksVHox

        Hello

        Would it be possible to move the PHP CLI up to php 8.1? So we don't have to use php8.1 as a command? This would be very useful for composer projects.

        girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #2

        @FoksVHox I think you can set alias php=php8.1 no? You can put it in /app/data/.bashrc which makes it sourced in Web Terminal .

        FoksVHoxF 1 Reply Last reply
        0
        • girishG girish

          @FoksVHox I think you can set alias php=php8.1 no? You can put it in /app/data/.bashrc which makes it sourced in Web Terminal .

          FoksVHoxF Offline
          FoksVHoxF Offline
          FoksVHox
          wrote on last edited by FoksVHox
          #3

          @girish said in Using PHP-CLI 8.1 as default:

          alias php=php8.1

          I wasn't aware that you had to create the /app/data/.bashrc, which resolved it. However, when using composer scripts (such as you do in Laravel projects) it'll use the 7.4.30 version instead of the aliased one.

          girishG 1 Reply Last reply
          0
          • FoksVHoxF FoksVHox

            @girish said in Using PHP-CLI 8.1 as default:

            alias php=php8.1

            I wasn't aware that you had to create the /app/data/.bashrc, which resolved it. However, when using composer scripts (such as you do in Laravel projects) it'll use the 7.4.30 version instead of the aliased one.

            girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by
            #4

            @FoksVHox I am not an expert on laravel, but can you point me to what issue one hits here because the php binary is still pointing to 7.4? Currently, it is difficult to create a package where the php binary is dynamic.

            Are you refering to some issue like https://stackoverflow.com/questions/32750250/tell-composer-to-use-different-php-version ?

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Bookmarks
              • Search