cvs: phpdoc-tw /chapters install.hpux.xml install.linux.xml install.macosx.xml
| From: | Kevin Kee | Date: | Wed, 02 Jul 2003 15:14:19 +0000 |
| Subject: | cvs: phpdoc-tw /chapters install.hpux.xml install.linux.xml install.macosx.xml | ||
| Groups: | php.doc.tw | ||
| Request: | Send a blank email to doc-tw+get-62@lists.php.net to get a copy of this message | ||
kevinkee Wed Jul 2 11:14:19 2003 EDT
Added files:
/phpdoc-tw/chapters install.macosx.xml
Modified files:
/phpdoc-tw/chapters install.hpux.xml install.linux.xml
Log:
change of heading + a new file macosx
Index: phpdoc-tw/chapters/install.hpux.xml diff -u phpdoc-tw/chapters/install.hpux.xml:1.1 phpdoc-tw/chapters/install.hpux.xml:1.2 --- phpdoc-tw/chapters/install.hpux.xml:1.1 Fri Jun 27 10:32:43 2003 +++ phpdoc-tw/chapters/install.hpux.xml Wed Jul 2 11:14:19 2003 @@ -1,8 +1,9 @@ <?xml version="1.0" encoding="big5"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> +<!-- $Author: kevinkee $ --> <!-- EN-Revision: 1.4 Maintainer: Kevin Status: ready --> <sect1 id="install.hpux"> - <title>¦b Unix/HP-UX ¤U¦w¸Ë</title> + <title>¦w¸Ë¦b Unix/HP-UX</title> <para> ¤U±ªº´£¥Ü¤Îµ§°O¬O¥Ñ Paul Mckay (paul_mckay at clearwater-it dot co dot uk) ©Ò´£¨Ñ¡A¥Ü½d¦p¦ó¦b HP-UX §@·~¨t²Î¤U¦w¸Ë PHP¡C </para> Index: phpdoc-tw/chapters/install.linux.xml diff -u phpdoc-tw/chapters/install.linux.xml:1.1 phpdoc-tw/chapters/install.linux.xml:1.2 --- phpdoc-tw/chapters/install.linux.xml:1.1 Fri Jun 27 10:32:43 2003 +++ phpdoc-tw/chapters/install.linux.xml Wed Jul 2 11:14:19 2003 @@ -1,8 +1,9 @@ <?xml version="1.0" encoding="big5"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> +<!-- $Author: kevinkee $ --> <!-- EN-Revision: 1.2 Maintainer: Kevin Status: ready --> <sect1 id="install.linux"> - <title>¦b Unix/Linux ¤U¦w¸Ë</title> + <title>¦w¸Ë¦b Unix/Linux</title> <para> ¦¹³¡¥÷ªº´£¥Ü¤Îµ§°O±N´£¨ì¦p¦ó¦b Linux¤Àµoª©¥»¤¤¦w¸Ë PHP¡C </para> Index: phpdoc-tw/chapters/install.macosx.xml +++ phpdoc-tw/chapters/install.macosx.xml <?xml version="1.0" encoding="big5"?> <!-- $Revision: 1.1 $ --> <!-- $Author: kevinkee $ --> <!-- EN-Revision: 1.5 Maintainer: Kevin Status: ready --> <sect1 id="install.macosx"> <title>¦w¸Ë¦b Unix/Mac OS X</title> <para> This section contains notes and hints specific to installing PHP on Mac OS X Server. ¦¹³¡¥÷ªº´£¥Ü¤Îµ§°O±N´£¨ì¦p¦ó¦bMac OS X Server ¤¤¦w¸Ë PHP¡C </para> <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±zn¦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·Qnªº¥\¯àªº 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"> <title>Mac OS X ¦øªA¾¹ª©¥»ªº¦w¸Ë</title> <para> <orderedlist> <listitem> <simpara>¤U¸ü³Ì·sªº Apache ©M PHP ªº¤Àµoª©¥»¡C</simpara> </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[ /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 ]]> </programlisting> </para> </listitem> <listitem> <para> If you want the compiler to do some optimization., you may also want to add this line: ¦pªG±zn½s;¹¶i¦æ¨ÇÀu¤Æ¤u§@¡A¥i¥H¥[¤J¤U¦C¤@¦æ¡G <programlisting role="shell"> <![CDATA[ setenv OPTIM=-O2 ]]> </programlisting> </para> </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[ /configure --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/share/man \ --with-xml \ --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±zn¥[¤J¨ä¥Lªº¼Ò²Õ¦p MySQL¡BGD µ¥¡A½Ð°O±o¦b¤Wz³]©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[ /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 ]]> </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°õ¦æ¤Wz <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> </orderedlist> </para> </formalpara> <!-- <simpara> TODO: Someone with Mac OS X skills needs to improve this DOC Also, these links are 404 and outdated anyways and stepwise doesn't support PHP anymore. See also bug #14732 Other examples for <ulink url="&url.stepwise.macosx-client;">Mac OS X client</ulink> and <ulink url="&url.stepwise.macosx-client;">Mac OS X server</ulink> are available at <ulink url="&url.stepwise;">Stepwise</ulink>. </simpara> --> </sect2> <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[ #AddType application/x-httpd-php .php #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><?php phpinfo() ?></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><?php phpinfo() ?></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> </sect1> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
Index: phpdoc-tw/chapters/install.hpux.xml diff -u phpdoc-tw/chapters/install.hpux.xml:1.1 phpdoc-tw/chapters/install.hpux.xml:1.2 --- phpdoc-tw/chapters/install.hpux.xml:1.1 Fri Jun 27 10:32:43 2003 +++ phpdoc-tw/chapters/install.hpux.xml Wed Jul 2 11:14:19 2003 @@ -1,8 +1,9 @@ <?xml version="1.0" encoding="big5"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> +<!-- $Author: kevinkee $ --> <!-- EN-Revision: 1.4 Maintainer: Kevin Status: ready --> <sect1 id="install.hpux"> - <title>¦b Unix/HP-UX ¤U¦w¸Ë</title> + <title>¦w¸Ë¦b Unix/HP-UX</title> <para> ¤U±ªº´£¥Ü¤Îµ§°O¬O¥Ñ Paul Mckay (paul_mckay at clearwater-it dot co dot uk) ©Ò´£¨Ñ¡A¥Ü½d¦p¦ó¦b HP-UX §@·~¨t²Î¤U¦w¸Ë PHP¡C </para> Index: phpdoc-tw/chapters/install.linux.xml diff -u phpdoc-tw/chapters/install.linux.xml:1.1 phpdoc-tw/chapters/install.linux.xml:1.2 --- phpdoc-tw/chapters/install.linux.xml:1.1 Fri Jun 27 10:32:43 2003 +++ phpdoc-tw/chapters/install.linux.xml Wed Jul 2 11:14:19 2003 @@ -1,8 +1,9 @@ <?xml version="1.0" encoding="big5"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> +<!-- $Author: kevinkee $ --> <!-- EN-Revision: 1.2 Maintainer: Kevin Status: ready --> <sect1 id="install.linux"> - <title>¦b Unix/Linux ¤U¦w¸Ë</title> + <title>¦w¸Ë¦b Unix/Linux</title> <para> ¦¹³¡¥÷ªº´£¥Ü¤Îµ§°O±N´£¨ì¦p¦ó¦b Linux¤Àµoª©¥»¤¤¦w¸Ë PHP¡C </para> Index: phpdoc-tw/chapters/install.macosx.xml +++ phpdoc-tw/chapters/install.macosx.xml <?xml version="1.0" encoding="big5"?> <!-- $Revision: 1.1 $ --> <!-- $Author: kevinkee $ --> <!-- EN-Revision: 1.5 Maintainer: Kevin Status: ready --> <sect1 id="install.macosx"> <title>¦w¸Ë¦b Unix/Mac OS X</title> <para> This section contains notes and hints specific to installing PHP on Mac OS X Server. ¦¹³¡¥÷ªº´£¥Ü¤Îµ§°O±N´£¨ì¦p¦ó¦bMac OS X Server ¤¤¦w¸Ë PHP¡C </para> <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±zn¦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·Qnªº¥\¯àªº 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"> <title>Mac OS X ¦øªA¾¹ª©¥»ªº¦w¸Ë</title> <para> <orderedlist> <listitem> <simpara>¤U¸ü³Ì·sªº Apache ©M PHP ªº¤Àµoª©¥»¡C</simpara> </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[ /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 ]]> </programlisting> </para> </listitem> <listitem> <para> If you want the compiler to do some optimization., you may also want to add this line: ¦pªG±zn½s;¹¶i¦æ¨ÇÀu¤Æ¤u§@¡A¥i¥H¥[¤J¤U¦C¤@¦æ¡G <programlisting role="shell"> <![CDATA[ setenv OPTIM=-O2 ]]> </programlisting> </para> </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[ /configure --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/share/man \ --with-xml \ --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±zn¥[¤J¨ä¥Lªº¼Ò²Õ¦p MySQL¡BGD µ¥¡A½Ð°O±o¦b¤Wz³]©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[ /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 ]]> </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°õ¦æ¤Wz <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> </orderedlist> </para> </formalpara> <!-- <simpara> TODO: Someone with Mac OS X skills needs to improve this DOC Also, these links are 404 and outdated anyways and stepwise doesn't support PHP anymore. See also bug #14732 Other examples for <ulink url="&url.stepwise.macosx-client;">Mac OS X client</ulink> and <ulink url="&url.stepwise.macosx-client;">Mac OS X server</ulink> are available at <ulink url="&url.stepwise;">Stepwise</ulink>. </simpara> --> </sect2> <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[ #AddType application/x-httpd-php .php #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><?php phpinfo() ?></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><?php phpinfo() ?></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> </sect1> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->