Kirby sites down after hosting server updated MySQL to 5.6

On November 10th, my web host, bluehost, emailed me to notify me that they were going to upgrade the server that hosts my domain to use MySQL 5.6. After this update was completed by bluehost at 10pm that day, all of my sites were down (the primary domain and all add-on domains included). All but one just loaded white screens, and the remaining one (one of the add-on domains) gave me a generic Internal Server Error message.

After contacting bluehost, they were able to get some of my sites working again, but the two sites that use Kirby now fail to load anything at all, and I get a browser error. The sites are smashifiedart.com and artsyomni.com

I’m not sure what sort of change would need to be done on my end in response to such a change on the part of the web host itself.

Any ideas?

Are you using MySQL in any way in your code? If not, it looks like they probably updated or changed other things in this platform update.

Anyway, you could add c::set('debug', true); to your site/config/config.php, temporarily, to see if there is any error showing up.

Once I do that, where do I look for errors? I went ahead and set that change on my config.php file on the production server briefly, but I don’t know what to do from there because navigating to the website URL still does nothing. Just a white screen in Firefox and Safari, and a native error page in Chrome (screenshot below)

(https://www.dropbox.com/s/00xbd12ru1qhb48/Screenshot%202016-11-13%2017.04.57.png?dl=0)

I can’t access the Panel either. I don’t know where else to look.

As for whether I use MySQL in my code, I’m not even sure if I can answer the question accurately, because I don’t really have a solid grasp of what MySQL is. If I do use it in some way, I’m not aware of it. I just use standard syntax from Kirby’s API as outlined in the documentation along with regular old HTML & CSS with a tiny amount of javascript.

Did you check your php version? What version is currently running on the server?

Wasn’t able to figure out anything conclusive from my web host’s cPanel. However, I noticed that ~/public_html/.htaccess had been modified on nov 12, which is when I was speaking to Bluehost technical support. The .htaccess file in question reads as follows:

# Use PHP5.4 Single php.ini as default
AddHandler application/x-httpd-php5 .php

I’d like to reiterate that the website was working just fine 3 days ago before Bluehost did anything on their end. The only recent changes have been in the content folder of the site, and that was several days before the problem arose.

If it helps to give a bit more context, here’s the exact email I received from Bluehost regarding the upgrade to MySQL (bear in mind that “drizzlegames.com” is the primary domain on my account. The two sites using Kirby are add-on domains):

The server hosting drizzlegames.com is scheduled for a MySQL server upgrade on Thursday, November 10 at 8pm MT. MySQL is being upgraded to version 5.6 to improve security, stability, and overall performance. We don’t expect any negative impact to your account, so there’s no action needed on your part.

Can you post the .htaccess file that is currently on your server? It might have got overwritten by them and thus breaks your site.

MySQL is a database management software, if you don’t even know what it is, you are not using it with Kirby.

As @Andi-Lo suggested, please post your .htaccess, if the content you posted is all there is in your .htaccess, it is not the original Kirby file, which is needed for Kirby to work as expected.

The .htaccess for the root is above. The two sites using Kirby are in subfolders of ~/public_html/, and their .htaccess files read as follows:

.htaccess for smashifiedart.com:

# Kirby .htaccess

# rewrite rules
<IfModule mod_rewrite.c>

# enable awesome urls. i.e.:
# http://yourdomain.com/about-us/team
RewriteEngine on

# make sure to set the RewriteBase correctly
# if you are running the site in a subfolder.
# Otherwise links or the entire site will break.
#
# If your homepage is http://yourdomain.com/mysite
# Set the RewriteBase to:
#
# RewriteBase /mysite

# block text files in the content folder from being accessed directly
RewriteRule ^content/(.*)\.(txt|md|mdown)$ error [R=301,L]

# block all files in the site folder from being accessed directly
RewriteRule ^site/(.*) error [R=301,L]

# block all files in the kirby folder from being accessed directly
RewriteRule ^kirby/(.*) error [R=301,L]

# make panel links work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^panel/(.*) panel/index.php [L]

# make site links work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php [L]

</IfModule>

# Additional recommended values
# Remove comments for those you want to use.
#
# AddDefaultCharset UTF-8
#
# php_flag short_open_tag on

.htaccesss for artsyomni.com:

# Kirby .htaccess
AddHandler application/x-httpd-php5 .php

# rewrite rules
<IfModule mod_rewrite.c>

# enable awesome urls. i.e.:
# http://yourdomain.com/about-us/team
RewriteEngine on

# make sure to set the RewriteBase correctly
# if you are running the site in a subfolder.
# Otherwise links or the entire site will break.
#
# If your homepage is http://yourdomain.com/mysite
# Set the RewriteBase to:
#
# RewriteBase /mysite

# block text files in the content folder from being accessed directly
RewriteRule ^content/(.*)\.(txt|md|mdown)$ index.php [L]

# block all files in the site folder from being accessed directly
RewriteRule ^site/(.*) index.php [L]

# block all files in the kirby folder from being accessed directly
RewriteRule ^kirby/(.*) index.php [L]

# make panel links work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^panel/(.*) panel/index.php [L]

# make site links work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php [L]

</IfModule>

# Additional recommended values
# Remove comments for those you want to use.
#
# AddDefaultCharset UTF-8
#
# php_flag short_open_tag on

Please try to set the RewriteBase in the Kirby .htaccess files like this:

RewriteBase /

Went ahead and set RewriteBase accordingly. No change so far. Is there anything else in .htaccess that I should change? Does it matter what line I write it on?

As I said, the line already exists after RewriteEngine on (and needs to be uncommented) and it must come after RewriteEngine on, but make sure to set it to / only, not to a subfolder.

Other than that, you should contact your hosting provider to find out what other changes they made that might affect your Kirby sites.

Please also check the PHP versions of those domains just in case.

Put an info.php file with the following content into the smashifiedart.com folder

<?php
phpinfo();

then call http://smashifiedart.com/info.php.

the RewriteBase was set as you specified, with the “#” removed on the line to uncomment it and only set to /.

I just added info.php to the directory. According to smashifiedart.com/info.php, it’s currently running 5.2.17, which according to the system requirements outlined on the Kirby FAQ page, might be a problem.

Perhaps something was changed by Bluehost during my customer support session that set it back to an earlier version to try to fix the problem? Or does kirby run on a php version below 5.4 under certain circumstances? I don’t know if the version was changed recently, but I do know that everything had been working for several months until the 10th.

The most service providers enable you to change your php version on your own via their administration panel. You could have a look there and change the version to at least 5.6+

For example on https://www.checkdomain.de it looks like this:

here’s what seems to be my options on Bluehost’s PHP Config page.

I went ahead and set it to 5.6. No immediate change reflected from the info.php page. Will I need to wait a while for this changed setting to propagate, perhaps?

It usually only takes a couple of minutes for the changes to go through, and the result is still the same. I’d suggest you contact your provider again, informing them of the problem with the PHP version.

Will do. Thanks so much for your help so far!

And no, Kirby will not run with a PHP version below 5.4, we recommend PHP 7 or at least 5.6.

Just an update: Still haven’t been able to get things working. Talked with Bluehost again and they suggested using a line in .htaccess to change the php version used by the subdomain using this line at the top of .htaccess for the subdomain folder (~/public_html/smashifiedart/.htaccess)

# Use PHP5.6 as default
AddHandler application/x-httpd-phpbeta .php

Didn’t seem to fix anything, and in fact, made it impossible to access the info.php page to check if the version change worked properly.

So I did a bit of digging and found the error_log file in ~/public_html/smashifiedart/ which contained multiple instances of this error:

[14-Nov-2016 15:10:08] PHP Fatal error:  require() [<a href='function.require'>function.require</a>]: Failed opening required '__DIR__/kirby/bootstrap.php' (include_path='.:/usr/lib64/php:/usr/share/pear') in /home2/drizzleg/public_html/smashifiedart/index.php on line 6

not really sure how to interpret this. Any advice is very appreciated.

This error has to do with the old PHP version, it’s not a new error message.

What sort of error do you get when you try to load the info.php page? Or just a blank page?