iPhone, Airprint and HP F4580 all in one
I got an iPhone, running iOS 4. iOS 4 has a new functionality called Airprint, with which you can print to wifi printers. The iPhone is connected to our home wifi router. Our HP F4580 printer is also connected to our wifi router.
I should be able to print wirelessly from the iPhone to the HP, right?
Wrong.
Airprint only works on a selected few HP printers (according to the Apple page on AirPrint, a whopping 16 models in total), and on nothing else.
In comes Netputing's AirPrint Activator. Apparently, all it does is add one single line to the CUPS configuration on your mac; then you share the printer from your Mac et voilĂ : printing from the iPhone...
Now I think it's a bad move from Apple not to enable this by default.
Symfony – first project
Creating a project
Now the basis tools are installed, let's create a project. I'll use the tutorial at Jason Grissom's page.
First, we have to create a Subversion repository. if you use the command as stated on Grissom's site, it won't work:
g4:~ arthur$ svnadmin create /Users/arthur/SVN-Repos/learn-symfony
svnadmin: Repository creation failed
svnadmin: Could not create top-level directory
svnadmin: Can't create directory '/Users/arthur/SVN-Repos/learn-symfony': No such file or directory
... because you'll have to create the SVN-Repos directory first. When that's done, the command will run and won't give you feedback when it's successfull.
Now we'll create a directory for the site itself. As my Mac is running MAMP, it makes sense to put it in the htdocs directory of the MAMP installation.
g4:~ arthur$ mkdir /Applications/MAMP/htdocs/learn-symfony
Then, we move to that directory and run he symfony command with the generate:project flag. This will create the necessary files and directories inside the project directory:
g4:~ arthur$ cd /Applications/MAMP/htdocs/learn-symfony
g4:learn-symfony arthur$ /Applications/MAMP/Library/share/symfony/1.4/data/bin/symfony generate:project LEARN_SYMFONY
Now import these changes into the SVN repository.
g4:bin arthur$ svn import /Applications/MAMP/htdocs/learn-symfony file:///Users/arthur/SVN-Repos/learn-symfony -m "initial import"
Problem with day 3 of the Jobeet project: solved
So, I am following the Jobeet tutorial and had come to day 3. I am now using my MacBook Pro running Snow Leopard, and Zend server CE.
Now when I came to the point where the tables are created using this command:
Arthurs-Mac-Pro:jobeet arthur$ symfony doctrine:insert-sql
I got this error:
Warning: PDO::__construct(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in /usr/local/zend/share/symfony/1.4/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection.php on line 470
PDO Connection Error: SQLSTATE[HY000] [2002] No such file or directory
The problem here is that the mysql.sock Mac OS X expects to use is not there; because Symfony is not using the Mac mysql installation but the Zend mysql. I had to tell Mac where the Zend mysql.sock file is.
Here's how I did it, following the instructions on Stephen Rhoades' site:
First, find out where the mysql.sock lives that Zend uses. In my case, it's in /usr/local/zend/mysql/tmp/
Now in the error message you see that Mac OS expects it to be in /var/mysql/.
So I created a symlink to the Zend mysql.sock in /var/mysql:
Arthurs-Mac-Pro:jobeet arthur$ sudo mkdir /var/mysql
Arthurs-Mac-Pro:jobeet arthur$ sudo ln -s /usr/local/zend/mysql/tmp/mysql.sock /var/mysql/mysql.sock
There also is a my.cnf, Mac OS expects to be in /etc. Zend stores it in /usr/local/zend/mysql/data/.
Also make a symlink for that file:
Arthurs-Mac-Pro:jobeet arthur$ sudo ln -s /usr/local/zend/mysql/data/my.cnf /etc/my.cnf
And after that... success!
Setting up a PHP developing environment, part 2
After we installed MAMP and Symfony, and changed the password for MySQL, on to the next steps.
Install Eclipse PDT
PDT stands for PHP Developer Tools. If you are on a current OS, just install the newest Eclipse PDT version. Annoyingly, although the link to the Mac OS X Carbon file is there, the actual file is not. It seems PowerPC support is dropped on the 2.2 Helios version, so I chose the 2.1 Galileo release, which is based on Ecipse 3.5.
Subversion
On a Mac, from OS X 10.5 on, Subversion is already installed; you can check the version by typing svn --version:
g4:~ arthur$ svn --version
svn, version 1.4.4 (r25188)
If we want to use Subversion with Eclipse, the plugin Subclipse is needed. But there's a caveat; you can't just install any version of Subclipse on any version of Eclipse and Subversion and expect it to work.
We have the following table of working combinations:
- Eclipse 3.5 needs Subclipse 1.4 or 1.6
- Subclipse 1.4 needs Subversion 1.5
- Subclipse 1.6 needs Subversion 1.6
- Installed on Mac OS X 10.5.8 is Subversion 1.4
It's always nice to use the newest software possible; so let's see if Subclipse 1.6 is installable.
Follow the instructions on the Subclipse download and install page. When the installer reaches step 6, there will be a few more features that are found to be installed. Check them all and install those too.
After that it's time to install the newest Subversion for Mac OS X 10.5 from CollabNet. This is needed to get the necessary JavaHL library, without which Subclipse won't work. You need to register on the CollabNet site to get this.
After installing, there is some post install work to do.
First, add the following line to your ~/profile file. If you don't have one (my account hadn't) just create a new one.
export PATH=/opt/subversion/bin:$PATH
Then, if you are using an Apache subversioning server, edit /usr/sbin/envvars:
g4:bin arthur$ cd /usr/sbin
g4:sbin arthur$ sudo vi envvars
insert /opt/subversion/lib: into the line containing to look like this:
DYLD_LIBRARY_PATH="/opt/subversion/lib:/usr/lib:
$DYLD_LIBRARY_PATH"
Alright! The installing phase is over. Next up: creating the first project.
Setting up a PHP developing environment, part 1
I want to turn my old Apple G4 running Mac OS X Leopard 10.5.8 into a Apache/MySQL/PHP developing machine. Here I will describe how I plan to accomplish that.
There already is a guide on mummey.org that I will follow a bit; it's 3 years old though so I will follow that with caution.
You won't be able to use Zend Server CE on PowerPC Macs, as it is Intel only.
Now on to the steps I took to setup my environment.
Install XCode
Download and install Xcode. I did this primarily to get gcc installed. It's a bit overkill, maybe, but it works. You'll have to log in with your Apple ID to get it.
Installing MAMP
Then download and install MAMP. It's free, and it consists of a Apache/MysQL/PHP stack that is capable of running on an old PowerPC powered Mac.
Changing default MySQL password
Next, set a new password for MySQL and PHPMyAdmin. MAMP must be running in order to change the password. The default is user=root, password=root.
The command to use is:
g4:bin arthur$ sudo ./mysqladmin -u root -proot password NEWPASSWORD
NEWPASSWORD is your personally chosen new password. Don't use spaces, and don't use special characters.
Also note there is no space between -p and root! This is NO TYPO; if you do have a space between p and root, you'll get an error like: Unknown command: yournewpassword.
Now edit the information in the phpMyAdmin config file:
g4:bin arthur$ cd /Applications/MAMP/bin/phpMyAdmin
g4:phpMyAdmin arthur$ sudo vi config.inc.php
Find the following line and change 'root' to the new password, within single quotes:
$cfg['Servers'][$i]['password'] = 'root'; // MySQL password
Now if you open the MAMP localhost server page, you'll get an error: Error: Could not connect to MySQL server!
That's because that site still uses the old root/password configuration. So let's change that too:
g4:phpMyAdmin arthur$ cd /Applications/MAMP/bin/MAMP
g4:MAMP arthur$ vi index.php
Now in the 3rd or 4th line, change the second 'root' to your newly created password, within single quotes:
$link = @mysql_connect(':/Applications/MAMP/tmp/mysql/mysql.sock', 'root', 'root');
Save and reload, and the http://localhost page should open.
By the way, if you want to use MAMP without having to add a portnumber, you can change that in MAMP's preferences, under the ports tab.
Click on the Set to default Apache and MySQL ports button:
Installing Symfony
After that, install Symfony. I used the svn checkout method, mentioned on Jason Grissom's tutorial.
I installed it in the /Applications/MAMP/Library/share/symfony directory:
g4:bin arthur$ cd /Applications/MAMP/Library/share
g4:share arthur$ sudo mkdir symfony
g4:share arthur$ cd symfony
g4:symfony arthur$ sudo svn checkout http://svn.symfony-project.com/branches/1.4/
OK, that's all the time I had for part one...
After this post we have:
- gcc installed with XCode
- a running MAMP environment
- with a more secure password on the MySQL root account
- and symfony installed by using svn checkout on the svn repository.
Install Mac OS X 10.5.x on unsupported Macs
Now that Apple G4 PowerMac is all nice and stuff, but OS X 10.3.9 is seriously underachieving in functionality.
I plan to use it as a development/webserver machine, and as Snow Leopard only will run on Intel (DUMmmm - dumdumdumdum) Macs, Leopard would be the newest OS to install... except this is a 733Mhz machine, and the Leopard installer won't install on machines with a CPU slower than 867Mhz.
Luckily, Lowendmac.com has an article in which they explain how to use OpenFirmware to trick the installer to think it's installing on a faster machine. There was a utility called LeopardAssist, but the link doesn't work anymore.
On with the trick, straight from lowendmac.com:
To install Leopard on an "unsupported" G4 clocked under 867 MHz:
1. Reboot your Mac and hold down the Cmd-Opt-O-F keys until you get a white screen with black text. This is the Open Firmware prompt.
2. Insert the Mac OS X Leopard Install DVD.
3. Type the following lines exactly as shown below into the Open Firmware prompt. Be mindful of capitalization, spaces, zeros, etc. If the command is properly typed and understood, Open Firmware will display "ok" at the end of each line after you hit "return". What these lines do is set the CPU speed reported by Open Firmware to OS X as an 867 MHz G4 processor system. They then continue the boot from the DVD drive.
For single CPUs, use the following three lines:
dev /cpus/PowerPC,G4@0
d# 867000000 encode-int " clock-frequency" property
boot cd:,\\:tbxiFor dual CPUs, use the following five lines:
dev /cpus/PowerPC,G4@0
d# 867000000 encode-int " clock-frequency" property
dev /cpus/PowerPC,G4@1
d# 867000000 encode-int " clock-frequency" property
boot cd:,\\:tbxi4. Continue the install normally.
5. This CPU setting is only in effect until the Mac reboots. Once OS X Leopard is installed and your Mac has rebooted, the proper CPU speed should once again be displayed when you select About This Mac under the Apple menu.
This actually worked flawelssly! So now I have an very slow mac, running Leopard.
Gaining access to Mac OS X 10.3.9
A few weeks ago I got a 2001 Apple PowerMac G4 Quicksilver for free!
It's only got a 733mhz processor, can not see harddrives bigger than 120GB, and is almost maxed out at 1.25GB Ram... but still, very happy with it.
Now it came with Mac OS X 10.3.9 Dutch (yuck) installed, set to autologin, without the admin password. So basically I couldn't do very much with it.
Doing a bit of research I found the following trick, with which you can create yourself a brand new admin account...
Here's how:
- Restart the computer in Mac OS X single user mode by holding Command-S at startup.
- Mount the computer's drive for read/write access. To do so, type the following command at the command prompt, and then press Enter:
% mount -uw /- Remove the file that identifies that the initial run of the "Mac OS X Setup Assistant" has been completed, with this command at the command prompt, followed by Enter:
% rm /var/db/.applesetupdone- Restart the computer by entering this command, followed by Enter:
% reboot- The Mac OS X Setup Assistant screen should appear after the reboot, just as it does when you start up a brand new computer or upgrade to a new version of Mac OS X.
- Create a new user account with the Setup Assistant. Be sure to name this user something different than the admin user that already exists on the system.
You're done!
Steve Jobs shows the iPad
There's a lot of iPad bashing going on. I think that's cheap and easy. Just hold your verdict until you see and handle one in reality. I think it looks promising.
Saw this pic of Steve Jobs on On Gizmodo.com:

Macgerelateerde Stellingen
1. De Apple MacBook Pro is de beste computer die ik ooit in handen heb gehad.

2. Photobooth is leuk!











