如何在 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/
-
淺析JavaScript基本類型與引用類型
兩種類型:ECMAScript變量包含兩種不同類型的值:基本類型值、引用類型值;基本類型值:指的是保存在棧內存中的簡單數據段;引用類型值:指的是那些保存在堆內存中的`對象,意思是,變量中保存的實際上只是一個指針,這個指針指向內存中的另一個位置,由該位置保存對象;兩種訪問方...
-
javascript閉包的高級使用方法
擴展Code:複製代碼代碼如下:varblogModule=(function(my){hoto=function(){//添加內部代碼};returnmy;}(blogModule));Say:將自身傳進方法,然後實現了方法的擴展,有點象零件組裝啊Code:複製代碼代碼如下:varblogModule=(function(my){varoldAddPhotoMethod=hoto;...
-
WAP的簡介
WAP協議被設計用來在無線客户端(比如移動電話)上展示因特網內容。您應當具備的基礎知識在繼續學習之前,您需要對下面的知識有基本的瞭解:WWW,HTML以及有關網頁構建的基礎知識JavaScriptXML如果您希望首先學習這些項目,請在我們的首頁訪問這些教程。什麼是WAP?無線產...
-
asp.net 操作INI文件讀寫類實例代碼
操作INI文件讀寫類實例代碼複製代碼代碼如下:usingSystem;usingropServices;using;using;namespaceCommon{//////INI文件讀寫類。///publicclassINIFile{publicstringpath;publicINIFile(stringINIPath){path=INIPath;}[DllImport("kernel32")]privatestaticex...