xampp

XAMPP Runs As User Nobody on Mac

During my recent macbook pro upgrade, I had a sweet time automatically migrating my entire old macbook to the new one using Migration Assistant. The experience could not have been smoother - all my data and applications were moved without a hitch. Couple apps asked to re-enter serial numbers, but that's all.

However when I tried to start my XAMPP-packaged MySQL today (I usually develop on a Linux box, so do not use local MySQL that often) - it would not start. After some digging around I noticed that permissions on the MySQL data folder in /Applications/xampp/xamppfiles/var were wrong - it was owned by "admin" and MySQL could not write in it. I quickly changed ownership to the mysql user (that was present on my computer), but to my surprise - that did not help. After some more digging, I found that, apparently, XAMPP runs MySQL as "nobody", just like it does Apache. Somewhat uncommon, but oh well.

Following three commands fixed my after-migration problem:

cd /Applications/xampp/xamppfiles/var
sudo chown -R nobody:admin mysql
sudo chmod -R 775 mysql

Install PECL Memcache with XAMPP and PHP4

XAMPP is an absolutely wonderful, packaged, self-contained distribution of apache, mysql, php and tons of hard-to-install php extensions. Not only does it make sysadmin's life easier, by solving 99.9% of LAMP problems out-of-the-box, but it also allows PHP-vendors to create packaged distributions of complex systems.

However, even with a long list of packaged extensions, obviously there may be a need to install an additional one. PECL Memcache client of memcached distributed cache server, is a very probable candidate for high-load systems.

Unfortunately, PECL is broken in a vanilla XAMPP installation with php4. Typically you won't be able to use "pecl" directly and when you try to install manually with phpize you will get an error like:
" PHP Warning: Unknown(): Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20020429/memcache.so' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20020429/memcache.so: undefined symbol: OnUpdateLong in Unknown on line 0"

Syndicate content