I have ubuntu 18.04 with php 8.1.6 needed for Laravel9 system but want IspConfig also

Discussion in 'Installation/Configuration' started by ralphot, Jun 9, 2022.

  1. till

    till Super Moderator Staff Member ISPConfig Developer

    You should be able to tell composer which PHP version to use:

    php8.1 -f /usr/local/bin/composer ..........
     
  2. ralphot

    ralphot Member

    Yeah, maybe, I'll check that.
     
  3. ralphot

    ralphot Member

    Tried that and :
    /usr/bin/php8.1 /usr/local/bin/composer update
    but no success.
    Have to go through these:
    update-alternatives --config php,
    update-alternatives --config php-cgi and
    service apache2 restart
    to use one or the other.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    See the command I posted which is different from your command, you removed the -f commandline option.
     
  5. ralphot

    ralphot Member

    /usr/bin/php8.1 -f /usr/local/bin/composer update
    Didn't help, sorry.
    In browser:
    Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0".
     
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Are you running these commands as user root or as the user of that website?
     
  7. ralphot

    ralphot Member

    Running as user root, how else?
     
  8. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    As user of that website. Then you would get the PHP version assigned to that website. In addition you would avoid all kinds of breakage caused by installing stuff on website as root user.
     
  9. ralphot

    ralphot Member

    I don't really understand, it's located here
    /var/www/shoot.ddnsfree.com/web or
    /var/www/clients/client2/web3/web
    How can I be a user of that?
     
  10. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    By creating a user for that website. Use ISPConfig panel. See ISPConfig Manual 3.1 chapter 4.6.4 Command Line.
     
  11. ralphot

    ralphot Member

    Aha, ok, sounds like a good idea. Will try that. Thanks
     
  12. ralphot

    ralphot Member

    Ok, I have created a Webdav-User and put http://shoot.ddnsfree.com:80/webdav/web in the browser and a login form comes up. But don't know how to login. Don't know what username should be used? ralphot1 as it says in ispconfig but won't work
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess @Taleman meant to create a shell user, a webdav user is just a storage user for the webdav folder, it can neither run programs nor can he access the website.
     
    ralphot likes this.
  14. ralphot

    ralphot Member

    Ok. Will check that out. Thanks.
     
  15. ralphot

    ralphot Member

    SOLVED
    I have rebuilt my server to Ubuntu 20.04. I have also got both IspConfig and phpmyadmin to work together with my Laravel 9 virtual host. What was needed was this:
    <FilesMatch \.php$>
    SetHandler "proxy:unix:/run/php/php8.0-fpm.sock|fcgi://localhost"
    </FilesMatch>
    in the vhost file. So now everything works like charm :)
    Have php7.4 and 8.0
    Thanks all for your help.
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    In the vhost file of that website where you installed laravel to? If yes, then PHP runs under the wrong user now and you opened a security hole. To fix that, undo the change in the vhost file, then login to ispconfig, go to site settings, ensure that suexec checkbox is enabled, choose PHP mode php-fpm and select PHP 8.0 in the PHP version selector.
     
  17. ralphot

    ralphot Member

    Ok, will do that, thanks.
     
  18. ralphot

    ralphot Member

    can not choose php8.0, only default can be chosen.

    Well, there is a red circle with 2 in it still, have to wait for that first
     
  19. ralphot

    ralphot Member

    Still blinking with a 2, how long will it take?
     
  20. ralphot

    ralphot Member

    Everytime I do a change in IspConfig I got the red circle adding 1 to it. What's happening?
     

Share This Page