cvs: phpdoc-tw /chapters install.macosx.xml intro.xml

From: Date: Wed, 02 Jul 2003 15:21:38 +0000
Subject: cvs: phpdoc-tw /chapters install.macosx.xml intro.xml
Groups: php.doc.tw 
Request: Send a blank email to doc-tw+get-63@lists.php.net to get a copy of this message
kevinkee Wed Jul 2 11:21:38 2003 EDT Modified files: /phpdoc-tw/chapters install.macosx.xml intro.xml Log: cleaning up...:)

Index: phpdoc-tw/chapters/install.macosx.xml diff -u phpdoc-tw/chapters/install.macosx.xml:1.1 phpdoc-tw/chapters/install.macosx.xml:1.2 --- phpdoc-tw/chapters/install.macosx.xml:1.1 Wed Jul 2 11:14:19 2003 +++ phpdoc-tw/chapters/install.macosx.xml Wed Jul 2 11:21:38 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="big5"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: kevinkee $ --> <!-- EN-Revision: 1.5 Maintainer: Kevin Status: ready --> <sect1 id="install.macosx"> @@ -12,24 +12,12 @@ <sect2 id="install.macosx.packages"> <title>¨Ï¥Î®M¥ó</title> <simpara> - 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. - ¥Ø«e¤w¦³¤@¨Ç¤w½sĶªº PHP ®M¥ó¨Ñ¦w¸Ë¦bMac OS X¡C³o¨Ç®M¥ó±N¥i¥HÀ°±z¦w¸Ë¤@­Ó¼Ð·Çªº Linux ¨t²Î¡A¦ý¬O¡A¦pªG±z­n¦w¸Ëªº¬O¤@­Ó§t¦³ÃB¥~¥\¯àªº¨t²Î¡A¦p¦w¥þªººô­¶¦øªA¾¹¡B¨Ï¥Î¤£¦Pªº¸ê®Æ®wÅX°Êµ{¦¡µ¥¡A¨º±z´N»Ý­n¦Û¤v°Ê¤â²Õ«Ø PHP ©ÎªÌ¦øªA¾¹¤F¡C¦pªG±z¤£¼ô±x¦p¦ó²Õ«Ø©M½sͳnÅé¡A¸Õ¸Õ¦bºôµ¸¤W§ä§ä¬Ý¦³¨S¦³¤H¤w²Õ«Ø¤F¦³±z·Q­nªº¥\¯àªº PHP ®M¥ó¡C </simpara> </sect2> <sect2 id="install.macosx.compile"> <title>½sĶ¨Ï¥Î©ó OS X ¦øªA¾¹ª©¥»ªº PHP</title> <simpara> - There are two slightly different versions of Mac OS X, client and - server. The following is for OS X Server. - Mac OS X ¦³¤À¥Î¤á©M¦øªA¾¹¨â­Óµy¦³¤À§Oªºª©¥»¡C¥H¤Uªº¨BÆJ¬O¦b¦øªA¾¹ª©¥»¤U¦w¸Ë PHP¡C </simpara> <formalpara id="install.macosx.compile.example"> @@ -41,9 +29,6 @@ </listitem> <listitem> <para> - Untar them, and run the <command>configure</command> program on Apache - like so. - ±N¥¦­Ì untar¡AµM«á°õ¦æ Apache ªº <command>configure</command> µ{¦¡¦p¤U¡G <programlisting role="shell"> <![CDATA[ @@ -62,9 +47,6 @@ </listitem> <listitem> <para> - If you want the compiler to do some optimization., you may also want to - add this line: - ¦pªG±z­n½s;¹¶i¦æ¨ÇÀu¤Æ¤u§@¡A¥i¥H¥[¤J¤U¦C¤@¦æ¡G <programlisting role="shell"> <![CDATA[ @@ -75,8 +57,6 @@ </listitem> <listitem> <para> - Next, go to the PHP 4 source directory and configure it. - ¤U¤@¨B¡A¶i¤J PHP 4 ·½½X©Ò¦bªº¥Ø¿ý¨Ã³]©w¥¦¡C <programlisting role="shell"> <![CDATA[ @@ -88,27 +68,16 @@ --with-apache=/src/apache_1.3.12 ]]> </programlisting> - If you have any other additions (MySQL, GD, etc.), be sure to add them - here. For the <option role="configure">--with-apache</option> string, put - in the path to your apache source directory, for example - <filename class="directory">/src/apache_1.3.12</filename>. - ¦pªG±z­n¥[¤J¨ä¥Lªº¼Ò²Õ¦p MySQL¡BGD µ¥¡A½Ð°O±o¦b¤W­z³]©w«ü¥O¤¤¥[¤J¡C½Ð¦b <option role="configure">--with-apache</option> ¤@¦æ¥[¶i Apache ·½µ{¦¡½Xªº¸ô®|¡A¦p <filename¡@class="directory">/src/apache_1.3.12</filename>¡C </para> </listitem> <listitem> <simpara> - Type <command>make</command> and <command>make install</command>. This - will add a directory to your Apache source directory under - <filename class="directory">src/modules/php4</filename>. - Áä¤J <command>make</command> ©M <command>make install</command>¡C³o±N¦b±zªº Apache ¥Ø¿ý¤¤¥[¤J¤@­ÓºÙ <filename class="directory">src/modules/php4</filename> ªº¤l¥Ø¿ý¡C </simpara> </listitem> <listitem> <para> - Now, reconfigure Apache to build in PHP 4. - ²{¦b¡A¦A¦¸³]©w Apache ¨Ó¥[¤J PHP 4¡C <programlisting role="shell"> <![CDATA[ @@ -124,26 +93,11 @@ --activate-module=src/modules/php4/libphp4.a ]]> </programlisting> - You may get a message telling you that libmodphp4.a is out of date. If - so, go to the <filename class="directory">src/modules/php4</filename> - directory inside your apache source directory and run this command: - <command>ranlib libmodphp4.a</command>. Then go back to the root of the - apache source directory and run the above <command>configure</command> - command again. That'll bring the link table up to date. Run - <command>make</command> and <command>make install</command> again. - ¦pªG¦w¸Ë®É¨t²Î´£¥Ü libmodphp4.a ¬°Âª©¥»ªº¸Ü¡A¶i¤J¦ì©ó Apache ·½µ{¦¡½X¥Ø¿ý¤Uªº <filename class="directory">src/modules/php4</filename> ¤l¥Ø¿ý¡AµM«á°õ¦æ¦¹«ü¥O¡G<command>ranlib libmodphp4.a</command>¡C¦¨¥\«á¡A¦^¨ì Apache ªº®Ú¥Ø¿ý¡A¦A°õ¦æ¤W­z <command>configure</command> «ü¥O¡C³o¼Ë°µ±N¥O link table ¾Ö¦³³Ì·sªº¸ê°T¡C±µµÛ¡A¦A¦¸°õ¦æ <command>make</command> ©M <command>make install</command>¡C </para> </listitem> <listitem> <simpara> - Copy and rename the <filename>php.ini-dist</filename> file to your - <filename class="directory">bin</filename> directory from your PHP 4 - source directory: - <userinput>cp php.ini-dist /usr/local/bin/php.ini</userinput> - or (if your don't have a local directory) - <userinput>cp php.ini-dist /usr/bin/php.ini</userinput>. - ±N <filename>php.ini-dist</filename> ±q PHP 4 ªº·½½X¥Ø¿ý§Û¨ì <filename class="directory">bin</filename> ¥Ø¿ý¡G<userinput>cp php.ini-dist /usr/local/bin/php.ini</userinput>¡A©ÎªÌ¡A¦pªG±z¨S¦³¥»¾÷¥Ø¿ýªº¸Ü¡G<userinput>cp php.ini-dist /usr/bin/php.ini</userinput>¡C </simpara> </listitem> @@ -170,60 +124,39 @@ <sect2 id="install.macosx.client"> <title>½sĶ¨Ï¥Î©ó OS X ¥Î¤áºÝª©¥»ªº PHP</title> <simpara> - Those tips are graciously provided by <ulink url="&url.macosx;">Marc Liyanage</ulink>. - ¤U¦C´£¥Ü¥Ñ <ulink url="&url.macosx;">Marc Liyanage</ulink> ©Ò´£¨Ñ¡C </simpara> <simpara> - The PHP module for the Apache web server included in Mac OS X. - This version includes support for the MySQL and PostgreSQL databases. - Mac OS X ¥Î¤áºÝª©¥»¤w¥]§t¤F½s͵¹ Apache ªº PHP ¼Ò²Õ¡C¥¦¤w¤º«Ø¤F¹ï MySQL ©M PostgreSQL ¸ê®Æ®wªº¤ä´©¡C </simpara> <simpara> - NOTE: Be careful when you do this, you could screw up your Apache web server! - ª`·N¡G¥H¤U°Ê§@¥i¯à·|±N±zªº Apache ºô­¶¦øªA¾¹·d¯{¡A©Ò¥H¤p¤ß¬°¤W¡I </simpara> <para> - Do this to install: ¦w¸Ë¨BÆJ¡G <orderedlist> <listitem> <simpara> - Open a terminal window. ¶}±Ò¤@­Ó²×ºÝ¾÷¿Ã¹õ¡C </simpara> </listitem> <listitem> <simpara> - Type - <userinput>wget http://www.diax.ch/users/liyanage/software/macosx/libphp4.so.gz</userinput>, - wait for the download to finish. - Áä¤J <userinput>wget http://www.diax.ch/users/liyanage/software/macosx/libphp4.so.gz</userinput>¡Aµ¥«Ý¤U¸ü§¹²¦¡C </simpara> </listitem> <listitem> <simpara> - Type <userinput>gunzip libphp4.so.gz</userinput>. - Áä¤J <userinput>gunzip libphp4.so.gz</userinput>¡C </simpara> </listitem> <listitem> <simpara> - Type <userinput>sudo apxs -i -a -n php4 libphp4.so</userinput> - Áä¤J <userinput>sudo apxs -i -a -n php4 libphp4.so</userinput> </simpara> </listitem> <listitem> <para> - Now type <userinput>sudo open -a TextEdit /etc/httpd/httpd.conf</userinput>. - TextEdit will open with the web server configuration file. Locate these - two lines towards the end of the file: (Use the Find command) - Áä¤J <userinput>sudo open -a TextEdit /etc/httpd/httpd.conf</userinput>¡C³o®É TextEdit ·|¶}±Ò Apache ªº³]©wÀÉ¡C§ä¥X¤U¦C¨â¦æ¡G <programlisting role="apache"> <![CDATA[ @@ -231,34 +164,20 @@ #AddType application/x-httpd-php-source .phps ]]> </programlisting> - Remove the two hash marks (<literal>#</literal>), then save the file and - quit TextEdit. - ±N«e­±ªº¨â­Ó <literal>#</literal> ²Å¸¹§R°£¡AµM«áÀx¦sÀɮסA¨ÃÃö³¬ TextEdit¡C </para> </listitem> <listitem> <simpara> - Finally, type <userinput>sudo apachectl graceful</userinput> to restart - the web server. - ³Ì«á¡AÁä¤J <userinput>sudo apachectl graceful</userinput> ¨Ó­«·s±Ò°Ê Apache¡C </simpara> </listitem> </orderedlist> </para> <para> - PHP should now be up and running. You can test it by dropping a file into - your <filename class="directory">Sites</filename> folder which is called - <filename>test.php</filename>. Into that file, write this line: - <literal>&lt;?php phpinfo() ?&gt;</literal>. - ²{¦b¡A¨Ó¸Õ¸Õ¬Ý PHP ¬O§_¤w¦¨¥\¦w¸Ë¤Î±Ò°Ê¡C©ì¦²¤@­Ó¤åÀɶi¤J <filename class="directory">Sites</filename> ¥Ø¿ý¡A¨ÃºÙ¥¦¬° <filename>test.php</filename>¡C¦b¸ÓÀɮפ¤¿é¤J³o¤@¦æ¦r¡G<literal>&lt;?php phpinfo() ?&gt;</literal>¡C </para> <para> - Now open up <literal>127.0.0.1/~your_username/test.php</literal> in your web - browser. You should see a status table with information about the PHP module. - Àx¦s¦n <filename>test.php</filename> «á¡A¥Î±zªºÂsÄý¾¹¦s¨ú <literal>127.0.0.1/~your_username/test.php</literal>¡C³o®É¡A±zªºÂsÄý¾¹À³¸ÓÅã¥Ü¤F¤j¶qÃö©ó PHP ªº¸ê°T¡C¦w¸Ë¦¨¥\¡I </para> </sect2> Index: phpdoc-tw/chapters/intro.xml diff -u phpdoc-tw/chapters/intro.xml:1.1 phpdoc-tw/chapters/intro.xml:1.2 --- phpdoc-tw/chapters/intro.xml:1.1 Mon May 19 09:38:07 2003 +++ phpdoc-tw/chapters/intro.xml Wed Jul 2 11:21:38 2003 @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="big5"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> +<!-- $Author: kevinkee $ --> +<!-- EN-Revision: 1.35 Maintainer: Kevin Status: ready --> + <chapter id="introduction"> <title>²¤¶</title>
« previous php.doc.tw (#63) next »