FamousPhil.com -- Home My Calendar Youtube LinkedIn Facebook MySpace Twitter RSS Blog Feed

Blog Navigation

Blog Home



Partners

Latest Activity

MySQL Singleton Classes in PHP and Python

Phil gives the source code for implementing a MySQL singleton class in both PHP and Python.



Posted on: March 30th, 2011 by Famous Phil

This is a video blog continuation of week 2 (see the previous post).

Background: I was asked by the IEEE student club at UB (http://wings.buffalo.edu/sa/ieee) to redo my lecture series on developing websites.  I know that my website isn’t the best visually designed website in the world (and I’m actively looking for talent that can help me fix this in exchange for my programming skills), but I do know a lot about how to code websites well.  Anyways, here are the videos from Lecture 3.  There will be a fourth and final lecture next week.  As always, thanks for reading!

Part 1:

Part 2:

Part 3:

Part 4:

 

Tags: , , , , , , , , , , , , , , , , , , , , , , ,
Posted in Hosting / Server Administration, My Site, Programming, Student Life, Technology
|| No Comments »

Posted on: March 23rd, 2011 by Famous Phil

This is a video blog continuation of week 1 (see the previous post).

Background: I was asked by the IEEE student club at UB (http://wings.buffalo.edu/sa/ieee) to redo my lecture series on developing websites.  I know that my website isn’t the best visually designed website in the world (and I’m actively looking for talent that can help me fix this in exchange for my programming skills), but I do know a lot about how to code websites well.  Anyways, here are the videos from Lecture 2.  As always, thanks for reading!

Part 1:

Part 2:

Part 3:

Part 4:

Part 5:

 

Tags: , , , , , , , , , , , , ,
Posted in Hosting / Server Administration, My Site, Programming, Student Life, Technology
|| No Comments »

Posted on: March 10th, 2011 by Famous Phil

It seems like its been a while since I last posted to my blog.  As usual, the mid semester grind is hitting my time hard, so I don’t have the resources to write here as often.  Thankfully this is my last semester as a Masters student, *yay*.   So coming up soon, I will be writing a blog on regular expressions, I’m still in the process of making it, so it might take a while.  I’ve also got a great blog for April fools day, so stay tuned for that!

Now onto the topic of this blog.  This is a video blog (go figure, right?).  Actually, I was asked by the IEEE student club at UB (http://wings.buffalo.edu/sa/ieee) to redo my lecture series on developing websites.  I know that my website isn’t the best visually designed website in the world (and I’m actively looking for talent that can help me fix this in exchange for my programming skills), but I do know a lot about how to code websites well.

Being the kind of person who likes to share knowledge, I agreed to give the lecture series with updated information.  John suggested that I video tape the lectures and post them to my blog, which I thought was a great suggestion.  So in the next 5 to 6 weeks, I will be posting youtube 720p HD recordings of the lecture series to here.  Feel free to watch it and make comments about my presentation skills.  I know that I’m not perfect, so I’m always open to suggestions!

As always, thanks for reading!

Part 1:

Part 2:

Part 3:

Tags: , , , , , , , , , , , , , ,
Posted in Hosting / Server Administration, My Site, Programming, Student Life, Technology
|| No Comments »

Posted on: August 6th, 2010 by Famous Phil

Often times, I’m asked the question: Should I get Windows hosting or Linux hosting for my new website.  This is a topic that comes up time and time again in my field of expertise and sadly, newbies often choose based on perception, not based on fact.  This blog will cover some of the facts about both hosting platforms and hopefully help you make an informed decision about how you want your website hosted.
Read the rest of this entry »

Tags: , , ,
Posted in Hosting / Server Administration, Programming, Technology
|| 19 Comments »

Posted on: April 28th, 2009 by Famous Phil

A good place to introduce this topic is by stating that I consider myself a “good” system administrator.  I consider myself above average when it comes to Windows Server administration, and “average” when it comes to Linux server administration.  Normally, regardless of platform (Linux or Windows), I usually know enough not to get myself into trouble, yet rectify the problem that is presented to me.

Prior to last October (2008), I have solved a wide array of problems consisting of Apache malfunctions and complete Server Hard Drive failures requiring data recovery, to simply having to unblock a person’s ip address from the firewall because they tried to login to the server incorrectly too many times.  I never really messed a server up so badly that I couldn’t undo what I attempted to fix in the first place.

Read the rest of this entry »

Tags: , , , , , , , , ,
Posted in Hosting / Server Administration, Personal
|| 2 Comments »

Posted on: April 16th, 2009 by Famous Phil

Today I discovered this blog on Matt Heaton’s blog (http://www.mattheaton.com/?p=179) about CPanel Backup.

Bluehost experiences the same difficulties that I experience when performing backups (likely much worse), and they are working on a patch using the linux kernel to determine the list of changed files instead of performing a hard disk scan for changed files.   I recommend reading his blog for more details!

I look forward to seeing this addon released because it can help all system admins perform quicker backups on linux!

Tags: , , ,
Posted in Hosting / Server Administration, Programming, Technology
|| 3 Comments »

Posted on: February 18th, 2009 by Famous Phil

As the owner of a hosting company, I have made several decisions regarding which server to use, what kind of control panel should I provide, should I add features to my hosting, how many resources should I include, etc.  In my opinion, one of the most important decisions in hosting is choosing how your users will use the service, meaning what control panel should I use?  There are many options for Linux including, Plesk, LXAdmin, and the most popular: CPanel.

CPanel is the control panel that I choose to use for Matthouse hosting accounts, but why did I choose CPanel, what are its advantages and disadvantages?

I suppose I should first begin with a small description of what CPanel is.  CPanel allows the hosting client to modify all aspects of their site from an easy to use web-based interface such as FTP accounts, Email accounts, statistics, subdomains, additional domains to host, etc.  CPanel makes it very easy for the hosting company to give the client total control of their website without the requirement of providing full server access.

Here are the advantages of using CPanel:

  1. Its very easy to install, just install Linux and run the installation script, it will configure most of your server automatically
  2. Cpanel provides a very easy visual interface where you can manage your server.  There are several panels that are meant for administrators, clients, and even email users.  There are also very easy to follow tutorials posted on CPanel’s website for those users who may not know where to start
  3. Cpanel automates most of the hosting experience which reduces stress on the hosting company

So, what are the disadvantages of hosting with CPanel?

  1. I personally believe that CPanel is meant for websites that are small to medium. CPanel itself is a resource hog and requires at least 256MB of ram on the server to run, and this amount probably won’t even run a website getting 200 hits a day without running out of memory or running into swap space on the server.    Most servers will have much more RAM than this, but a base install should not require more than 50 to 60MB of ram.
  2. On a default install, CPanel usually is optimized for a dedicated server with 4 to 16GB of RAM.  Even the VPS Optimized version of CPanel requires additional configuration to keep CPanel within check.  If you don’t do initial configuration in Apache, etc, you may run into memory errors easily since Apache will start up 20 to 30 processes at 1 to 6MB a piece.  In addition, most of the Apache configuration is default and many modules are missing such as Source Gaurdian which will protect PHP code from hurting your server.  In addition, CPanel doesn’t secure SSH or FTP, you you should still install a firewall and tighten SSH security.
  3. CPanel is software which contains vulnerabilities just like any other software.    Cpanel updates run nightly, however what happens if someone discovers a security risk and decides to attack your server before the updates are pushed to your server covering the vulnerability?  To come back to my past disadvantage of Cpanel is meant for small to medium sites, I believe this aids to the arguement that big sites are more likely to be hacked than smaller sites.
  4. CPanel costs money to license. This is rarely a factor to most big sites and companies because they have that kind of money to spend for something easy to use, however CPanel licenses are not cheap.  This really could be neither and advantage of disadvantage, but its worth sticking on my list of points to consider.

So when would I recommend a CPanel installation?  Thats simple, I’d recommend it for hosting companies that host many sites on a single server.  It reduces stress on the hosting company, and generally these servers have plentiful resources to handle CPanel in its entirety.  Also sites that are generally on shared CPanel hosting are not big enough to have a good probability of being hacked.

When would I not recommend installing CPanel.  I would personally say never install CPanel on a large site that gets over 5000 unique hits a day or more.  CPanel may make administering the site easier, however most sites that are this big bring in a lot of revenue  and paying for CPanel could be just slightly cheaper than hiring an experienced server administrator or a friend to run the server without CPanel.  Installing the core components and configuring them manually will also ensure that you have minimal code that can be hacked (Yes, web servers are software).  I’ve always been taught that the less code you use, the less likely there will be problems with it.

Thats all the time I have.  I might follow up on this depending on how many comments I receive.

Tags: , , , , , ,
Posted in Hosting / Server Administration
|| 24 Comments »

Posted on: January 31st, 2009 by Famous Phil

As expected, I completed moving all of the websites hosted on the former mthsweb1 (Matthouse Web Server 1) server over to the new mthsweb4 server.  I haven’t heard any complaints so far about the new server so far and don’t expect to hear of any problems.  Tonight I will be doing some testing on the old matthouse web 1 server before it expires later in February.  I hope to learn some new knowledge from my testing later tonight regarding apache optimization.

Earlier today, I helped a friend in the hosting business move a massive website (http://clevelandleader.com) from his server to a virtual server that will just host that website.  This website is ranked ~76,000 on the alexa scale which means that it gets an insane amount of traffic.  My best guess would be 300 to 1500 loads per second.  The site itself has a huge mysql database that is over 2GB and the sql move alone almost crashed a dedicated server with a quadcore processor (it did have a lot of other websites on it though).  Regardless, after the move, my friend didn’t realize that a default whm (cpanel, inc) installation doesn’t optimize the server nearly enough for a large website like this.  Heck, I don’t even know if whm was made for such a large website.  I did optimize the server and compile apache correctly just to handle the needs of clevelandleader.com.  I also did a lot to prevent apache from crashing with the high load.

Traditionally, with such a large website such as cleveland leader, the web server hosting the site would only run a web server, no overhead like cpanel.  I feel that cpanel has made the hosting process much easier, but I just don’t think it was made to handle such a large website.   Also, the fact that cpanel uses the root password directly means that if there is a security vulnerability and the user obtains that root password through hacking or whatever, the server could be compromised not only from cpanel’s whm but also from the terminal through ssh (or a rare occasion of console access, meaning sitting in front of the server physically).  This could present a major problem.  Most smart hosting companies use cpanel’s wheel group to give su access to certain cpanel uesrs that can then login to the terminal via ssh and then su root with the root password to gain root.  This provides a 2 password layer and adds an additional layer of security to the server.

Another pitfall that large websites face is the need for a dedicated mysql server, that is if mysql can even handle the load.  Mysql was made for small to medium sites and it was made for maybe 100 to 200 queries per second, but much more than that and it undergoes a massive strain.  Many large websites find themselves moving to more powerful database servers such as Microsoft SQL or Oracle which are much more powerful solutions that were made for high loads.

So why am I even talking about this!  I felt that this would be the best way to introduce a new idea that I’m going to begin working on within the next couple of weeks.  I have purchased the domain (http://adminreference.com) and will begin a forum where users can share their administration experience and knowledge to the world.  I am a seasoned Windows administrator and a somewhat experienced Linux admin.  I find myself knowledgable about both server operating systems and I post tutorials on multiple websites that don’t really aim for administration concepts.  I also hope that some day this can help me when I am stuck on a massive problem.

I encourage you to stay informed as I begin this new journey.  I will likely be ready to release the site sometime in the next couple of weeks.  I am not sure how to market such a website, however I’m sure as people begin coming, someone will have knowledge about that as well.

Tags: , , , , , , , , , ,
Posted in Hosting / Server Administration
|| 6 Comments »

Posted on: January 19th, 2009 by Famous Phil

As you probably know, I host websites as a side hobby to keep myself busy.  If you didn’t know, I host websites through http://www.matthouse.us.

Over the past few years, I have hosted on the OpenVZ platform (Virtual Private Server).  I started out with lxadmin and moved my way up to cpanel accounts for my clients due to many problems with lxadmin.  After a lot of newly formed concerns about security after noticing hacking attempts, I have attempted to tighten my server, however openvz has presented many challenges while performing these tasks.   At first, I was recording 20 to 30 hack attempts per day to my main webserver (mthsweb1.matthouse.us), and this was totally unacceptable to me.  I have tightened that server down but am finding that my server is much slower than it once was and I was forced to find a better solution.  This is why I’ve decided to migrate my entire customer base to a new server running on the Virtuozzo platform which is much more stable, secure and less of a pig when it comes to memory consumption.

Within the next couple of weeks, I hope to contact everyone and migrate every website over to the new server completely.  I will personally verify each site is completely transferred with minimal to no downtime as possible.  To all of my customers, I would like to thank you for your continued support.  Your support helps me learn new techniques to managing servers and providing appropriate customer service!

One additional note, I promise that I will have a photo gallery up by next weekend!  Have a great Martin Luther King day!

Tags: , ,
Posted in My Site
|| 1 Comment »