|
PODRĘCZNIK PHP 5.x, 4.x, 3.x - częściowo spolszczony / źródło: www.php.net
[Spis]
[A]
[B]
[C]
[D]
[E]
[F]
[G]
[H]
[I]
[J]
[K]
[L]
[M]
[N]
[O]
[P]
[Q]
[R]
[S]
[T]
[U]
[V]
[X]
[W]
[Z]
Rozdział 5. Installation on Mac OS X
This section contains notes and hints specific to installing
PHP on Mac OS X. There are two slightly different versions of
Mac OS X, Client and Server, our manual deals with installing
PHP on both systems. Note that PHP is not available for MacOS
9 and earlier versions.
There are a few pre-packaged and pre-compiled versions of PHP for
Mac OS X. This can help in setting up a standard
configuration, but if you need to have a different set of features
(such as a secure server, or a different database driver), you may
need to build PHP and/or your web server yourself. If you are unfamiliar
with building and compiling your own software, it's worth
checking whether somebody has already built a packaged
version of PHP with the features you need.
User Contributed Notesrodan_s at cob dot sjsu dot edu
12-Jan-2006 08:23
Building php 5.1.1 with MySQL 5.0.18 from source (under OS X)
In order to get the the build to work I had to specify the location of the mysql_config file exactly for mysqli but not for mysql...
./configure --with-apxs2=/usr/local/apache2/bin/apxs \
--with-mysql=/usr/local/mysql \
--with-mysqli=/usr/local/mysql/bin/mysql_config
Since I am a nubie, I can't tell you why, except that it works...
mat at phpconsulting dot com
17-Jun-2005 07:50
andreas at fink dot org
18-Aug-2004 09:01
To build on MacOS X 10.3.5 set the environment variable CFLAGS in the following way (depending on your shell)
setenv CFLAGS "-DBIND_8_COMPAT=1 -DEAPI -O3"
export CFLAGS="-DBIND_8_COMPAT=1 -DEAPI -O3"
Then launch configure with the options:
./configure --prefix=/usr --mandir=/usr/share/man ....
The -DBIND_8_COMPAT=1 gets you over a problem in the DNS files because MacOS X has definitions for Bind9 and PHP expects Bind8 definitions. -DEAPI is needed if you build it for Apache 1.3.31. -O3 enables the gcc optimizer.
You can also add one of the following lines to your CFLAGS depending on the CPU you use to further improve speed:
-mcpu=G3 -mtune=G3
-mcpu=G4 -mtune=G4
-mcpu=G5 -mtune=G5
Rick
29-Oct-2003 03:12
under MacOS 10.3 if your compile fails
vi Makefile
find the dns.c entry
add the switch -DBIND_8_COMPAT
run make again
jack dash pinette at uiowa dot edu
24-Jan-2003 10:56
php at radicalcomputingconcepts dot com
16-May-2002 01:35
10.1 with fink installed into /sw ,mysql installed from fink.
finally :
Apache/1.3.24 (Darwin) DAV/1.0.3 PHP/4.2.1 mod_ssl/2.8.8 OpenSSL/0.9.6c configured
initial apache config:
./configure --prefix=/sw --enable-shared=max --enable-module=most --target=apache --with-layout=GNU
--enable-suexec --suexec-caller=www-data
then php config:
./configure --prefix=/sw --with-xml --with-apache=../apache_1.3.24 --with-curl=/sw --with-pdflib=/sw
--enable-exif --with-mysq=/sw
then mod-ssl config:
./configure --with-apache=../apache_1.3.24 --with-ssl=/sw --enable-rule=SSL_SDBM
final apache config:
./configure --prefix=/sw --enable-shared=max --enable-module=most --target=apache --with-layout=GNU
--enable-suexec --suexec-caller=www-data --activate-module=src/modules/php4/libphp4.a --enable-module=ssl
on final make of apache there was error in src/modules/ssl. i had to rm -ldbm and -lgcc and run gcc line by hand. then was able to finish make.
i dont know what effect that may have on the build and i am interested to know, this was the only problem spot finally after many hours of hacking at it.
testing so far:
phpinfo() via http and https works.
alex at ax-im dot com
31-Mar-2002 10:40
To get Pear to work in OSX 10.1, here's an alternative to adding the ini_set statement mentioned above to every script. The default include path would appear to be .:/usr/local/lib/php, so just add a link...
sudo ln -s /System/Library/PHP /usr/local/lib/php
Now your Pear scripts will work without modification.
info at ericbontenbal dot nl
18-Feb-2002 06:43
for using PHP on MacOSX, see article #106485 of the Apple knowledge base
lanhel at mac dot com
08-Nov-2001 03:14
Getting PHP running on 10.1 is simple.
1. su to root
2. Edit /etc/httpd/httpd.conf
3. Uncomment "Load Module php4_module" line.
4. Uncomment "AddModule mod_php4.c" line.
5. Uncomment "AddType application/x-httpd-php .php" line.
6. Uncomment "AddType application/x-httpd-php-source .phps" line.
7. Find "<Directory /home/*/Sites>" block and uncomment the entire Directory directive block.
This will allow PHP to execute from ~/Sites directory.
larry(at)shafferinteractive.com
24-Sep-2001 02:40
oster at ieee dot org
30-Jul-2001 09:17
If you've got Mac OS X pre-installed on your Mac, you've also got php4 pre-installed. You don't need to download or compile anything. You just need to edit the /etc/httpd/httpd.conf file. Use the "sudo open -a TextEdit..." command line, above. Search for "php", and make sure you've un-commented _all_ the relevant lines: the two AddType lines above, and also the AddModule and LoadModule lines. (but not the AddType lines for php3, since you'll be using php4.) Save and restart Apache with "sudo apachectl graceful", and you are done.
|