500 Internal Server Error

Discussion in 'Server Operation' started by digiplay, Dec 17, 2018.

  1. digiplay

    digiplay New Member

    I have upgraded the system to Ubuntu 18.04.1 LTS and 2 sites received the error. Others appear to be working correctly. I have read that this might be related to htaccess.txt so I have posted from one of the sites below. This particular site at first got the error and now just shows a blank page.

    ##
    # @package Joomla
    # @copyright Copyright (C) 2005 - 2014 Open Source Matters. All rights reserved.
    # @license GNU General Public License version 2 or later; see LICENSE.txt
    ##

    ##
    # READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
    #
    # The line just below this section: 'Options +FollowSymLinks' may cause problems
    # with some server configurations. It is required for use of mod_rewrite, but may already
    # be set by your server administrator in a way that dissallows changing it in
    # your .htaccess file. If using it causes your server to error out, comment it out (add # to
    # beginning of line), reload your site in your browser and test your sef url's. If they work,
    # it has been set by your server administrator and you do not need it set here.
    ##

    ## Can be commented out if causes errors, see notes above.
    Options +FollowSymLinks

    ## Mod_rewrite in use.

    RewriteEngine On

    ## Begin - Rewrite rules to block out some common exploits.
    # If you experience problems on your site block out the operations listed below
    # This attempts to block the most common type of exploit `attempts` to Joomla!
    #
    # Block out any script trying to base64_encode data within the URL.
    RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
    # Block out any script that includes a <script> tag in URL.
    RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
    # Block out any script trying to set a PHP GLOBALS variable via URL.
    RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
    # Block out any script trying to modify a _REQUEST variable via URL.
    RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
    # Return 403 Forbidden header and show the content of the root homepage
    RewriteRule .* index.php [F]
    #
    ## End - Rewrite rules to block out some common exploits.

    ## Begin - Custom redirects
    #
    # If you need to redirect some pages, or set a canonical non-www to
    # www redirect (or vice versa), place that code here. Ensure those
    # redirects use the correct RewriteRule syntax and the [R=301,L] flags.
    #
    ## End - Custom redirects

    ##
    # Uncomment following line if your webserver's URL
    # is not directly related to physical file paths.
    # Update Your Joomla! Directory (just / for root).
    ##

    # RewriteBase /

    ## Begin - Joomla! core SEF Section.
    #
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    #
    # If the requested path and file is not /index.php and the request
    # has not already been internally rewritten to the index.php script
    RewriteCond %{REQUEST_URI} !^/index\.php
    # and the request is for something within the component folder,
    # or for the site root, or for an extensionless URL, or the
    # requested URL ends with one of the listed extensions
    RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
    # and the requested path and file doesn't directly match a physical file
    RewriteCond %{REQUEST_FILENAME} !-f
    # and the requested path and file doesn't directly match a physical folder
    RewriteCond %{REQUEST_FILENAME} !-d
    # internally rewrite the request to the index.php script
    RewriteRule .* index.php [L]
    #
    #
    php_value post_max_size 131072kb
    php_value upload_max_filesize 131072kb
    #
    ## End - Joomla! core SEF Section.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Check the error.log of the website or global apache error.log for the exact error messages of the 500 error.
     
  3. digiplay

    digiplay New Member

    Here's what I saw in error log for the site:
    [Mon Dec 17 11:24:23.916884 2018] [fcgid:warn] [pid 13040] [client 46.229.168.153:44746] mod_fcgid: stderr: PHP Fatal error: Cannot use Joomla\\String\\String as String because 'String' is a special class name in /var/clients/client0/web90/web/libraries/vendor/joomla/registry/src/Format/Json.php on line 12
    [Mon Dec 17 11:24:23.916906 2018] [fcgid:warn] [pid 13040] [client 46.229.168.153:44746] mod_fcgid: stderr: PHP Warning: session_write_close(): Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/var/clients/client0/web90/tmp) in Unknown on line 0
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The Joomla version seems to be incompatible with PHP 7.2. Either update Joomla, or install an additional (older) php version (if it#s an ispconfig server) to be able to run that one site with an older PHP version.
     
  5. digiplay

    digiplay New Member

    I don't know that it's using PHP 7.2. The other sites actually are complaining that they are still on 7.0. I think that's the current default.

    I reset the site that was showing a blank page to PHP 5.4 and now it's again showing the Internal Error message. That may be where it was before. Here's what the site's error log says now:
    [Mon Dec 17 12:24:16.514855 2018] [fcgid:warn] [pid 25694] (104)Connection reset by peer: [client 46.229.168.146:43750] mod_fcgid: error reading data from FastCGI server
    [Mon Dec 17 12:24:16.514888 2018] [core:error] [pid 25694] [client 46.229.168.146:43750] End of script output before headers: index.php
     

Share This Page