Your HOSTNAME not staying?

Ran into this recently. Not sure if it is a new “feature” of Mac OS X 10.5.7, or just the way my new AT&T U-verse router works.

Say you happen to do a clean install of Mac OS X (or any OS really), then connect to your wireless network, then do all the system updates, [...]

Protecting Apache Served Directories

Surprised I haven’t written this up before now. It is very simple to do.

This assumes you are using apache on a unix based system. This should work on any OS running apache though.

In the directory you want to restrict create a file named .htaccess that contains the following:

AuthType Basic
AuthName "RESTRICTED ACCESS"
AuthUserFile /home3/speedtow/.htpasswd
Require valid-user

Note: [...]

How to setup a Mac OS X MAMP based Web Server

In the past I had a mediawiki setup on my local MBP that I would use to keep notes.  This is a copy/paste of this article.  The ToC links do not work, but the rest of the links should work.   If you need to setup MAMP on a Mac, keep on reading after the break.

Contents

(these [...]

Install MySQL on Mac OS X 10.4.x

10.4.9 Intel / MySQL 5.0.41

Get MySQL from http://dev.mysql.com/downloads/mysql/5.0.html, download this Mac OS X 10.4 (x86) (package format) version
Open the .dmg and install the two package files and one prefPane included:

mysql-5.0.41-osx10.4-i686.pkg
MySQLStartupItem.pkg
MySQL.prefPane

go into yoru System Preferences and start up MySQL (in the MySQL preference pane you just installed)
make sure /usr/local/mysql/bin/ is in your path, if not edit [...]

Install PHP5 on Mac OS X 10.4.x

Install MySQL on Mac OS X if you haven’t already
Install XCode if you haven’t already
Do either this:

Open NetInfo Manager
Modify /groups/wheel/users, add a new value for your login id, this will come into play later

or this:

$ niutil -appendprop / /groups/wheel users yourloginid

Get PHP Complete Source Code from php.net – http://php.net/get/php-5.2.2.tar.gz/from/a/mirror (more current versions are out now)
Open [...]

Enable PHP on Mac OS X 10.4.x

10.4.9

Edit the httpd.conf file
Uncomment the lines that contain php
Restart apache
Confirm it works via phpinfo.php
fix PEAR – see Enable PEAR on Mac OS X 10.4.x

command summary of the above (assuming you know what to do in vim)

$ sudo vim /etc/httpd/httpd.conf
$ sudo apachectl restart
$ vim /Library/WebServer/Documents/phpinfo.php

phpinfo.php contents

<?php phpinfo(); ?>

Enable PEAR on Mac OS X 10.4.x

10.4.9
There are two ways to do this:

Most Secure – but not tested

Open NetInfo Manager
Modify /groups/wheel/users, add a new value for your login id
Verify it works:

$ pear list

Less Secure – but tested

give full access to /usr/lib/php

$ sudo chmod -R 7777 /usr/lib/php/

NOTE: This makes PEAR work, still need to verify that PHP and PEAR are working together

10.4.10 [...]