如何在 Mac OX X 下面安装 php
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/ework/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/ework/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 -dist file to your "bin" directory from your
php4 source directory:
cp -dist /usr/local/bin/
or (if your don't have a local directory)
cp -dist /usr/bin/
-
关于HTML meat作用
meta标签用于网页的与中,meta标签的用处很多。meta的属性有两种:name和http-equiv。name属性主要用于描述网页,对应于content(网页内容),以便于搜索引擎机器人查找、分类(目前几乎所有的搜索引擎都使用网上机器人自动查找meta值来给网页分类)。这其中最重要的是descrip...
-
网页设计的布局
网页设计的工作目标,是通过使用更合理的颜色、字体、图片、样式进行页面设计美化,在功能限定的情况下,尽可能给予用户完美的视觉体验。以下是小编为您带来的网页设计的布局,看看吧!网页设计的布局11、响应式网页设计响应式网页设计是网页设计的一种技术,可在N多种浏...
-
WAP的简介
WAP协议被设计用来在无线客户端(比如移动电话)上展示因特网内容。您应当具备的基础知识在继续学习之前,您需要对下面的知识有基本的了解:WWW,HTML以及有关网页构建的基础知识JavaScriptXML如果您希望首先学习这些项目,请在我们的首页访问这些教程。什么是WAP?无线产...
-
关于javascript使用isNaN()函数判断变量是否为数字
javascript中判断变量是否为数字的方法,这里主要介绍javascript里的isNaN()函数。功能:isNaN()函数用于检查其参数是否是非数字值。语法:isNaN(x)x必需。要检测的值。返回值:如果x是特殊的`非数字值NaN(或者能被转换为这样的值),返回的值就是true。如果x是其他值,则返...