Just another blog.

Posts filtered by tag: HowTo

Updating PHP (and Apache) on PowerPC Macs

Maybe you know the problem, you want to test your new website locally before uploading it to somewhere where it's publicly accessible.

On PowerPC Macs the latest PHP you can get on Leopard is 5.2.x and on Tiger it's even 4.x...
You want the latest and (probably) greatest? Here you go:

Installing Apache and PHP from MacPorts should be done in less than half an hour on an Intel Mac as most of the packages are precompiled already.
On a PowerPC Mac though there are no precompiled packages, and your Mac has to compile them all locally which will take quite some time.
If you want to build 64-bit binaries on a G5, this will lead to errors. Be aware that not all of them are easy to fix.
If you can't get them fixed it's a good idea to ask for help in MacPorts' IRC channel. The guys there are very friendly and they've helped me quite a few times so far.

First you need MacPorts:

  1. If you haven't already, install Xcode (you can find it on your OSX Install Disc)
  2. If you haven't already, install MacPorts

After you have MacPorts installed, open a new Terminal window and run the following commands:

First, let's update the MacPorts port tree so we have access to the latest packages.

sudo port selfupdate

Install PHP (this command installs the latest version of PHP 5.6)

sudo port install php56

...get yourself a cup of coffee...

Set up a basic php.ini
(if you want to use this installation for production, replace "development" with "production")

sudo cp /opt/local/etc/php56/php.ini-development /opt/local/etc/php56/php.ini

Check what version you have installed. If this fails your installation is broken. (optional)

php56 --version

Now let's install Apache

sudo port install apache2

...get yourself another cup of coffee...
Do not run sudo port load apache2 after it finished!

sudo port install php56-apache2handler

...maybe you want one more cup of coffee?
After the installation, enter the following commands like the script tell you to:

cd /opt/local/apache2/modules  
sudo /opt/local/apache2/bin/apxs -a -e -n php5

OK. A base-installation of Apache and PHP is now installed, but how do you run them?
Wouldn't it be nice if you could start and stop them by clicking the checkbox inside your System Preferences?
Of course it would, so let's do that!
The procedure is dependant on which operating system you're using.

On Leopard (or higher)

Make sure Web Sharing is turned off in System Preferences!

For n3rds (or interested people):

If you toggle the checkbox, this enables or disables a LaunchDaemon which takes care of keeping Apache running.
How does it do that you wonder? It runs /usr/sbin/httpd -D FOREGROUND and keeps it running until the LaunchDaemon is killed (when you shut down e.g.)

So let's edit that LaunchDaemon (to take care of our Apache installation):

nano /System/Library/LaunchDaemons/org.apache.httpd.plist

Replace the first entry of the ProgramArguments array (which should be: usr/sbin/httpd) with /opt/local/apache2/bin/apachectl

It should then look like this:


Press Ctrl+O to save and Ctrl+X to leave nano.
You can now turn on Web Sharing again (and it should work).

On Tiger (or lower)

Make sure you have Personal Web Sharing turned off in System Preferences!

For n3rds (or interested people):

If you toggle the checkbox, it only sets the -WEBSERVER- entry in /etc/hostconfig and launches the "/System/Library/StartupItems/Apache/Apache" script with start or stop parameters.
You can also run it yourself if you want:
sudo sh /System/Library/StartupItems/Apache/Apache [start|stop]

First let's adjust the path to apachectl:

sudo mv /usr/sbin/apachectl /usr/sbin/apachectl-13  
sudo ln -s /opt/local/apache2/bin/apachectl /usr/sbin/apachectl

And then adjust httpd.conf

sudo nano /opt/local/apache2/conf/httpd.conf

Append the following line (I've put it after ServerRoot)

PidFile "/private/var/run/"

Press Ctrl+O to save and Ctrl+X to leave nano.
You can now turn on Personal Web Sharing again in System Preferences (and it should work).


You can now enable Web Sharing test your new installation.
If PHP is not working, please check that

For every change you do to the httpd.conf or any other Apache conf, you have to restart Apache to apply them. You can do this by simply unchecking and then checking again the checkbox in System Preferences.

written by: Takashi Yoshi
Tags: PowerPC, HowTo

How To: Getting Google Music Manager to work on PowerPC, again!

As we all know, Google hates PowerPC and none of their desktop apps nor most of their plug-ins are still available for PowerPC Macs even though they often support Leopard.

But there are some exceptions where the Product Quality Manager was a bit drunk and made some Universal Binaries available to the public.

The "Google Music Manager" was one of these until Google decided that they should release a new version and break the full PowerPC compatibility leaving you with a build that ran on PowerPC. However, you cannot use the Preference Pane, which actually is the most important part of the whole application.

Just stay with the old version you thought? Nah, Google somehow changed their login procedure (or whatever they've messed with) which leaves you with a neat "error code 5".

But fortunately the Product Quality Manager came to work drunken again and left the build half working which lets us fix the build with a few (more or less) easy steps and upload songs to Google Play Music from our beloved PowerPC's :)

So here we go:

  1. You need two disk images (one with the old version of the Music Manager (1.0.27) and one with the new version (1.0.65)). I've provided them to you and you can download them from here:
  2. After you have them both downloaded you mount "musicmanager_1.0.65.1341.dmg" (the new version)
  3. Drag "Music" to your Applications folder.
  4. Unmount "musicmanager_1.0.65.1341.dmg".
  5. To fix the new build we need the old preference pane which we get from (means you have to mount the image) "musicmanager_1.0.27.206.dmg" (the old version)
  6. "Show Package Contents" of "Music" (from the image you've just mounted) and open Contents/Resources.
  7. "Show Package Contents" of "Music" (from your Applications folder) and open Contents/Resources (now it's important that you don’t confuse both windows as they look pretty similar!)
  8. Copy "MusicManager.prefPane" from the Music Manager you opened from your Applications folder to a temporary location.
  9. Replace "MusicManager.prefPane" (in the new version) by the one you find in the old version.
  10. "Show Package Contents" of the Preference Pane you have just replaced and open Contents/Resources
  11. "Show Package Contents" of the Preference Pane from your temporary location and open Contents/Recources.
  12. Replace the "Music" from the "real" Preference Pane with the one from your temporary location.
  13. Done.

Now you can launch Music Manager and have a full working (as far as I could test it) copy of Google's Music Manager!

written by: Takashi Yoshi
Tags: HowTo, Google Play Music

How To: Exchange Android Lock-Handle

In this blogpost I'm going to explain you how you can exchange Android's lockscreen handle.

First I have to say that you have to

Even though everything should work fine with this method (I've used it multiple times) I won't take any responsibility for bricked, hanging devices or anything else that might happen.
You must be aware that this is an unforeseen modification to Android!
You're doing this at your own risk.

Some ROM's change the handle, but their handles are not always beautiful.
If you just want to get the original handle back, you could try to flash this zip:
It should work on any ROM, but I won't take responsibility for this zip either.

OK. Let's get started.

  1. Get into recovery
  2. Mount the system partition. In CWM it's: mounts and storage -> mount system
  3. Open a Terminal window
  4. Enter "cd ~; mkdir lockhandle; cd lockhandle" (This is not obligatory. You can put your files whereever you want to. Just mind the file paths in the following steps then.)
  5. Enter "sudo adb devices" to check whether your device is being recognized.
  6. If it's been recognized, enter "adb pull /system/framework/framework-res.apk ./"
  7. Make the apk into an extractable zip: "mv framework-res.apk"
  8. "open ." (If this command does not work, just open the actual folder in your prefered file browser)
  9. Open with BetterZip (or any other application that allows you to modify a zip’s contents without extracting it)
    BetterZip window
  10. Navigate to the "res/"-directory inside the zip file.
  11. Replace the desired graphics in the "drawable-*" folders. (They're called "iclockscreenhandle_normal.png")
  12. Save the modified zip file
  13. Back in Terminal, make it an apk again: "mv framework-res.apk"
  14. Copy the apk file back to your device: "adb push ./framework-res.apk /system/framework/framework-res.apk"
  15. Reboot your device: "adb reboot"
  16. If you wish, delete the temporary folder created at the beginning: "cd ..; rm -r lockhandle"

That's it. Have fun with your new lock-handles :)

written by: Takashi Yoshi
Tags: Android, HowTo

Neue Adresse für US-iTunes Account finden.

Seit ein paar Tagen teilt iTunes mir, und auch ein paar anderen, nun mit, dass man den Account nicht mehr verwenden kann, weil keine gültige Adresse eingetragen ist.

Doch eigentlich ist es gar nicht so schwierig an eine gültige Adresse zu kommen.

Apple hat einige Stores in den USA gebaut, warum nicht einfach eine solche Adresse nehmen?

Auf der amerikanischen Apple-Seite gibt es einen"Store-Finder".

Einfach einen aussuchen, eintragen und ihr könnt euren Account wieder benutzen.

written by: Takashi Yoshi
Tags: HowTo, iTunes, iPhone

Einmal die Tapete weg, bitte!

Seit iOS 4 sind sie auf gewissen iPhones da, die schönen Homescreen-Wallpaper. Auf Geräten ab der 3. Generation kann man nun auch ein Bild hinter die Icons legen.

Die Freude wird allerdings dadurch getrübt, dass diese das iPhone an sich ziemlich stark verlangsamen können. Das ist wohl auch der Grund, wieso sie Apple auf den Geräten der 2. Generation deaktiviert hat.

Braucht man das Hintergrundbild nicht unbedingt und möchte ein schnelleres iPhone, kann dies durch ein bisschen "Plist-Fummlerei" deaktivieren.

Das iPhone muss jailbroken sein, damit wir vollen Zugriff auf das Dateisystem haben.

Was ihr braucht, ist die App "iFile".

In iFile wechselt ihr nun in folgendes Verzeichnis:


Dann müsst ihr runterscrollen, bis ihr die Dateien N82AP.plist, N88AP.plist und N90AP.plist seht.

N82AP.plist = iPhone 3G
N88AP.plist = iPhone 3GS
N90AP.plist = iPhone 4

Nun öffnet ihr die richtige Datei mit dem "Property List Viewer".

Im "capabilities"-Directory müsst ihr nun schauen, ob ihr einen Schlüssel "homescreen-wallpaper" findet.

Falls er nicht vorhanden ist, erstellt ihr mit dem "+"-Knopf einen. Diesen nennt ihr dann "homescreen-wallpaper", achtet darauf, dass er vom Typ "Boolean" ist und im capabilities-Directory angelegt wird.

Habt ihr den Schlüssel nun, müsst ihr auf Off stellen und auf Done tippen.

Jetzt sind wir schon fast fertig.

Noch einmal respringen oder Neustarten und das Hintergrundbild ist weg.

Falls ihr doch wieder ein Bild wollt, macht ihr das gleiche nochmal und stellt den Schlüssel "homescreen-wallpaper" einfach auf ON.
Wer die Hintergrundbilder auf dem iPhone 3G aktivieren möchte, kann auch hier nach dem gleichen Muster vorgehen und den Schalter auf ON stellen.

Dies ist nur ein Weg, um dies zu bewerkstelligen. Es gibt noch mehr Möglichkeiten. Wichtig ist, dass ihr Zugriff auf das Dateisystem habt und die richtige Datei richtig bearbeitet.
Wie immer übernehme ich keine Haftung. Wer sich nicht sicher ist, lässt dies besser sein.

Was macht die N82AP.plist% / N88AP.plist% / N90AP.plist%?

Dies ist eine Backup-Datei, die immer den letzten Stand der veränderten Datei enthält. Wenn ihr mal was verstellt, was ihr besser nicht verstellt hättet, könnt ihr von dieser Datei wiederherstellen.

Wie geht ein "Respring" am einfachsten?

Durch einen Bug im SpringBoard, könnt ihr jedes iPhone ganz einfach respringen, sofern auf dem iPhone Multitasking aktiviert und "Triple-click Home" in den Bedienungshilfen-Einstellungen auf "Fragen" gestellt ist.

  1. Auf die erste Home-Screen Seite wechseln
  2. Home-Button drücken (Spotlight)
  3. Home-Button 2x drücken (Multitasking)
  4. Home-Button 3x drücken (Bedienungshilfen)
  5. Weils so schön war, den Home-Button noch einmal drücken.

PS: Ich habe dieses Tutorial bewusst nicht für jeden verständlich geschrieben. Wer nicht versteht, was hier gemacht wird, lässt dies wohl besser sein. Benutzt euer iPhone so wie es vorgesehen ist, sonst macht ihr mehr kaputt.

written by: Takashi Yoshi
Tags: iPhone, HowTo
Tutorials, reviews, experiments, and, of course, my opinion on things…
Subscribe our feed:
RSS2.0, RSS1.0, Atom
blog powered by EF Blog