Mac OS X – Update PHP, MySQL and Easily Add GD Support
If you have ever tried compiling the GD library on Mac OS X, you know that there are several issues to overcome before it is usable. Not to mention the version of PHP included with OS X wasn’t compiled with this option. In this post I will detail an easy method to update PHP, install MySQL and the GD library in just a few steps.
To start this process, we need to grab a couple of install packages from the links listed below:
- MySQL for your version of OS X.
- Marc Liyanage’s PHP Apache Module.
Once you have these packages downloaded, we can start by installing MySQL. Open the MySQL image and install the package by following the directions. When the install process finishes, copy the MySQL.prefPane to “your_user/Library/PreferencePanes”. Doing this allows you to start and stop the server from the system preferences window. Finally, make sure you take the time to secure your new installation.
If you had previously enabled the PHP module in the httpd.conf file, make sure you comment it back out.
Using the terminal from: Applications=>Utilities=>Terminal.app
(The following commands are entered without quotes.)
- First type: “vi /etc/apache2/httpd.conf”
- Find the PHP module:
LoadModule php5_module libexec/apache2/libphp5.so - Type: “i” and change the line to read:
#LoadModule php5_module libexec/apache2/libphp5.so - Now press the “esc” key, type “:wq” and press “enter”
The next step in this process is to install an updated version of PHP with GD support. The great thing about using the Entropy package, is that all of the hard work is already done for you! Open the installer and click the customize button if you don’t need all of the included extensions.

Once you have chosen the extensions you need, click install. When the install finishes, the last thing we need to do is edit the php.ini.
Using the terminal from: Applications=>Utilities=>Terminal.app
(The following commands are entered without quotes.)
- First type: “vi /usr/local/php5/lib/php.ini”
- Now type: “?mysql” and scroll up until you get to the lines that look like this:
mysql.default_socket = /tmp/mysql.sock
mysqli.default_socket = /tmp/mysql.sock - Type “i” and change them to:
mysql.default_socket = /var/mysql/mysql.sock
mysqli.default_socket = /var/mysql/mysql.sock - Finally press the “esc” key, type “:wq” and press “enter”
Now all you have to do is start Web Sharing from the system preferences window and all of your new features will be ready to use.
GHTime Code(s): nc nc 087f6WordPress Sites Hacked in Bulk
By now, I’m sure we have all heard about the numerous WordPress sites that have been hacked on several of the major hosting providers. From all of the reports so far, no one can seem to figure out what the problem is or how the breaches are happening.
Is the problem a server misconfiguration, outdated WordPress blog, weak passwords or a serious bug in WordPress itself?
If your site has been hacked and you have access to the access_logs, post them along with any other relevant information that you have and as a community let’s go through the information to see if we can find the problem.
GHTime Code(s): fa962 d7fedIntuit QuickBooks Discount Error Goes Unfixed
Unless you live in a secluded cave in the middle of nowhere, you have undoubtedly heard of a little program called QuickBooks by Intuit. This program comes in a variety of different flavors to suit your personal and/or business needs. This software can be surprisingly simple to use with little to no effort.
In a few cases when I invoice a customer, I will charge them for a product at full price and then a few lines down discount the product to the agreed upon selling price. This helps me to demonstrate the value associated with the services I provide and also allows me to charge more later if the circumstances change. QuickBooks has a special item that is setup for this very discount function.
During my normal day-to-day operations, I received a phone call from a customer that was unable to determine how I arrived at a sales tax figure. Thinking this was a simple error on the customer’s behalf I pulled up the invoice, ran the figures and was shocked when I realized that the math absolutely did not work. Wanting to get to the bottom of this, I asked to call the customer back and began trying to figure the problem out. After working with the problem for a few moments I remembered that my company has a full service plan and decided to call Intuit to report the problem. After jumping through several hoops and being transferred to a level 2 support member, I was told that this was expected behavior. The invoice in question had taxable and non-taxable items on it with the discount appearing at the very bottom of the invoice. She explained that the QuickBooks calculator added all the items up as it went along and when it encountered a discount it treated it as a payment and reduced the previous line items by a percentage.
Let see an example:
Our tax amount will be 8%.
Now we have an item that costs $1 and is taxable: $1 x 8% = $1.08
Another item for $1 that is not taxable: $1 x 0% = $1
A discount of $1 that is also taxable: $1.08 + $1 = 2.08 – $1.08 = $1
Now here is a screen shot from QuickBooks with the same problem:
(Click to enlarge)
As you can see, QuickBooks manages to figure this total to be $1.04. She then explained that the work around to this problem was to add all of the taxable items first, then use the taxable discount and finally add the non-taxable items and a non-taxable discount if needed. I asked if this was going to be improved and was told that I could submit this as a suggestion for a future version as an improvement.
This just goes to show you that you can’t always trust shiny software even if you pay for it and you should always double check your math.
GHTime Code(s): 64a48 nc 08e28
Back in February of 2009 there was a big debate over the new terms of agreement that Facebook adopted. Due to the negative feedback over this decision, Facebook’s executives caved from the pressure and reverted to the old terms. Now a little over a year later, this same group is at it again.
Facebook’s idea of privacy is that you, the user, have to police what you share. In other words, it is your responsibility to constantly check your privacy settings to see if any changes have been made and opt out of these changes if you don’t agree. I’m sure that most of you would agree when I say, there are better things to do with your time than to constantly check privacy settings on a website.
For years I have heard many people talk about how MySpace has been losing popularity and that it will soon be gone. As of today, these predictions have yet to come true.