A day does not go by it seems that someone is asking how to create a simple contact form in PHP. The problem I tend to find is that most of the tutorials online show bad programming practice, such as using the @ error suppressor or not validating / checking the data passed into the form. I decided to write up a few of my tricks on how to do a proper PHP Secure Contact form and attempt to explain why. As always, I welcome comments / suggestions in the remarks.… Read More
My servers now a days run Varnish simply for the speed. On my main site Varnish was getting out of control with the RAM / Memory usage. Varnish would slowly creep up and eat all the memory, even though I was trying to hack Varnish to only use 128MB of ram, especially since the site is hosted on a lowendbox by Frantech (Buyvm.net). The answer, which I am not really sure WHY it works, but inside of vcl_fetch in the /etc/varnish/*.vcl file, I had set beresp.grace to be 30M, I tried this with 2M as well, but ultimately I took out the grace period setting and now my box is running Varnish with Lighttpd and PHP-FPM getting around 15k-30k unique hits a day and not going over 156MB of RAM usage.… Read More
My curiosity takes me to a bunch a different programs that I like to hack around with. Today it took me to setting up a Mosh Server. Mosh is a short term for Mobile Shell, which is attempting to act as an SSH (Secure Shell) replacement for a connection-less state. With Mosh, you are able to roam around on a 3G / 4G / Wifi / Work / Home and not have the need to always reconnect your SSH sessions or have a dedicated server setup with screen, which if that server goes down then you will have to reconnect all the sessions again!… Read More
Virtualization has a ton of uses in today's programming and development world, from being able to test on many different operating systems without having to format or partition your host computer to running server setups with ease. I have recently converted over to Windows 7 from Ubuntu with the purchase of a new laptop, given how many hacks it took to get my new laptop working on Ubuntu. This had me thinking, since I really do not care for the WAMP install set, and prefer a LAMP stack for my development server, how can I get the LAMP inside of Windows 7.… Read More
Storage is something everybody needs. Whether you prefer pictures, movies, music or raw data, storage is invaluable. My needs were neither of those, I was in need of a concrete backup drive for computer images. With the backup data ranging from 60-250GB, a 2 Terabyte drive seemed suitable.
Upon search for drives with my search tricks and performing cost like analysis, I came across the 2 Terabyte Green External Fantom drive and decided to give the Fantom drive a whirl.
In the past I have purchased other Fantom Drives, although my last Fantom External drive purchase was a 500GB drive, which after hacking the 500GB drive a bit, the drive died on me.… Read More
Keeping logs is a part of system administration. For me, I keep my logs of items I have installed in my articles. This way I always have the instructions to reference when I need to look back and do other installs. Today I am writing about how to setup NGINX that uses PHP-FPM on Debian. This can be a faster alternative to FastCGI in that you set the number of instances it will always run and the max that PHP-FPM is allowed to run. PHP-FPM allows for more control making a PHP server lighter weight when the extra weight is not necessary.… Read More