Mac OS X Server Update 10.6.5 is not PHP Neutral
Sorry it took so long to get around to this. By now, I imagine you’ve already discovered that, as is clearly stated, this update is not PHP-neutral. Apple installs PHP 5.3.3 over your custom PHP installation.
I looked at the configure that Apple uses and it looks about like our usual configure info.
So the steps required to make this all work with what we have from our previous expeditions:
Keep copies of the Apple binaries and how they configured their installation:
$ php -i > ~/php-config-2010.11.30 $ sudo cp /usr/libexec/apache2/libphp5.so /usr/libexec/apache2/libphp5.so.old $ sudo cp /usr/bin/php /usr/bin/php.oldGet the 5.3.3 tarball and unpack it.
Move the libpng headers around a bit so that
configuredoesn’t find old headers for use with the new libraries:$ sudo mv /usr/X11R6/include/png.h /usr/X11R6/include/png.h_oldAppend the new flags to the configure statement and configure away:
$ ./configure '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--disable-dependency-tracking' '--sysconfdir=/private/etc' '--with-apxs2=/usr/sbin/apxs' '--enable-cli' '--with-config-file-path=/etc' '--with-libxml-dir=/usr' '--with-openssl=/usr' '--with-kerberos=/usr' '--with-zlib=/usr' '--enable-bcmath' '--with-bz2=/usr' '--enable-calendar' '--with-curl=/usr' '--enable-exif' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local' '--enable-gd-native-ttf' '--with-ldap=/usr' '--with-ldap-sasl=/usr' '--enable-mbstring' '--enable-mbregex' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--with-mysql-sock=/var/mysql/mysql.sock' '--with-iodbc=/usr' '--enable-shmop' '--with-snmp=/usr' '--enable-soap' '--enable-sockets' '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm' '--with-xmlrpc' '--with-iconv-dir=/usr' '--with-xsl=/usr' '--with-pcre-regex' '--with-freetype-dir=/usr/X11R6' '--enable-zend-multibyte' '--enable-zip'Use four cores to make PHP. It’s a lot faster to use the
-j 4option, and if you have more cores, make the number match:$ make -j 4Install.
$ sudo make installRestart Apache.
$ sudo apachectl restartClean up what we did to the libpng headers:
$ sudo mv /usr/X11R6/include/png.h_old /usr/X11R6/include/png.h
Done.
Alternatively, if you have already installed 5.3.3 before, all you need to do is:
Keep copies of the Apple binaries and how they configured their installation:
$ php -i > ~/php-config-2010.11.30 $ sudo cp /usr/libexec/apache2/libphp5.so /usr/libexec/apache2/libphp5.so.old $ sudo cp /usr/bin/php /usr/bin/php.oldInstall.
$ sudo make installRestart Apache.
$ sudo apachectl restart
Done!
Recent Comments