Problem to get my laravel 9 system work on vhost

Discussion in 'Installation/Configuration' started by ralphot, Aug 12, 2022.

  1. ralphot

    ralphot Member

    I have now struggled again with setting an alternative PHP version in IspConfig and this is what I have:
    https://imgur.com/a/WyC24vb. all pictures here.
    I'm getting the website to start but it shows only header and footer nothing else.
    With an older laravel7 system it works with php 7.4 but not this vers. 9
    I'm also not sure about all the settings for the additional PHP versions.
    Ubuntu 20.04 Apache2

    What can be the problem.
     
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    ahrasis likes this.
  3. ralphot

    ralphot Member

    I have done all that, did "add-apt-repository ppa:eek:ndrej/php", "apt upgrade", installed php 8.1 and checked all the folders that's used in IspConfig and they are all populated as they should I think. But still the website shows only the very first Laravel blade page with header and footer.
    So what now?
     
  4. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    unless you've overridden where the ondrej repo installs php by default on ubuntu, you need to change each instance of /opt/ in your ispconfig additional php settings to /etc/php/
    also i would not bother assigning the additional php to a particular client, just leave client blank, then any client account on that server could use that php version.
     
  5. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    Code:
    name:
    Server            <servername>
    Client
    PHP Name      PHP8.1
    fast-cgi settings:
    Path to the PHP FastCGI binary     /usr/bin/php-cgi8.1
    Path to the php.ini directory            /etc/php/8.1/cgi
    
    php-fpm settings:
    Path to the PHP-FPM init script          /etc/init.d/php8.1-fpm
    Path to the php.ini directory                /etc/php/8.1/fpm
    Path to the PHP-FPM pool directory   /etc/php/8.1/fpm/pool.d
    PHP-FPM socket directory
    
     
  6. ralphot

    ralphot Member

    Thanks, done all that, but now I'm getting:

    ERROR 503 - Service Unavailable!
    The following error occurred:
    The Service is not available at the moment due to a temporary overloading or maintenance of the server. Please try again later.
    Please contact the webmaster with any queries.
    So.......what now?

    I found this in ispconfig:
    Update Status (Server : boss2022)
    Conf php8.1-fpm (8.1.9-1+ubuntu20.04.1+deb.sury.org+1 ***** The main PPA for supported PHP versions with many PECL extensions *****:20.04/focal [amd64])
    What does it mean?

    Also when updating:
    Errors were encountered while processing:
    php8.1-fpm
    E: Sub-process /usr/bin/dpkg returned an error code (1)
     
    Last edited: Aug 16, 2022
  7. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    the update status is ok, that's just a list of what it's updated.

    did you previously manually install a version of php 8.1 in /opt?
    if so, that may need to be removed/purged first, and then try re-installing / updating php8.1 from the ondrej repo
     
  8. ralphot

    ralphot Member

    Thanks. I will remove 8.1 completely and then reinstall 8.1 and see what happens.
     
  9. ralphot

    ralphot Member

    I did all that and now the site starts up but as before the first blade-page only shows page-header and footer: https://imgur.com/IbNlPIn
    It's funny because a while ago I had the system up and working but I think with PHP8.0 at that time.
     
  10. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    maybe put a phpinfo.php into the public folder and try loading that, check it shows all the expected mods / conf is enabled and working.
     
  11. ralphot

    ralphot Member

    Thanks, you can check it out here: http://shoot.mywire.org/phpcheck.php

    Seems ok.
     
  12. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    can't see anything immediately wrong there.
    you have php8.0 on that server? installed from the ondrej repo?
    maybe set the website to use php8.0, see if laravel works properly again on there.
    if it does, compare all the configs between the two php versions, see if you can find anything different.
    if it doesn't, then maybe php is ok, maybe there's something off in the laravel config, maybe to docroot change needs to be accounted for in the laravel config.
     
  13. ralphot

    ralphot Member

    Ok. No at the moment I have only php7.4 and php8.1 installed. But I will try to install php8.0 as well and see if it works. Thanks.
     
  14. ralphot

    ralphot Member

    I have installed PHP8.0 and put a new PHP8.0 version in ispconfig but I'm getting the same result. So I will concentrate more on Laravel from here on.
    Thanks all for your help anyway.:)
     
  15. ralphot

    ralphot Member

    Ok, found out that the system in Laravel9 was to blame. I took another version in Laravel7 and upgraded it to Laravel9 and that works fine. Thanks all for your help.
     
    till likes this.

Share This Page