You are currently browsing articles tagged php.

I successfully upgraded PHP and still have my wordpress site working!  I hadn’t touched a PHP upgrade since I setup my server a while ago.  I thought this was going to be a disaster, but it wasn’t too bad.  I discovered my spam blocker ad was no longer supported which created errors the first night I tried to jump to PHP 7.X.  To figure this out, I deactivated all plugins and changed to a basic theme.  Then I upgraded to PHP 7.X and individually turned on each plugin and restored the theme. When I hit the spam blocker plugin it was clear this was the problem from the first night.  Next up trying to upgrade Apache….


In playing around with the Raspberry Pi and Craftbeerpi, I came across a project called Raspberry Pints. This project is intended to enable a single screen behind a bar show what is on tap.  It has fancy features to monitor the kegs if you add flowmeters and stuff.  Somewhere along the way I read that someone noticed that this can be ‘ported’ to work on a normal apache/php/mysql server.  So I thought, I have one of those (the website that you are reading) and decided to give it a whirl.

Turns out the project is kind of dead or at least stalled for a while, but I managed to learn that the 2.0.1 zip file was a good start.  I kicked off the install and ta-da it said everything was a success. So I went to the main page and immediately ran into several errors.  

Error 1:  I think the install script running on my server didn’t update config files for the username and passwords that I was asked for in the install script.  There are a few files this had to be updated.

Error 2: The main page didn’t recognize some variables setup in a few include files.  I’m pretty not php savy, but it seemed that if I setup a variable as a global things went fine.

Error 3:  Some of the includes were missing from the admin page to get into the mysql database.  Simple adding the include files to the files that generated errors seemed to overcome this.

Once I was past that I was in and able to set things up.  Quickly I discovered that I need to learn how to use this better. It seemed like some pages were overwriting information about beers when I didn’t think they should and subsequently mixed up the data on the beers. After a bit of trial and error I was able to get my info added.

I then made a few updates.  I wanted a way to jump back to my wordpress site added to the display.  The logo on the top left normally takes you to the admin page, but I changed this to go back to my own page.  This took some effort as I didn’t realize how the project was converting the mysql data into php variables.  Several hours later I discovered an include file was doing this magic.  Simply adding my new variables to this and adding the data to the mysql database got this all going.  I tried to make an Admin link right below the logo, but my random attempts to update the php and css files failed.  So instead I setup and Admin link on the left header in a ugly way.

So there we go I have my digital taplist up and going.  Now I can get back to my brewstand controller design, but at some point I need to create my own logo.

5/10/2018 Update: I figured out how to add some PHP code that will convert a snapshot of my current raspberry pints webpage to an image using khtmltoimage and add it to this post and my homepage rather than using iframe. This allows the image to size correctly in my post.

Image of Raspberry Pints taplist
(note, I’ve since moved to SimplePints)

Tags: , , , , ,

About a month ago I got a virus on my computer and in my infinite wisdom I used a registry scanner to help clean up the issue.  This scanner also decided to delete some files that allowed my website to work.   I should have just rolled back my windows 7 to the last registry backup, but too late the damage was done.  For the life of me I couldn’t figure out which files it wiped out as it didnt’ have a log of the actions it took.

So I embarked on re-setting up my apache server.  I didn’t keep any of the installation files I used the first go around so I ended up downloading the files all over again. I got apache from Apache Lounge.  I found 64-bit version of php at  and don’t forget about the extensions needed on the same webpage.  And MySQL from their own website. Lesson 1:  Save the installation files for future re-use.

Well of course apache, php, and mysql all had updates that caused various issues.  This being my first real upgrade I discovered something quite important that is noted in all the installation files.  First backup the apache and php config files.  Then start with the generic config files (httpd.conf and php.ini-production) and then add back in my unique settings.  I initially tried to just start with my old configuration files and then add in the new default settings, but this is really messy and not the way to do it.

In apache, Order commands are depreciated are now depreciated  as noted in these two links (1 and 2) so I had to make several updates to the httpd.conf file to correct this.  Additionally, several changes were made to the LoadModule selections.

 #new for 2.4.3 update
LoadModule access_compat_module modules/
LoadModule allowmethods_module modules/
###This is needed for SSL to work in update
LoadModule socache_shmcb_module modules/
#changed with 2.4.3 update
#LoadModule authz_default_module modules/
LoadModule authz_core_module modules/
#changed with 2.4.3 update
#LoadModule authn_default_module modules/
LoadModule authn_core_module modules/

With the updates I was/am having issues with wordpress so I updated that again too to version 3.4.2 and still noticed the problem with numeric links and have blogged about it here.

But after all of that I appear to be back up and working.  I did notice during this whole process that the use of Location in the httpf.conf file to make sure certain webpages use https rather than http was not case sensitive.  I’m still working on this and hope to post about it again when I understand things, but for here is a link the my forum post about the topic

Tags: , , , , , ,