suExec fpr Apache under OS X

Apple confessions of a pixel pusher OSX technology

In order to get Apache running with suexec under OS X 10.4.11 and also have php you will need to do the following:

1) get the apache sources. (1.3.39)

2) get the php4 sources (php-4.4.8)

3) extract in the same directory and go into the php one to run:

./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/share/man \
--with-xml \
--with-apache=../apache1.3.39

make
sudo make install

4) then go into the apache folder and

./configure --with-layout=Darwin \
--enable-module=most \
--enable-shared=max \
--enable-suexec \
--suexec-caller=www \
--suexec-docroot=/Library/WebServer/Documents \
--activate-module=src/modules/php4/libphp4.a \
--suexec-userdir=Sites

make -j2
sudo make install

5) I had to change /etc/httpd/htddp.conf like:

comment out modules in httpd.conf
#LoadModule userdir_module libexec/httpd/mod_userdir.so

#LoadModule php4_module libexec/httpd/libphp4.so
#LoadModule hfs_apple_module libexec/httpd/mod_hfs_apple.so
#LoadModule bonjour_module libexec/httpd/mod_bonjour.so

#AddModule mod_userdir.c

AddModule mod_php4.c
#AddModule mod_hfs_apple.c
#AddModule mod_bonjour.c

Please note that mod_php4 gets added but not loaded. Probably since it got compiled in.
My httpd rejected to start with hfs_apple or bonjour loaded and crashed with userdir.

install apple developer tools in the command line

Apple confessions of a pixel pusher linux OSX

Since years I work on a couple of computers via command line. Since they are real unix computers it all works remarkably well. For a specific solution I need to run osacompile. AppleScript needs to get compiled. I did not find a way to distribute it as text. So finally I got a hold of an OS X machine in the internet. More on that part later. osacompile really wants to run the application that it will talk to later. Also rather odd. But, hey, we talk Apple here. A sect in disguise of a technology company. So everything is possible. Or rather impossible. Like adding a development environment. The Box happened to have no Dev Tools installed. Usually that’s maybe a bit timely but overall straight forward. Installing development tools on a unix computer.
With Apple OS X 10.4.11 it turns out that doing so via ssh is not as trivial. You can download the source code. But first you need to create a developer account with ADC. It’s free. It’s annoying. They keep forgetting my password. Once you logged in,
you could download the dmg file to your local machine. I could have done that and waited only a couple of weeks for my DSL to upload the 900+ MB file to the final server I need it on. Downloading the dmg directly did not work. I had to fake a login. Which is easier as it seems. In the browser that is logged in (firefox I assume) you look for a cookie called ADCDownloadAuth. This you copy paste into the following command line:

curl -b "ADCDownloadAuth=SomeVeryLongCookieString" -O \
http://adcdownload.apple.com/Developer_Tools/xcode_2.5_developer_tools/xcode25_8m2558_developerdvd.dmg

At least that’s the valid file of today.
Once you have the file you attach (aka mount) it via:

hdiutil attach xcode25_8m2558_developerdvd.dmg

and navigate into

/Volumes/Xcode Tools/Packages

to then run:

sudo installer -verbose -pkg XcodeTools.mpkg -target /

Don’t run this against XcodeTools.mpkg in /Volumes/Xcode Tools directly. This results in the error message:

2008-01-09 03:47:43.889 installer[2843] IFPkg::_parseOldStyleForLanguage - can't find .info file (XcodeTools)

which does not google very sucessful.

The install seems to work, from what I can tell so far. I have gcc and make. And that’s all I cared for.

apple and unix

Apple history OSX technology unix

In unix you tell the system via a file called /etc/fstab which drives should be mounted.
Simple. Works. Except for OS X. Some crazy new fancy database sheme was supposed to replace /etc/fstab. It was all so amazing. It is junk, that’s what it was. Didn’t stop Apple-Idiots to claim it would be amazing. And countless websites offered help. What was one line a file became pages and pages of instructions.

Finally with 10.5 /etc/fstab is also part of OS X. It took years. It’s good that it’s there. it’s not good that it did not become available in the updates to 10.1, 10.2, 10.3 and 10.4. Apple is idiotically stubborn sometimes.

can not find that host?

Apple OSX technology

Once in while my OS 10.4.11 machine goes stupid, and has trouble resolving specific host names.

Opening a terminal window and entering:


sudo killall -HUP lookupd

fixes this. Lookupd is one of these more stupid Apple ideas. But since Cupertino has inherited the infallible attribute from the Roman Catholic Church it is pointless to tell them about it. Apple is so shiny and perfect to the outside. Inside it just looks like the Roman Catholic Church on the peak of it’s power.

OS X 10.5 as seen by ars

Apple OSX

A review that’s worth the read. I have not even seen 10.5 yet. I suffer from feline-confusion anyway. I remember pretty much what changed from 10.2 ro 10.3 but would need to think hard what animal it was.

apple

Apple marketing OSX technology

That whole ‘think different’ campaign:

had to come out and haunt them. Once they stopped doing so, and sold their image to peddle some ringtones. Apple is just like AT&T or Exxon Mobile for that matter. They all are just trying to make as much money as they can.

slow with one point five GB

Apple OSX

So, my MacBook Pro has one and a half Gigabyte. Plenty, so I thought. After all I have been crusing those internets -and thats pretty much what I am doing with the machine- happily with 640MB a couple of years back.

Still, it started swapping. You can always tell: things get really slow, specially when switching back to firefox for instance. Activity monitor sure enough showed that dreaded almost all yellow circle with just a token line of green left.

Then I realised what had changed: I had re-enabled spotlight in /etc/hostconfig. Spotlight is a waste of many things: screen real estate, hope, memory, CPU cycles and mind space. I have never ever seen somebody use it happily in real life, or telling me: “I found my stuff again, thanks to Spotlight”. Good idea, ill implemented. To say the least. But wait, Apple can not make bad software. That’s impossible.

keys for brightness don’t work on OS X laptop anymore

Apple OSX

Somehow it always seems to happen after using a laptop for a while: the screen brightness control via function keys stops working. No idea why, no any of those modifiers like ‘alt’, option, fn command don’t help either. It’s probably a pretty strange hack, but Amit’s code to control the screen brightness works like a charm.

quicktime: I hate yer

Apple OSX technology

Old and rotten APIs should be politely guided to the graveyard of history. And freaking shot! But, no, some clueless public prodcasting people still enjoy the merits of using ‘real player’. Now Microsoft and Adobe get into a fight over movie playback systems. At least that’s what the tech journalists tell us. Very same people that speculated for years wether Microsoft or Sony would take the next gen crown of gaming. Until there was the Wii. Microsoft vs Adobe during NAB was one of these non stories that became one, since Journalists could write so easily about it.

The reality of quicktime is actually pretty grim: People are able to make movie files that are plain insane. Client of mine likes to produce anamorphic qt’s. Don’t ask. Displaying them on a website, you kinda need to know about that, otherwise they look squeezed. Only problem is: The quicktime player magically knows. But nothing else does. Probing the transformation matrix via javascript returns the most innocent matrix there is: 1.0, 0.0, 0.0 0.0, 1.0, 0.0 0.0, 0.0, 1.0.
ffmpeg, usually so brave in dealing with all this, has no clue. Apple documentation acknowledges the existence of matrices and even teases on this page with the existence of some documentation about matrix functions. But of course the link maybe having some answers goes nowhere. Which is pretty common in Apples online quicktime documentation. It’s huge, it’s old, in many cases examples require OS9 to compile. There are actually very very few working and helpful examples on Apples sites. Whenever the quicktime API gets extended again by some mostly unwanted function there are some files in the development environment du jour. But after years of operating systems and development environments moving on they mostly become a joke or grim reminder of times when Mac’s where beige. Yes, it really is that horrible. And then some.

Quicktime was a good idea. One that got out of hand. Fueled by the success of Apple and it’s other products, it could survive the total failure in gaining any consumer traction. Youtube is flash based. Looks bad, but nobody cares. Unfortunately there are not any alternatives to quicktime. Which is a shame:
It should not be that hard to just have a simple working container format for audio and video. xml works, all these modern things. And quicktime?
Moov containers. nested in each other. Trying to hide their shameful kludgyness. Only thing that Apple did that is worse than quicktime is AppleScript. But we don’t go there. Oh, no. We will not. Sal, oh, Sal, why don’t you go where people wear the had that you do??

Quicktime VR? Who gives a shit? Sprites? Excucse me? You can write actually lots of things in quicktime. Too many. We don’t need an interactive system that would run of a CDROM. Really not. Anymore.

I will have to deal with quicktime in the next five years. And I am seriously not looking forward to all those oddities that will creep up. Not at all.

Apple should define a simple, fast, well documented (examples!) ‘core-qucktime’ subset that actually gets used and that all application should
and can support.

mailto mail.app no more!

misc OSX

It has been a long time since I wanted use Apples mail.app. But it still opened whenever I clicked on one of these mailto: links in a webpage. I googled and found that there is gmailto, which should do the trick, but is broken it seems. I could install it, gmail would open, but not understand the email address I wanted to send to.

Then I found Webmailer. This one works like a charm. It together with the gmail option to send email as andreas@andreaswacker.com make gmail pretty much complete. I am sure it breaks in about 7 minutes, when I rave about it like this.