nDarkness

Mac OS X

OS X – Apache Web Sharing Starts But You Are Unable Connect

by on Sep.06, 2010, under Mac OS X, Software

In an effort to save you an afternoon of searching, I thought I would post this to help the OS X users having this issue. There are the usual causes of no content in the web root, firewall blocking requests, incorrect permissions and/or httpd.conf syntax errors. The one error that is a little tougher to track down is apache not being able to create log files. Check the line in the httpd.conf file that shows the path to apache’s log file. It should look something like this:

ErrorLog “/private/var/log/apache2/error_log”

Now if the directory apache2 does not exist in /private/var/log/, apache will fail to start without giving you much of an error message. To correct this, in terminal type:

sudo mkdir /private/var/log/apache2

Enter your admin password and restart apache either in System Preferences=>Sharing=>Web Sharing or in terminal by typing:

 sudo apachectl restart

Once this is done, enter your web address in the web browser and you should see your pages load. Hope this helps!

2 Comments :, , , more...

Mac OS X – Update PHP, MySQL and Easily Add GD Support

by on May.19, 2010, under Mac OS X, Software, Utilities

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:

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.

Leave a Comment :, , , , more...

Intuit QuickBooks Discount Error Goes Unfixed

by on May.06, 2010, under Mac OS X, Software, Utilities, Windows

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.

17 Comments :, , , , more...

Apple’s Snow Leopard Bug Deletes All User Data

by on Oct.12, 2009, under Mac OS X

Apple Snow LeopardA bug has been reported on the Apple discussion boards and references a condition that causes all user data to be deleted.

The bug seems to be caused by a user that logs into a guest account only to find out when they log back into their account, all of their data is gone. The guest account, in OS X, by default deletes all user data when the user logs out.

Apple has yet to comment on this bug and so far the only fix is to restore the information from backup.

Until this issue is addressed and resolved, the only workaround is to disable the guest account in system preferences.

If anyone is brave enough to try this out, post back and let us all know the outcome.

Leave a Comment :, , more...

Flash Cookies and What You Don’t Know

by on Oct.10, 2009, under Computer Security, Linux, Mac OS X, Privacy, Windows

Apple Snow LeopardIf you have been browsing the internet for any period of time, I’m sure you have heard of cookies. Even though you may not be entirely sure what they do, you certainly know how to delete them. Right?

Cookies are files websites save on your computer that contain information about you. There are several legitimate purposes for these files such as remembering your login information so you don’t have to sign in every time you visit a site, keeping up with cart information as you shop online and in some cases online security such as banking sites.

With the good also comes the bad. A quick search on Google for tracking cookies will return page after page of articles on this topic. A tracking cookie will monitor your movement around the internet and will phone home to let its authors know what you are doing online. With this information they will taylor their advertising on affiliate sites so that you only get ads for what they believe interests you or they will sale this information to other advertisers.

“So what’s the big deal? My browser is set up to delete cookies at regular intervals and I don’t allow them from third party sites.”

Well here is a little fact that you may not know. The same technology that powers streaming video, online games, and animated movies, has the ability to set these cookies as well. The technology I am referring to is the flash plugin, currently developed by Adobe. These “special” cookies are not created or treated the same way as the cookies that we have all come to know and love. In fact your browser has, on its own, no control over these cookies at all.

To illustrate this point, clear your browser cookies and then take a look in the following location(s):

  • Windows: Under your current user’s Application Data directory, click on Macromedia\Flash Player\#SharedObjects and Macromedia\Flash Player\macromedia.com\support\flashplayer\sys.
  • Mac OS X: ~/Library/Preferences/Macromedia/Flash Player/#SharedObjects/[package ID of your app]/ and ~/Library/Preferences/Macromedia/Flash Player/macromedia.com/support/flashplayer/sys/
  • GNU-Linux: ~/.macromedia

Using your browser to clear cookies had no effect whatsoever on the flash cookies. That possibly and probably means that your actions are still being tracked as you surf the net. What’s more, flash cookies have the ability to restore the normal cookies that your browser just deleted.

“So what can I do about these cookies? You said earlier that my browser on its own could not delete these cookies, what does that mean?”

A developer going by the name of NettiCat, has developed an addon for Firefox called Better Privacy that will do the dirty work for you. This addon allows you to clear these cookies when you open or close your browser, at regular intervals and manually.

Now feel free to go trash those stale cookies and be on the lookout for them popping up again.

4 Comments :, , , , , , more...

MacBook/MacBook Pro Hibernation Modes

by on Oct.09, 2009, under Mac OS X

As a power saving feature of most modern operating systems, you have the ability to save your current system state to ram, go into a power saving mode and consume very little battery power. This is a very convenient feature among portable computer users that are always on the go.

MacBooks have this feature enabled by default and there are three ways to activate it:

  1. close the lid
  2. press option+command+eject
  3. click the apple icon and select sleep

I prefer to save all of the battery life I can on my laptop when I won’t be using it for several days. Sleep mode works very well in accomplishing this goal but we can actually save virtually all of our battery power by using hibernation.

Hibernation will save the operating state to the hard drive and eliminates the need for power at all. This allows us to travel with our computer for several days at a time and not need to plug it up after that extended period to use it.

There are several methods available to activate hibernation mode in OS X. The first method is to put your laptop to sleep, unplug it and remove the battery. This will cause your laptop to enter hibernation mode and you will need to replace the battery and press the power button to wake it. I have a protective case for my laptop to protect it so this method is definitely out for me. The next method is to download one of the several available apps that will do the job for you. This is the easy method but requires no skill and very little effort on your part.

The method we will be using will require us to us the terminal and add a few lines to our .bash_profile file.  Before we begin editing the file, lets talk about the command we will be using.

There are 5 different hibernation modes for the Mac. To find out which mode your computer is using, press command+<space bar> and type in terminal. Select the terminal program from the list and type:

    pmset -g | grep hibernate

This is the output I received:

    hibernatefile    /var/vm/sleepimage
    hibernatemode    3

So what does all of this mean and how is this going to help us turn on hibernation? Below is a list of the different hibernation modes with explanations:

  • 0 – Old style sleep mode, with RAM powered on while sleeping, safe sleep disabled, and super-fast wake.
  • 1 – Hibernation mode, with RAM contents written to disk, system totally shut down while “sleeping,” and slower wake up, due to reading the contents of RAM off the hard drive.
  • 3 – The default mode on machines introduced since about fall 2005. RAM is powered on while sleeping, but RAM contents are also written to disk before sleeping. In the event of total power loss, the system enters hibernation mode automatically.
  • 5 – This is the same as mode 1, but it is for those using secure virtual memory (in System Preferences -> Security).
  • 7 – This is the same as mode 3, but it is for those using secure virtual memory.

Now lets make the changes necessary to switch back and forth from our current mode to a new one. While still in terminal enter the following commands.

    vi .bash_profile

Now add the following lines to this file:

    alias hibernateon="sudo pmset -a hibernatemode 5; pmset -g | grep hibernate"
    alias hibernateoff="sudo pmset -a hibernatemode 3; pmset -g | grep hibernate"

To exit this editor, press esc :wq enter. This will save the file with our changes and we will need to quit terminal and restart it again for our changes to take effect. Once we have restarted the terminal, type hibernateon, enter your password and now close your lid and your computer will enter hibernation mode automatically. To revert back from this new mode, open terminal again and type hibernateoff. This will return your computer to its original mode and the power saving features will work the way they did previously.

Leave a Comment :, , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll

A few highly recommended websites...