Security: Upgrade Coppermine to latest version

As most of you must have noticed, fansites have suffered a lot of attacks this couple months and making some tests in our test server we realized that sites running under PHP 7.0 were not being infected, we also forced the infection and it did not expand as fast as running 5.6.

One of the reasons why fansites are not already running PHP 7.0 is because Coppermine was not compatible with PHP 7.0, however, Coppermine is already compatible with it and the only reason why it has not been released as stable -hence why Softaculous has not automatically updated it- is because Coppermine team is still working on 1.6 documentation, however, as you will notice once upgraded there is not many differences -if any, as most of them are just PHP codes- between versions.

Why PHP 7.0? To make a short resume, 7.0 version is faster, uses less CPU and RAM and is safer than out-dated 5.6. PHP 7 version is already on 7.3 version and we were still using PHP 5.6 due to Coppermine. So just by switching to PHP 7 you will be making your site run faster and be more secure.

HOW TO UPGRADE COPPERMINE (Click on the pictures to make them bigger)

1. Login to cPanel or your host control panel and backup your gallery files and databases, that is, zipping all your gallery files except the /albums folder and exporting your gallery database. (This is optional, however, it is for safety)

2. Upload the file “upgrader.php” into your gallery main folder. [Download file here]

3. Now enter on yoursite.com/yourgallerypath/upgrader.php (example: meghantrainordaily.net/photos/upgrader.php or meghanpictures.net/upgrader.php if your gallery is on a domain)

4. Click on the first option and then “perform selected update

5. Once it runs, click on “Complete Update

6. Choose MYSQLI and click on “continue”

7. Done! You will see an output similar to the following once your gallery has been updated:

Your gallery has been updated! However, we are not done yet! Now you will need to change your site PHP version to PHP 7.0, this second part of the tutorial is made for cPanel users, if your host is using another control panel you will need to check were to change PHP version (if possible).

1. Hosts with CloudLinux + PHP Selector (fanscity’s case)

1.1 Login into cPanel and look for Select PHP Version, open it.

1.2 Now select php version to 7.0, click on “set as current” and “save”

1.3 Done!

2. Hosts without CloudLinux + PHP Selector

2.1 Login into cPanel and look for “MultiPHP Manager”.

2.2 Choose PHP Version ea-php-70 or alt-php-70 (this last one should only be avaliable if your host has CloudLinux, but some hosts with CloudLinux hide “Select PHP Version” feature from clients so they do not confuse it with MultiPHP Manager”, ask your host which one is the best for you!

2.3 Click on Apply

2.4 Done!

OK… Done! But my wordpress is showing up some errors

If your WordPress is showing up some errors is because there are some incompatibilities between WordPress and any plugin you have installed in WordPress, revert PHP Version and look for which plugin is causing the error, my recommendation is to look for an alternative for that plugin as 5.6 version is already too old and will make your site insecure, if that plugins has not been updated to work with 7.0, then it is not safe to run it. If you do not find any similar plugin then.. stick to 5.6, although it is not recommended, Coppermine’s latest version works 100% with 5.6.

If you are a FansCity member and have any issue, submit a ticket. If you are not hosted with us you can always leave a reply in comment and will try to solve any issue you have.

Everything looks fine now!

If everything looks fine on your site and everything works OK! You are done. You may want to go ahead and go even further and upgrade to PHP 7.1 which is even faster and safer than 7.0. If your site works fine with 7.1 stick to it!

Update:

You may need to update some plugins to make them work with Coppermine’s latest version:

Filemove: http://forum.coppermine-gallery.net/index.php?action=dlattach;topic=79117.0;attach=48850
Cpmfetch: http://forum.coppermine-gallery.net/index.php?action=dlattach;topic=65412.0;attach=48070 [If you are running cpmfecth latest version, you are fine.]

About the Author: admin

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.