Can someone direct me or write my experience installing Apache and PHP on Snow Leopard?
I had this in the past on Leopard, it will die after a security update, but it would be as simple as:
$ ./configure --enable-layout=Darwin --enable-mods-shared=all $ make $ sudo make install
and I started again and again.
Starting with the Snow Leopard update, I get the following error on the make command
libtool: link: cannot find the library `/usr/lib/libexpat.la' or unhandled argument `/usr/lib/libexpat.la' make[2]: *** [htpasswd] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all-recursive] Error 1
As most of you know, Snow Leopard (SL) is based on a 64-bit architecture, and when you install Xcode 3.2, which comes with SL, the gcc compiler defaults to 4.2.1 and apparently doesn't have a default x86_64, not i386.
-:
:
hivelogic.com MySQL SL
Apache 2.2.14 http://projects.serenity.de/php/ - 2.2.13, 13 14 ?;) Apache (x86_64) :
cd /usr/local/apache2/bin cp httpd /usr/sbin/ cp apachectl /usr/sbin/ http://www.kevinkorb.com/post/24
cd /usr/local/apache2/bin cp httpd /usr/sbin/ cp apachectl /usr/sbin/
http://www.kevinkorb.com/post/24
(freetype, gettext, libjpeg, libpng, mcrypt, mhash ..), Apache http://projects.serenity.de/php/ IMAP, IMAP, , url , , .
. x86_64, libpng, 64-:* export CFLAGS = "- arch x86_64". /configure
. x86_64, libpng, 64-:
* export CFLAGS = "- arch x86_64". /configure
, . PHP 5.3.0. ICONV, . Google, , iconv.c Makefile, -lresolv EXTRA_LIBS = , . /configure. , --without-iconv. --with-xmlrpc . iconv
, . /configure:
./configure --prefix=/usr/local/php5 --without-iconv --with-apxs2=/usr/local/apache2/bin/apxs --enable-pdo --with-gd --with-zlib --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-libxml-dir=/usr/local --with-curl --with-mcrypt --with-pdo-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-mysql=/usr/local/mysql --with-mhash --with-libxml-dir=/usr/local --with-t1lib=/usr/local --with-xsl --with-freetype-dir=/usr/local --with-gettext --with-bz2=/usr --with-openssl=/usr --enable-bcmath --enable-calendar --enable-cgi --enable-exif --enable-ftp --enable-gd-native-ttf --enable-mbstring --enable-soap --enable-sqlite-utf8 --enable-cli --enable-wddx --enable-zip make sudo make install
PHP-5.3.2-dev (http://snaps.php.net/) , , ICONV XMLRPC. , . /configure , --without-iconv --with-iconv =/usr/local --with-xmlrpc. , , , .
- , , , !
: http://bugs.php.net/bug.php?id=49267
"-lresolv" MH_BUNDLE_FLAGS, EXTRA_LDFLAGS EXTRA_LDFLAGS_PROGRAM "Makefile"
"ext/iconv/iconv.c"
#define iconv libiconv
#define iconv iconv
, .
apache
cd srclib/apr-util/xml/expat ./configure # OR ./configure --prefix=/{{YOURDIR}}/apache/source/httpd-2.2.22/srclib/apr-util/xml/expat/ sudo make install # OR make install
cd {{YOURDIR}}/apache/ ls -la rm -r bin rm -r build rm -r include rm -r lib
, PHP, , , , Apple , , , , , . - ?
, !
Liip PHP Apache OS X, . . : http://php-osx.liip.ch/
( ) PHP 5.3.x/5.4.x OS X 10.6 (aka Snow Leopard) OS X 10.7 (aka Lion) /usr/local/php 5. (. ) ini-settings, , Liip Local.ch . Symfony 2. php.ini , " ".
Apache MySQL (x64) MySQL.
Mac OS X Snow Leopard Apache 2.2 PHP 5.3. , :
http://www.brandonsavage.net/first-glance-apples-snow-leopard/
It is probably best to leave them alone, as they are optimally configured for Snow Leopard.