Just wanted to see if there are any objections to move the Apache and PHP installations from their current location in ‘/Library/’ to ‘/usr/local/’

The layout for Apache will become:

<layout DIYMacServer>
    prefix:        /usr/local/apache2
    exec_prefix:   ${prefix}
    bindir:        ${exec_prefix}/bin
    sbindir:       ${exec_prefix}/bin
    libdir:        ${exec_prefix}/lib
    libexecdir:    ${exec_prefix}/modules
    mandir:        ${prefix}/man
    sysconfdir:    /etc/httpd/
    datadir:       /var/www
    installbuilddir: ${datadir}/build
    errordir:      ${datadir}/error
    iconsdir:      ${datadir}/icons
    htdocsdir:     ${datadir}/htdocs
    manualdir:     ${datadir}/manual
    cgidir:        ${datadir}/cgi-bin
    includedir:    ${prefix}/include
    localstatedir: /var
    runtimedir:    ${localstatedir}/run
    logfiledir:    ${localstatedir}/log/httpd
    proxycachedir: ${localstatedir}/cache/httpd

This brings everything in-line with normal other installs. The configuration is as it was with the original Apache in ‘/etc/httpd‘ and the log, cache and pid file are all in ‘/var‘. Although I’m still having doubts about the datadir, I would have put it in ‘/var/www/‘ but on the normal OS X install it would be in ‘/Library/WebServer/‘. What do you think ?

PHP5 will be located in ‘/usr/local/php5‘, the php.ini file will be located in ‘/etc‘.

I hope to open up the new site tomorrow if all goes well…


MySQL Community Server has been updated to a new release which is mostly a bugfix release for an ABI incompatibility with earlier releases. This bug hasn’t affected me and it doesn’t really have to affect you if you don’t use this functionality, check the bug report to make sure that this is the case.

Please not that if you run the binary installer it’s still necessary to compile the source afterwards because the shared library bug isn’t solved yet. Also don’t forget to copy the data directory to the new version of MySQL or it might look like you lost all your databases.

Please note that MySQL has created a fork for the distribution. The paying customers get MySQL Enterprise Server which has been updated to 5.0.28 (don’t know why there is the difference in versions). To read more about the differentiation between the MySQL Enterprise Server and the MySQL Community Server, read Kaj Arnö’s blog.

As an added bonus I would like to point out that if you are still using the mysql extensions instead of the mysqli extensions (i stands for improved) you should take a look at the MySQL wiki article which will help you convert your application to the new module. They even got a script which will convert your source for you. If you still need convincing why you should convert please read this old article on the Zend site.


I used yesterday to recompile Postfix, Courier-Auth, Apache and PHP with the 5.0.24a MySQL libraries. I just used my own instructions to compile everything.

I first did Postfix and Courier-auth as they would cause the least problems when it would go wrong. My backup mailserver would still receuve all mail and forward it to me when the mailserver is back online. It all went without a hitch, just did a restart of the programs and all was running as expected.

Apache posed an issue, how to compile and install, followed by compiling PHP without disturbing all the people looking at my sites. In the end it was simple. Compile and install Apache2, don’t restart Apache so the old version keeps running but the new software is available on disk. Then compile and install PHP using the new Apache installation files and when that is done restart Apache and all would be fine. Well that’s what I thought…

There was a small error in the modules that I included in the httpd.conf. Some of them, all concerning authentication, where rewritten and given different names. I was still trying to load the old ones as I didn’t update my httpd.conf to reflect these changes. So Apache2 wouldn’t start. I just commented out the old modules and added the new ones in my httpd.conf and presto, Apache 2.2.3 and PHP 5.1.6 are now running on my server, together with Postfix 2.2.3.

They’ve been running for almost a day now and I haven’t gotten any complaints yet.

If you are still running “ISP in a box” version 1 and want to upgrade but are still a bit afraid on how to do this let me know and I’ll help out.

Just found out there was an error, got a call on the phone from some of my friends that they couldn’t email anymore. When checking the logfiles I foud out I forgot a step after compiling and installing Courier auth:

sudo chmod o+x /usr/local/var/spool/authdaemon

In the logfile there was the error:

SASL authentication failure: cannot connect to Courier
      authdaemond: Permission denied

Which means I didn’t follow my own instructions !


While I was looking for some info on PHP I noticed that it got upgraded again very soon after the upgrade to 5.1.5 earlier this month. You can read all about the issues, bugs, etc. in the changelog. There was nothing really bothering me and I don’t see any problems for current 5.1.4 users that would warrant an update because of security reasons. But I wanted to let you know about this anyway and decide for yourself.

Updating is as easy as following the installation instructions already on the site. Just get the newer sourcecode from and compile it.


This as taken me much, much longer than I ever planned it to take. First there was the introduction of the Intel based Mac’s that I needed to comprehend. Secondly the many problems I’d encountered with the shared library support in the MySQL as many of you have read in previous posts. Third there was the happy occasion of the birth of my daughter which prevented me from spending much time behind the screen.

But it’s done, I’ve finally finished the instruction for installing (and compiling) MySQL 5, Apache 2 and PHP 5. Hope you are able to use them well.

I’m currently working on the instructions for the mailserver as there are some tweaks needed to get that working with the current setup. There where some issues with Intel based Macs and SSL support but I’ve got that solved. Hope to get that finished in a very short time… (not naming dates here, getting careful… ;-) )


Well did I miss this one completely. I thought I had myself subscribed to all the announcement mailinglists of all the software I use in my setup so I would not miss any important updates or security issues. Because I was trying to download the source code of PHP to retry the installation procedure to see if I missed something I noticed the difference in version numbers. I was still expecting version 5.1.2 and I noticed I missed 2 versions as there is now version 5.1.4. Somehow 5.1.4 followed 5.1.3 very quickly because of some bugs that where found. You can read all about the issues, bugs, etc.. in the changelog. (more…)


I’ve got a lot of feedback on the instructions I posted on compiling PHP5 on Mac OS X. First reactions where about the PEAR installation problem which I missed completely (as I haven’t used PEAR yet, forgot to test this). Secondly I got a lot of feedback on the use of the options, extensions and libraries I had chosen. Some where obsolete, not in use anymore or replaced by newer ones. I’ll try to explain why this happened:

I had started compiling PHP on the Mac starting with PHP4, I had found some outdated instructions on how to compile it on Mac which with a little tweaking got it to work. Changing that to instructions on how to compile PHP5 looked pretty straightforward. But I haven’t actively developed in PHP for a year or two and completely missed the changes that happened between PHP4 and PHP5. Which meant that I missed some of the details that where needed to get a proper PHP5 working environment.

Thanks to all the feedback and the email conversations I had I think I’ve got a proper basic setup as it is now. After I’m done with rewriting the mail-server documentation so it reflects the changes I made to, for instance, the MySQL install paths. I’m going to try to document installing more options and libraries that people might like to use with their PHP installation.

If you have any ideas or comments on this PHP installation let me know, I’m always open to suggestions.


As promised earlier I wanted to have the documentation ready for installing PHP from source from scratch. Just starting with source code for PHP and the libraries required.

I think I covered most of the essential libraries nad options needed for running most of the PHP based applications. If you like more libraries or options included in the build process let me know and I’ll see what I can do for you. Please motivate your choice…

Donations are still going strong, got 2 big donations this week. The Intel Mac mini is getting closer every day…


Well I’ve got it working, it took some time because there was an older library in the PHP4 directory structure from Server Logistics that didn’t like PHP5 ! The XML library needed an upgrade to be included into PHP5 so I first had to solve that issue to get it all working. The only library I had to exclude was SNMP for the same reason as I had to leave it out from the PHP 4.4.2 compilation. The rest of the libraries that are used from the original PHP4 installation from Server Logistics so please install that before you try this upgrade.



Server Logistics has a great package for installing the (L/M)AMP applications stack on Mac OS X, the only drawback is that they don’t upgrade their packages as I would like to see it happen. Especially when there are security issues with older version of PHP, MySQL or Apache. I’ve been able to get a more recent version of Apache compiled then they released and the last few days I’ve been struggling to get PHP compiled. I wanted to recompile PHP4 and PHP5 to be able to provide some choices. I’ve successfully compiled PHP4 and kept most of the Server Logistics structure intact. Most of the credits go to Bjarne D Mathiesen who wrote some documents and scripts in Danish I used to get this working. (more…)

Next Page »