-
How to replace PHP on OS X Server 5.x with PHP via Homebrew
The version of PHP on OS X Server 5.x is v.5.3.x. As of this writing, the current distro of PHP on Homebrew is v.7.4.12. You will lose the ability to control PHP loading from the GUI.
To prep, you should have prepared a phpinfo.php file on your website in an orphan directory so you can check all the modules that load with PHP. It is simply a text file with the name phpinfo.php and the content is:
phpinfo();
Don’t worry if PHP is currently running.
Install PHP via Homebrew:
brew install php
-
Can’t install imagemagick for PHP with pecl?
If you’re running WordPress on your own Mac OS X Server and have installed an updated version of PHP using Homebrew, you may have a directory mismatch that will prevent pecl from successfully installing imagemagick.
-
Re: Security Update 2006-001, SquirrelMail 1.4.5 and PHP 4.4.1 [by celiawessen]
/usr/libexec/httpd/libphp4.so
/usr/libexec/httpd/libphp4.3.11.so*** Update 3/15/2006***
OK, so here comes Apple’s Security Update 2006-002. It contains the PHP 4.4.1 and SM 1.4.5 update again.
I installed the security patch, then reinstalled the Japanese patch for SM 1.4.5, and uploaded the precompiled ja_JP locale files available from SquirrelMail.JP. It all looked good until I noticed that if I sent a message with a Japanese subject and no Japanese characters in the body, the message gets encoded in 8bit. This creates a problem for strict e-mail client software like Mail.app.
I didn’t notice this at first because the subject line looked fine in SM. But after retrieving the same messages from the IMAP server using Mail.app, I found that the subject line had mojibake.
This problem does not occur if there are Japanese characters in the subject line and the body of the message. In that case, the message gets encoded into 7bit.
It is rare that anybody would send a message with a Japanese subject line and no Japanese characters in the body… but it does happen.
So, I downgraded PHP to 4.3.11 from my trusty backup.
cd /usr/libexec/httpdcp libphp4
.so libphp4.4.1.socp libphp4.3.11
.so libphp4.soapachectl restart
Now the same 7/8bit problem still occurs. But for some reason, the subject lines started looking fine in Mail.app… what the fcuk is happening? I think it has something to do with the mbstr.mimeheaderencoding in PHP 4.4.1 that can only be patched pre-compilation.
Because Mac OS X Server does not ship with many of the libraries necessary to recompile PHP, I just gave up. It is a hassle to collect them all unless you’re going to compile other stuff too.