A short while ago I installed PHP 7 on our server. However, the install script did not delete and replace all of PHP 5.6, consequently there were still bits of PHP 5.6 installed and bits of PHP 7 not installed.
Today I rooted out the remaining PHP 5.6 modules and installed the missing PHP 7 modules.
After doing so our home page no longer displayed. I was able to chase this down to our counter script which used mysql_ calls which are deprecated in PHP 5.6 and removed entirely in PHP 7.
In order to fix this I had to change all the mysql_ calls to mysqli_ calls. There is one major difference between mysql_ and mysqli_ calls, and that is that mysqli allows more than one database to be open and used at once. To accommodate this, the mysqli_connect returns a database handler that needs to be stored in a variable, like $dbh = mysqli_connect(yadda yadda yadda);
And then calls to things like mysqli_query and mysqli_select have an additional parameter and that being the database handler so just add $dbh as your first parameter and otherwise the mysqli calls are pretty much direct replacements for the mysql calls.
PHP on our web server has been upgraded to PHP7:
php –version –rexinfo
PHP 7.0.5-3+donate.sury.org~wily+1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
I am going to attempt to upgrade PHP to PHP 7 later tonight while keeping Ubuntu OS at version 15.10 for now. The performance increases of PHP 7 shaved several hundred milliseconds off of our page load time and lower page load time equals higher Google rankings which for businesses is very important.
Since many people use our site for development, I believe it’s also important to have the latest tools available for development purposes. No point developing for yesterday’s platforms.
I’ve also reverted ubuntu.eskimo.com to Ubuntu 15.10 because x2go does not work in Ubuntu 16.04 LTS and a server that can’t be accessed is of no use.
I’ll setup a new virtual machine to test and when these issues are resolved we’ll make a new attempt.
Ubuntu 16.04 LTS clearly is not ready for prime time.
First problem I encountered is that I could no longer login using x2go making graphical administration remotely impossible.
Second problem is Apache wedged after a few hours of operation and would not restart until I rebooted the machine. That might be acceptable behavior for Windows servers but not for Linux.
I’ve reverted our web server back to Ubuntu 15.10 for now using the image I made prior to starting the upgrade process.
It’s unfortunate because php7 did shave several hundred milliseconds off of the load time for our home page so it really did provide substantial speed improvements.
I may attempt an install of php7 independent of an entire operating system upgrade.
I am going to take the Ubuntu server, ubuntu.eskimo.com, down for about 25 minutes to image it prior to starting the upgrade from Ubuntu 15.10 to Ubuntu 16.04LTS.
The upgrade will take a good part of the day. The server will be available during the upgrade but there may be a period of time where some functionality is impaired while various package dependencies are broken while part of the old packages and part of the new simultaneously exist.
After the upgrade completes, assuming it is successful, I will take the server down again for another 25 minutes or so to image it again.
Software added to the ubuntu.eskimo.com shell server:
- Calligra Gemini – Word Processing and Presentation
- Utopia Documents – PDF Reader for Scientific Articles
- Karlyriceeditor – Karoke Lyric Editor
- BaseX XML Database – Visually query and analyze your XML data
- Sparse – Semantic Parser of Source Files
- Squeak – Squeak Smalltalk System
- Bpython – Curses front-end for Python Interpreter
All the perl modules required for bugzilla to execute on our web site have been installed.
I filled a report with Apache’s Bugzilla. They responded that it had been fixed in the main trunk (and 2.4.21 will be fixed) but provided me with the necessary patch to fix 2.4.20, which I applied, and it did fix the server-status scoreboard. So to the best of my knowledge the web server is now 100% functional again with the most current version available.
I e-mailed the maintainers of the version of mod_authnz_external for the older Apache 2.0 series and one of them, Sven-Haegar Koch, was kind enough to take a look at the code for the version for 2.4 and provided me a patch. It wasn’t quite in sync with the code I had but there were only about three lines that needed to be changed so I changed them by hand, recompiled, and it worked!
So phpMyAdmin, which is protected by this code to limit access to Eskimo North customers, because it had unfortunately become a target for hackers, is now available again.