Ready for PHP 7 : Hate IT but Love Programming

itProgIT (AKA-Network Administration) — the networking code required when I work in the Terminal mode to set up a new version of PHP or MySQL–is the bane of my existence. This may be especially true on the Macintosh because they have a built-in PHP that requires code-changing tinkering to get things right. I have nothing against IT folks–quite the opposite. They are my saviors! With the advent of PHP 7, I am going to have to open up my Mac and find directions on how to code through the UNIX environment that lives in all Macs. I may be fortunate in that I know that on my current Mac, PHP 7 is not built-in and I’ll just follow the instructions for installing it, but then I’ll probably have to reset the pointers on my MySQL or just give up and just re-install the whole thing.

A lot of IT-type of tinkering, like creating and adding fields to MySql tables, is usually done with a program like PHPMyAdmin, but I prefer to do it with PHP coding. Part of the reason is that it’s a lot easier for me to peek at the code in a PHP source file than it is to switch between different IDEs, and since the fields and data types used for a program have to synch, coding tables and fields is just easier for me. It’s the Linux or Unix coding that gets me–I rarely use it; and so each time I do an install or re-install, I have to re-learn it.

Beware of the Hosting Service

A while back I switched my hosting services from one I had used for years to a new one rated as the top hosting service (by several reasonable-sounding criteria, including PHP.) So I picked the one with the highest rating and lowest price and set up my site. It wasn’t long until I realized that the entry-level PHP was 5.3; so it had almost no support for object oriented programming. I was informed that I could upgrade to 5.4 which resided at “another level and plan.” So I coughed up the extra dough and took the upgrade. (It wasn’t too expensive; so I wasn’t that put out.)

So then I started working on my MySQL code, tested it on my localhost server, and once everything was working I transferred the files to my (now PHP 5.4) hosted site. Right away I ran into a problem. I contacted them, and they showed me the code I could use. Well, it was using the old built-in mysql function; it didn’t handle mysqli class. Guess what? In PHP 7, the old PHP mysql function is kaput!. In fact, it’s been deprecated since PHP 5.5. So, here I have a hosting service that charges extra for PHP 5.4 but then has an old version of MySQL that does not respond to the mysqli class. This means that a lot of crappy code is underlying this site’s Web pages using both PHP and MySQL.

This hosting service is rated #3 (out of over 400 hosts) for PHP in 2015! I have no idea who is rating these guys, but it clearly is not someone who is much of a programmer. So I started asking around for a hosting service that would let me add the updates I needed, and I was led to one that was basically a hosting service that lets you add anything you want but without a great deal of support other than “How To” tutorials. In other words, I have to become that IT Guy that I never wanted to be. My season in hell begins. However… I did want to try out HHVM and Hack; so now I guess I’ll have the chance to give them a whirl.

Leave a Reply

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