This is good news for web developers using Mac. If we want to work the latest PHP release, we don’t have to resort to installing a separate version of PHP, using a tool like MacPorts.
Probably the fact that Lion is only available as a download through the Apple App Store has helped Apple ship with the latest PHP version.
Mac OS X 10.6 Snow Leopard currently uses PHP 5.3.4, even with the latest 10.6.8 update.
A PHP 5.4 Alpha has just been released, with useful features like traits. I wonder whether Apple will update to PHP 5.4 during Lion’s lifetime? I can only hope.
Mac OS X 10.7, codenamed Lion was released on 20 July 2011. I’ve just upgraded my MacBook Air to Lion. Lion is … quite a lot of awesomeness bundled together.
Useful Features of Lion
Here’s some I love about Lion and am using all the time:
New cool stuff everywhere:There’s just great little touches everywhere. Even About This Mac is better, showing how much space different types of files are using on your hard disk, just like for an iPod when it’s plugged in for syncing to iTunes (see screenshot). I accidentally quit the Preview app without saving a screenshot. When I next started Preview, there it was waiting for me. All the Apple Apps now just pickup where I last left them. After getting really used to “the usual”, it’s quite exciting stumbling over all these useful improvements.
Full screen apps: Just click a two headed arrow in the top-right corner of a window, and it expands to take the whole screen, with the menu bar shrinking away. The major Mac apps have been upgraded to support full screen mode, like Safari, iPhone, iTunes, Mail, iCal, Preview and it works with some third party apps like Chrome. To sweep between full screen apps, just slide three fingers horizontally across the trackpad. Ahhhh – iPad like simplicity, just focus on one task at a time. And get the whole screen for useful work.
Scrolling reinvented: Scroll bars tend to disappear in Lion. In Safari and the Finder they’re not there until I scroll with the trackpad or arrow keys. The scroll bars fade in while I’m scrolling and quickly disappear. This gives more visible area for content, be it a web page or picture thumbnails in the Finder. So you don’t panic at the lack of scroll bars, the Lion welcome app makes sure it tells you how to scroll with two fingers on the trackpad. Two finger scrolling is in the opposite direction to Snow Leopard, matching the iPhone and iPad. (This can be reversed.) When you scroll past the end, there’s a bouncing effect also a la iPad. While there is an adjustment, it feels more tactile & intuitive. Basically Lion takes the best elements of the iPhone experience (focus on one thing, get the interface out of the way) and starts to bring this to the Mac.
Mission Control: Swipe up with three fingers and I can clearly see all my windows, full screen apps and the dock, with windows from the same app stacked together, and the app icon on the bottom edge of the stacked windows. Just click to pick which window you want. Quick, clear, easy, awesome.
Eye Candy: Lion improves the Mac’s graphical interface. It feels lighter & cleaner, more refined, yet more friendly. It not obvious. I can’t quite put my finger on the changes – the progress bar pulses and it lighter, window corners seem different sometimes, the shadows are better perhaps, Finder icons have been revised, elements slide, move, contract and expand… The elements aren’t obvious, but collectively Lion feels quite different to previous OS X releases.
Lion looks and feels different. It’s got more life in it. It’s simpler, lighter, more effective more fun.
Lion Application Compatibility
Application compatibility has been good so far. I’ve tested Firefox, Opera, Chrome & Outlook. I still need to test Word, Excel, Photoshop and the like. An app I use to stream music throughout my house – Airfoil – falls over after suspend, but I’ve got no doubt that will be fixed very soon. My PHP configuration got broken by the Lion upgrade, taking down a WordPress site I working on, but that’s fixed now.
How to Get Lion
Mac OS X Lion is available only through the Mac App Store. Go the the Apple menu, choose the third item down “App Store…“.
Requirements to Upgrade to Lion
You need to be running Mac OS Snow Leopard 10.6.6 or higher, and have 4GB of free disk space to upgrade to Lion.
Lion Download
Lion downloaded ridiculously quickly for me, at almost 10 megabytes per seconds. Apple’s obviously done the work so if you’ve got a fast Internet connection, they’ll use every bit of it.
Time to Install Lion
It took about 40 minutes to install on my MacBook Air 1.6 GHz Core 2 Duo.
Lion Pricing
Pricing is $29.99 in the U.S. and AUD$31.99 in Australia.
Performance
All the new Lion features respond smoothly & quickly on my late-2010 MacBook Air. My Air runs Core 2 Duo 1.6 GHz., which is a slow processor compared to current Macs like the mid-2011 MacBook Air with a i5 or i7. Macs made in the last couple of years should run Lion well.
Conclusion
I highly recommend upgrading to Lion! It’s a big upgrade to OS X with lots of useful improvements you’ll use daily. I’m meant to keep my MacBook Pro running Snow Leopard so I can test on Snow Leopard, but to be honest, I don’t think I can resist upgrading.
If you found this article useful please comment, or click the Tweet or +1 buttons – thank you!
Here’s where to find httpd.conf on Mac. This is the httpd.conf location on Mac OS X 10.6 Snow Leopard and Mac OS X 10.7 Lion. This article also shows how to make the httpd.conf directory visible in the Mac Finder.
What is Httpd.conf?
Httpd.conf is the Apache web server’s main configuration file. Mac OSX ships with Apache installed. See Apache’s configuration docs for how to configure Apache.
Httpd.conf Location on Mac
On Mac httpd.conf location is in the directory /etc/apache2. You can access this folder through the Mac Finder or through the Mac Terminal.
Checked on OS X 10.7, 10.6.8, 10.6.7.
Httpd.conf Location in Mac Finder
You won’t normally see even the /etc/apache2 directory showing up in the Mac Finder. I tried looking in MacintoshHD, but /etc doesn’t show up.)
I found a tip at Codejacked on how to open hidden files in the Finder.
Here’s how to view httpd.conf’s directory in the Mac’s finder:
In the Finder, click the Go menu, and choose Go to Folder…
Type in /etc/apache2.
Click Go.
The Finder will show the apache2 folder, and in it, you’ll see httpd.conf.
Httpd.conf Location in Mac Terminal
You can also get to the httpd.conf file through a terminal session, which is okay if your comfortable in the Unix shell (bash):
tazpro:~ taz$ cd /etc/apache2
tazpro:apache2 taz$ ls
extra magic original users
httpd.conf mime.types other
Can’t Save Httpd.conf?
Httpd.conf is protected by OSX from being edited. If you open it with the TextEdit application for example, you won’t be able to save it. For details to bypass this security, see How to Easily Edit Httpd.conf on Mac.
Restart Apache to Apply Configuration Changes
Don’t forget you will need to restart Apache for your configuration changes in httpd.conf to be applied. To restart Apache on Mac:
Go to the Apple menu and choose System Preferences.
Changing a Mac’s name is easy. Here’s how to change a Mac’s computer name is four clicks. A Mac name change will affect the name that other computers see when they’re browsing the local network.
I’ve tested this method on Mac OS X 10.7 Lion and Mac OS X 10.6 Snow Leopard (10.6.7 and 10.6.8).
The Mac computer name is sometimes called a network name, or even a host name or hostname, which comes from OS X’s origins in Unix.
Here’s how to change a Mac’s name:
Click and hold the Apple menu and chooseSystem Preferences… To open the Apple menu, click on the Apple icon at the top left of the screen.
The System Preferences window will open.
Click the Sharing icon.
The Sharing icon is about the center of the widow.
It is in the row titled Internet & Wireless.
The contents of the window will change and
the window’s title will change to Sharing.
Click in Computer Name field and type the Mac’s new name.
The Computer Name field is at the top of the window.
Click the red circle at the top left of the Sharing window.
The Sharing window will close.
Your Mac’s name will change.
You’re done! – The Mac’s network name is now changed.
Do want to take a screenshot of an entire webpage, not just the part the webpage that fits on screen? This article describes how to take a full webpage screenshot using free software. This method will take a screenshot of a webpage, including the part below the fold. This method is automatic, and does not require manual scrolling.
This automatic method is much better than a manual scroll, shoot and stich process that many people still use:
Take a screenshot of the visible part of the webpage.
Scroll to the next part of the webpage.
Take another screenshot.
Repeat until there’s a screenshot of every part of the webpage.
Manually stitch the shots together in Photoshop or Gimp.
The automatic solution is to use the Screengrab add-on for Firefox.
Here is an example screenshot I created using Screengrab:
Screengrab can either copy the screenshot to the clipboard, or save the screenshot as an image file. Screengrab can screenshot a complete page, a complete frame, the visible portion of a page, selection of a page, or a window.
For more information about Screengrab, or to install it in FireFox, go to the Screengrab plugin page. Once Screengrab installed, just click the little icon at the bottom right of the FireFox window to take a screenshot.
If the page is very, very tall, when you save a screenshot image, it has happened to me that the PNG could be squashed vertically. Here is a workaround I use get the very tall screenshot in the right proportions on Mac:
Screenshot the entire web page to the clipboard (instead of saving it to an image file).
Open the Preview application.
Choose File | New from Clipboard.
The image will appear in the right proportions in Preview.
Save screenshot from Preview in the image format of your choice.
Tested with Firefox 3.5 on Mac OS X 10.6 Snow Leopard, and FireFox 4.0 (4.0.1) on Windows 7.
Files and directory names starting with a dot are treated as hidden files on operating systems derived from Unix. That means you won’t normally see these dot files in Mac OS X, Linux, FreeBSD or enterprise Unix.
Linux includes Ubuntu, Red Hat, CentOS, SuSE, Debian, Fedora & Mandriva. Unix includes Enterprise Unix like AIX, HP/UX and Solaris.
Hidden files are typically used for configuration or program history. For example:
.bash_history contains a Unix user’s shell configuration.
(A Unix shell is used to enter text commands.)
.ssh is a directory holding configuration files for SSH.
.bash_history keeps the history of shell commands entered.
.htaccess is used to override a folder’s Apache configuration.
Files are typically hidden so they don’t distract from the files people usually work with, such as documents, movies or music.
To list hidden files in a terminal session, add the -a option to the ls (list files) command. Here you can see the difference from a normal ls:
Tazs-MacBook-Air:~ taz$ cd /Users/taz
Tazs-MacBook-Air:~ taz$ ls
Backups Movies
Desktop Music
Documents Pictures
Downloads Public
Library Sites
Tazs-MacBook-Air:~ taz$ ls -a
.
..
.CFUserTextEncoding
.DS_Store
.Trash
.Xauthority
.bash_history
.cups
.fontconfig
.lesshst
.mysql_history
.ssh
.viminfo
Backups
Desktop
Documents
Downloads
Library
Movies
Music
Pictures
Public
Sites
The cd command means change directory to.
There are two special files in this listing. The single dot file “.” is the current directory. The double dot file “..” is the parent directory. To see how this works:
I’ve tested the commands above for working with hidden files on Mac OS X 10.7 Lion, Mac OS X 10.6 Snow Leopard (10.6.7, 10.6.8), Ubuntu Server 7.04, Ubuntu Server 10.10 LTS, Ubuntu Desktop 10.04, CentOS 5.1, 5.3 & 5.4, Red Hat Enterprise Linux 5.6, as well as ancient HP/UX, AIX and Solaris versions. They should work on nearly every Unix-based system.
Hackers sometimes hide files using dot files.
Nearly all file transfer programs provide an option to show hidden files. Dot files like .htaccess are essential for some websites to work. Dot files can be a security risk. Many file transfer programs show files starting with a dot by default.
If you have more questions about hidden files, please post a comment below.
Here’s where to find the Apache 2 web server configuration file httpd.conf The httpd.conf directory differs across Linux & Unix variants like CentOS, Mac OS X, Red Hat, Ubuntu and XAMPP Mac.
This table lists the httpd.conf location for each operating system:
Operating System / Linux Distro
httpd.conf Location
CentOS 5.2
/etc/httpd/conf/httpd.conf
CentOS 5.3
/etc/httpd/conf/httpd.conf
Mac OSX 10.6 Snow Leopard
/etc/apache2/httpd.conf
Mac OSX 10.7 Lion
/etc/apache2/httpd.conf
Red Hat Enterprise Linux Server 5.6 Tikanga (RHEL)