I recently purchased a new laptop (Lenovo Y400 for those that are curious, I may do a writeup on it in the near future). As is my habit, immediately upon receiving it, I booted to a windows 8 installer, deleted every partition from the drive, then recreated a windows partion with 75% of my drive, so I could dualboot linux.
Everything seemed fine, but when I went to install Linux, i ran into some really odd issues, that I hope I can help people avoid in the future.
Very short “I Fixed It” for today. A client of mine moved a Concrete 5 site to his new IIS server, and all PDF files stopped working. He spent several day siwth his web host troubleshooting the issue, and finally asked me to take a look. It turns out that the php configuration zlib.output_compression needs to be set to Off.
Setting this in the PHP.ini file, I was able to get IE and Firefox browsers working, but webkit (Chrome and Safari) still failed to work. I put the line ini_set(‘zlib.output_compression’,’Off’); in the index.php file of the site, and problem solved!
I am at a loss as to why this was actually happening, but everyone is now happy!
In the previous article, we laid the groundwork for a Node.JS broadcast server. Now that it is working, the next step is to throw some PHP into the mix. We will begin by creating a PHP script that will post to our Node.JS server. Once that step is complete, it is just a few lones of code to complete the script, posting to PHP and returning the result!
It was recently suggested to me to try out Node.Js and websockets to replace some ajax calls I was using in a web app. After scouring the web for a few hours, I realized that I would have to compile forum knowledge and my own experimentation due to the lack of any actual getting started articles on this subject. I decided that I would document all of my efforts and post them here. This is the first article in my tutorial series on setting up Node.Js, Socket.IO and PHP in a simple socket application.
My wife and I were going through pictures on her camera card today, and she made the comment that she isn’t patient or organized enough to sort all the images by year and month, so I built a small php script to handle this for her.
This script is a bit limited, but it needs to reside at the same level as a directory named ‘unsorted’. It will go through all images in the unsorted directory and create directories for each month and place the pictures in them, based on the date the picture was taken. Right now this is only set to work for 2012, but I promise I will expand it to work for all years.
This script also requires PHP and the EXIF extension to function. When I get a bit more time and the script perfected, I think I will port it to a windows executable so it can be downlaoded and run without extra requirements.
Just a really short post today with a very frustrating issue I have come across several times. When you use a list with LI elements in HTML and apply the inline-block display property to them, a 4 pixel margin is auto created on the right of each element.
To get around this, you need to eliminate the whitespace between the
tags in your code, so the markup would look like this:
Apparently it has to do with inline-block being whitespace sensitive with LI elements. All I know is it’s a quirky thing to have to do, but it gets rid of those pesky “ghost” margins!
Before I begin today’s article, I would just like to preface this and say that i am working on a series about how I set up my development environment. It is slightly complicated, but I am proud of it, and will post that series soon.
For today, I recently had to rebuild my development web server and did a mysql dump to backup all of my application databases. I did not know that doing a backup this way does not back up user defined functions (UDFs) and had to rebuild them from scratch. For my own sake, as well as to hopefully help others, I would like to go over the two UDFs I am using.
It’s been a while and many things have been going on; though really it’s just life getting in the way of me sitting down to write. I lost my job, mainly becuase of a stupid mistake. Things happen, I understand that. I have learned from the mistakes I have made in the past and I am read to move forward.
A while ago I purchased a set of Z506 Logitech speakers for my living room HTPC on sale. Until today, the rear speakers were just sitting on top of my entertainment center. I finally got off by butt and ran some 18 Guage speaker wire from one wall to the other (I have an open basement which made this quite easy) and now I can plug the rear speakers into the wall in the back of the room.
There was really no trick to extending the speakers, I did some research and seemed to find that 18 guage wire was the most common to extend RCA type speaker plugs. I then ran 2 lines of the wire and finished it off with some RCA keystone wall plugs on both walls. No ugly wires across the room, and surround sound to boot!