您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息
免费发信息
三六零分类信息网 > 南充分类信息网,免费分类信息发布

在 Mac OX X 下面安装 php

2024/6/1 16:36:25发布71次查看
mac os x installs
this section contains notes and hints specific to installing php on mac os x.
using packages
there are a few pre-packaged and pre-compiled versions of php for mac os x. this can greatly assist 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 investigating whether or not somebody has already built a packaged version of php with the features you need. lightyear design offers a pre-built version of php for os x, as does tenon intersystems.
compiling for os x server
there are two slightly different versions of mac os x, client and server. the following is for os x server.
example 2-3. mac os x server install
1. get the latest distributions of apache and php
2. untar them, and run the configure program on apache like so.
./configure --exec-prefix=/usr
--localstatedir=/var
--mandir=/usr/share/man
--libexecdir=/system/library/apache/modules
--iconsdir=/system/library/apache/icons
--includedir=/system/library/frameworks/apache.framework/versions/1.3/headers
--enable-shared=max
--enable-module=most
--target=apache
4. you may also want to add this line:
setenv optim=-o2
if you want the compiler to do some optimization.
5. next, go to the php4 source directory and configure it.
./configure --prefix=/usr
--sysconfdir=/etc
--localstatedir=/var
--mandir=/usr/share/man
--with-xml
--with-apache=/src/apache_1.3.12
if you have any other addiitons (mysql, gd, etc.), be sure to add
them here. for the --with-apache string, put in the path to your
apache source directory, for example /src/apache_1.3.12.
6. make
7. make install
this will add a directory to your apache source directory under
src/modules/php4.
8. now, reconfigure apache to build in php4.
./configure --exec-prefix=/usr
--localstatedir=/var
--mandir=/usr/share/man
--libexecdir=/system/library/apache/modules
--iconsdir=/system/library/apache/icons
--includedir=/system/library/frameworks/apache.framework/versions/1.3/headers
--enable-shared=max
--enable-module=most
--target=apache
--activate-module=src/modules/php4/libphp4.a
you may get a message telling you that libmodphp4.a is out of date.
if so, go to the src/modules/php4 directory inside your apache
source directory and run this command:
ranlib libmodphp4.a
then go back to the root of the apache source directory and run the
above configure command again. that'll bring the link table up to
date.
9. make
10. make install
11. copy and rename the php.ini-dist file to your bin directory from your
php4 source directory:
cp php.ini-dist /usr/local/bin/php.ini
or (if your don't have a local directory)
cp php.ini-dist /usr/bin/php.ini
南充分类信息网,免费分类信息发布

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录