Joomla not working after Additional PHP 5.6, 7.1, 7.2 and 7.3 install

Discussion in 'Installation/Configuration' started by Indieben, Nov 5, 2018.

  1. Indieben

    Indieben Member

    This topic started at https://www.howtoforge.com/tutorial...m-debian-packages-on-debian-8-and-9/#comments on 1 November 2018. Please would you kindly read Till's and my comments there first. Thank you.

    1. I installed the additional PHP versions above (as per the tutorial at the link above (above the comments));
    2. I followed the instructions to the letter (I did not understand how to edit the cronjob though).
    3. Joomla continues to work on PHP 7.0 but not on any of the more modern PHP Versions (7.1, 7.2, 7.3).
    4. I did install memcache as an optional extra in the tutorial but, after testing, this has no bearing (I changed the PHP settings within the config file to reflect the installation).
    5. The Joomla website simply reports "error" in the browser without further information.
    6. As recommended by Till, I have run off a PHP info report for all of the versions and saved these at the following links:
    6A) 7.0 - https://www.gbglaw.org.uk/phpissue/phpinfo70.pdf
    6B) 7.1 - https://www.gbglaw.org.uk/phpissue/phpinfo71.pdf
    6C) 7.2 - https://www.gbglaw.org.uk/phpissue/phpinfo72.pdf
    6D) 7.3 - https://www.gbglaw.org.uk/phpissue/phpinfo73.pdf
    7) Website Settings (ISPConfig Website Settings Panel) - https://www.gbglaw.org.uk/phpissue/websitesettings.pdf
    8) I have also enabled debug - this has produced the following error at https://www.gbglaw.org.uk :

    "Warning
    : session_start(): Failed to read session data: user (path: /var/www/clients/client2/web9/tmp) in /var/www/clients/client2/web9/web/libraries/joomla/session/handler/native.php on line 260
    Error: Failed to start application: Failed to start the session

    Thanks and Kind Regards,

    indieben.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if you altered PHP mode (e.g. from mod_php to another mode) or switched on/off suexec checkbox of the site beside switching php version. Try deleting the old session files in /var/www/clients/client2/web9/tmp/ folder.
     
  3. Indieben

    Indieben Member

    Hi Till,

    No, because as soon as I switch the website back to 7.0, it works fine.

    There are no files within the tmp folder.

    Thanks.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The suexec checkbox is enabled in that site?
     
  5. Indieben

    Indieben Member

    I turned it off, it made no difference - see, I had that on before to and the website immediately works when I change the environment back to PHP 7.0.

    I checked the log but there's nothing interesting in the Apache2 log or in the website log, just:

    [Mon Nov 05 18:24:06.236510 2018] [fcgid:warn] [pid 30248] [client 192.168.1.254:36078] mod_fcgid: stderr: PHP Warning: session_start(): Failed to read session data: user (path: /var/www/clients/client2/web9/tmp) in /var/www/clients/client2/web9/web/libraries/joomla/session/handler/native.php on line 260
    [email protected]:/var/www/gbglaw.org.uk/log#

    Thanks.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Suexec needs to be on.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Try using php-fpm mode instead and which permissions does the /var/www/clients/client2/web9/tmp directory has?
     
  8. Indieben

    Indieben Member

    Changing over the mode made no difference. In answer to your other question:

    [email protected]:/var/www/gbglaw.org.uk/log# ls -la /var/www/clients/client2/web9/tmp
    total 8
    drwxrwx--- 2 web9 client2 4096 Oct 21 20:11 .
    drwxr-xr-x 10 root root 4096 Apr 23 2018 ..
    [email protected]:/var/www/gbglaw.org.uk/log#

    Thanks :)
     
  9. Jesse Norell

    Jesse Norell Well-Known Member

    I've wondered a few times lately, is there ever a time when suexec should be off? I've seen many times when having it off broke things, and I don't remember a single time of anyone being told to turn it off, or someone having turned it off in order to fix things. Could it just be hidden from the interface and always enabled? Or at least make that the default, and people have to explicitly enable that settings in server config if it should be accessible for their particular install.

    Does anything in php open_basedir paths need added for your new php versions? I'd expect a different (or an additional) error if so, but it's worth checking.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, makes probably sense to hide or even remove it. I've planned to 'clean up' the website settings anyway for ISPConfig 3.2.
     
  11. Indieben

    Indieben Member

    Does anything in php open_basedir paths need added for your new php versions? I'd expect a different (or an additional) error if so, but it's worth checking.[/QUOTE]

    Hi Jesse,
    I'm not quite sure how to go about checking that? I think this might be some issue with the php.ini files or, alternatively, permissions.

    Till,

    What would you suggest next please?

    Thanks.
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Go to the options tab of that website, there you can see which web user and client group this site uses. Please post the username and group name that you find there and also the content of the open_basedir field.
     
  13. Indieben

    Indieben Member

    Hi Till,

    Linux User: web9
    Linux Group: client2

    and: /var/www/clients/client2/web9/web:/var/www/clients/client2/web9/private:/var/www/clients/client2/web9/tmp:/var/www/gbglaw.org.uk/web:/srv/www/gbglaw.org.uk/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/dev/random:/dev/urandom

    Thanks :)

    Currently set to PHP 7.2.
     
  14. Jesse Norell

    Jesse Norell Well-Known Member

    That should be ok for openbasedir, eg. as a comparison I have this on a 7.2 fpm site installed from the same tutorial:
    Code:
    /var/www/clients/client1/web3/web:/var/www/clients/client1/web3/private:/var/www/clients/client1/web3/tmp:/var/www/domain.tld/web:/srv/www/domain.tld/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/dev/random:/dev/urandom
     
  15. Jesse Norell

    Jesse Norell Well-Known Member

    If this helps any, this is the 7.2 specific installed packages from that same server:
    Code:
    # dpkg --list | grep php7.2 | awk '{print $2}'
    php7.2
    php7.2-bz2
    php7.2-cgi
    php7.2-cli
    php7.2-common
    php7.2-curl
    php7.2-fpm
    php7.2-gd
    php7.2-gmp
    php7.2-imap
    php7.2-intl
    php7.2-json
    php7.2-mbstring
    php7.2-mysql
    php7.2-opcache
    php7.2-pspell
    php7.2-readline
    php7.2-recode
    php7.2-soap
    php7.2-sqlite3
    php7.2-tidy
    php7.2-xml
    php7.2-xmlrpc
    php7.2-xsl
    php7.2-zip
    
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the output of:

    ls -la /var/www/clients/client2/web9/tmp
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    And you might test if the tmp directory is writable for the web user by adding a .php file in the website with this content:

    <?php
    touch('/var/www/clients/client2/web9/tmp/test.txt');

    and open the URL to the file in a browser to see if it throws an error and check if the .txt file has been created in the tmp folder.
     
  18. Indieben

    Indieben Member

    Till, your request for permissions:

    [email protected]:/home/user# ls -la /var/www/clients/client2/web9/tmp
    total 8
    drwxrwx--- 2 web9 client2 4096 Oct 21 20:11 .
    drwxr-xr-x 10 root root 4096 Apr 23 2018 ..
    [email protected]:/home/user#

    (Please bear in mind that Joomla works fine on PHP 7.0 though so i'm not sure how that would be the case if the permissions were wrong).

    In relation to your PHP test (test 2), no display on the screen, no PHP errors thrown in the browser and the file was created in the /tmp/ directory. No errors with error reporting strict added to the phptouch file either :)
    Thanks.
     
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    So PHP 7.2 is working fine and is able to write to the tmp folder but nonetheless, your Joomla install claims that it can't write to that folder. quite strange. Do you have some other kind of session storage configured in Joomla?
     
  20. Indieben

    Indieben Member

    This won't be the issue because I also tried to run off a new install of Joomla as well and that failed in the same way. The website will not display at all (either front end or back end). Interestingly, I did manage to get the Drupal installer to load...
     
    Last edited: Nov 11, 2018

Share This Page