Repair OSX WebDevelopment server after OSX Upgrade

After upgrading OSX to version 10.9 I find myself investigating why my development server no longer works. After 4 upgrades I now have a clear list of things to check and how to fix.

If you have not yet upgraded OSX, take the time to back-up your /etc/php.ini and /etc/apache2/httpd.conf. Also; OSX 10.9 Mavericks will upgrade PHP to PHP 5.4, so if you have projects incompatible with 5.4; a) don’t upgrade OSX, b) start upgrading your code or c) use a different AMP-stack.

Also; if you depend on your computer for your income, don’t rush into this!

The TODO list:

  • Backup your system
  • Upgrade OSX
  • Upgrade Xcode and run it at least once, installing the commandline tools
  • Reboot your system
  • Follow the checklist :)

The checklist (things to check and maybe fix):

  • Apache
  • PHP
  • MySQL
  • PEAR/PECL/other

Continue reading “Repair OSX WebDevelopment server after OSX Upgrade”

Sending an email upon SVN-commit

When you work with a group of people on the same projects, the larger the group gets, the more difficult the task of keeping everybody informed. So why not do this automatically? Send an e-mail upon an SVN commit. Here’s how I do it. Continue reading “Sending an email upon SVN-commit”

Javascript callbacks and the “this” object.

I spent hours and hours googling for this and the word “this” being a very common word made it impossible to find the answer.

The question was; how do I use the “this” context-object in my own callback function. It turns out it’s very simple, but the trick is, of course, to know the answer to know it’s simple.

Continue reading “Javascript callbacks and the “this” object.”

Sending mail from PHP with Mountain Lion

Mountain Lion killed – or rather: disabled – sendmail by default. Big deal? well, if you need to send mail from PHP in your local development environment, you’ll need to perform these few steps to get it working again.

Continue reading “Sending mail from PHP with Mountain Lion”

(Semi-)Automatically rebuild Apache VHOST configuration (Handy Shell Scripts – part III – rba.sh)

Now that we have a Development Webserver, we may have a local DNS server running to use a local TLD on the localhost and we have SSL added to our setup, we have discarded VirtualHostX , there is one thing that needs manual labor; and we hate that! (don’t we?). Maintaining the Apache2 Virtual-Host Configuration file and – in case of a DNS-less setup – the hosts file. Now, we do this automated! (Read on!)

Continue reading “(Semi-)Automatically rebuild Apache VHOST configuration (Handy Shell Scripts – part III – rba.sh)”

Development WebServer on OSX Lion – HomeBrew/MariaDB/PECL

Apache2 is already installed on any Mac and most setups (like MAMP or MacPorts) just ignore the built in Apache and install their own version. Shame. You wouldn’t ignore your own car just and get another one to pull a trailer while your own car can do the job perfectly.

Continue reading “Development WebServer on OSX Lion – HomeBrew/MariaDB/PECL”

The “Ultimate” Guide to a Development Webserver on OSX

Hi all. It’s been a while since I posted something interesting, sorry ’bout that. For now I can make setting up a new web server, or upgrading it after an OSX upgrade, a bit easier. A colleague of mine tried it and ran into some problems concerning the different steps to take, so this post should help you get it done with more ease.

Continue reading “The “Ultimate” Guide to a Development Webserver on OSX”

MemCache – In-memory-caching in PHP

When building API-like applications in PHP, one issue will always remain; a high load will eventually slow down everything. To prevent over-loading, anyone will come to the conclusion a cache is needed. The most access calls should be served without recalculating anything to free up CPU-time.

Caching can be done on Disk, in a database (indirectly also Disk-caching), or directly in memory.

To setup MemCache and use this memory-caching-system, read on :)

Continue reading “MemCache – In-memory-caching in PHP”

Pretty-print PHP debug and error output

I know, I know, it’s been a while. Having had a very very busy month, no time for any blogging whatsoever, it’s now time for a new post. It’s just a quick note, however. How to make your var_dump()s and php-errors more readable and esthetically pleasing?

Continue reading “Pretty-print PHP debug and error output”

Use BIND (named) to create a multi-VirtualHost configuration – no more VirtualHostX

[Deprecated: for OSX 10.9 and up, please use rba.sh.]

It has been a while since I posted my guides for setting up a local development environment and how to add SSL to this set-up. This setup, among other things, required the use of a hostname-to-ip-management type of software. My choice was VirtualHostX.

Recent events have brought a new temporary colleague to our workforce and he brought in some fresh blood – so to speak (post in Dutch).

Today I have successfully eliminated the need for VirtualHostX – at least, in my development environment.

Continue reading “Use BIND (named) to create a multi-VirtualHost configuration – no more VirtualHostX”