cvs: phpdoc-he /chapters install.apache.xml

From: Date: Thu, 17 Jul 2003 19:25:17 +0000
Subject: cvs: phpdoc-he /chapters install.apache.xml
Groups: php.doc.he 
Request: Send a blank email to doc-he+get-159@lists.php.net to get a copy of this message
hadar_p Thu Jul 17 15:25:17 2003 EDT Modified files: /phpdoc-he/chapters install.apache.xml Log: Updated to latest English version

Index: phpdoc-he/chapters/install.apache.xml diff -u phpdoc-he/chapters/install.apache.xml:1.3 phpdoc-he/chapters/install.apache.xml:1.4 --- phpdoc-he/chapters/install.apache.xml:1.3 Sat May 17 15:40:08 2003 +++ phpdoc-he/chapters/install.apache.xml Thu Jul 17 15:25:17 2003 @@ -1,26 +1,28 @@ <?xml version="1.0" encoding="WINDOWS-1255"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> +<!-- HE-Revision: 1.00 Maintainer: hadar_p Status: complete --> <sect1 id="install.apache"> <title>ùøúéí-Apache</title> <para> - çì÷ æä îëéì äòøåú åòöåú ñôöéôéí ìäú÷ðåú ùì PHP òì Apache, - âí ì- <link linkend="install.apache.unix">Unix</link> åâí ì- - <link linkend="install.apache.windows">Windows</link>. + çì÷ æä îëéì äòøåú åòöåú ñôöéôéåú ìäú÷ðú PHP á- Apache, âí àì + âøñàú <link linkend="install.apache.unix">Unix</link> åâí àì + âøñú <link linkend="install.apache.windows">Windows</link> + éù ìðå âí <link linkend="install.apache2">äåøàåú åäòøåú ùì Apache 2 + áãó ðôøã</link>. </para> <sect2 id="install.apache.unix"> - <title>ôøèéí ùì äú÷ðú PHP òí Apache òì âáé Unix</title> + <title>ôøèéí òì äú÷ðú PHP òí Apache òì âáé Unix</title> <para> - You can select arguments to add to the - <command>configure</command> on line 10 below from the <link - linkend="install.configure">Complete list of configure - options</link>. The version numbers have been omitted here, to - ensure the instructions are not incorrect. You will need to replace - the 'xxx' here with the correct values from your files. + àúä éëåì ìáçåø àøâåîðèéí ìäåñéó àì ä- <command>configure</command> + áùåøä 10 äðîöàú ìîèä îúåê <link + linkend="install.configure">øùéîú àôùøåéåú ääâãøåú äîìàä</link>. + îñôøé äâøñàåú äåùîèå ëàï, òì îðú ååãà ùääåøàåú ìà éäéå ìà-îãåéé÷åú. + àúä æ÷å÷ ìäçìéó àú ä- 'xxx' ëàï òí äòøëéí äðúåðéí îä÷áöéí ùìê. </para> <example id="install.apache.unix.longer"> <title> - äåøàåú äú÷ðä (Apache Shared Module Version) áùáéì PHP 4 + äåøàåú äú÷ðä (îåãåì Apache îùåúó) ùì PHP 4 </title> <screen> <![CDATA[ @@ -72,11 +74,10 @@ </example> <para> - Depending on your Apache install and Unix variant, there are many - possible ways to stop and restart the server. Below are some typical - lines used in restarting the server, for different apache/unix - installations. You should replace <literal>/path/to/</literal> with - the path to these applications on your systems. + úìåé áäú÷ðú ä- Apache åâøñú ä- Unix ùìê, éùðí îñôø ùéèåú àôùøéåú + ìòöåø åìàúçì àú äùøú. ìäìï ùåøåú ô÷åãä èéôåñéåú ùáùéîåù ìàúçì àú äùøú, + ìäú÷ðåú Apache/Unix ùåðåú. àúä úöèøê ìäçìéó àú <literal>/path/to/</literal> + òí äðúéá ìééùåîéí äàìå áîòøëåú ùìê. <informalexample> <screen> <![CDATA[ @@ -98,14 +99,14 @@ ]]> </screen> </informalexample> - The locations of the apachectl and http(s)dctl binaries often - vary. If your system has <literal>locate</literal> or - <literal>whereis</literal> or <literal>which</literal> commands, - these can assist you in finding your server control programs. + äîé÷åîéí ùì ÷áöé ääôòìä apachectl å- http(s)dctl ìòéúéí ÷øåáåú + ùåðéí. àí ìîòøëú ùìê éù ô÷åãåú <literal>locate</literal> àå + <literal>whereis</literal> àå <literal>which</literal>, + àúä éëåì ìäòæø áäí òì îðú ìîöåà àú äúåëðåú äùåìèåú áùøú ùìê. </para> <para> - Different examples of compiling PHP for apache are as follows: + ãåâîàåú ùåðåú ùì ÷îôåì PHP òáåø Apache ëãì÷îï: <informalexample> <programlisting role="shell"> <![CDATA[ @@ -115,11 +116,10 @@ </informalexample> </para> <para> - This will create a <filename>libphp4.so</filename> shared - library that is loaded into Apache using a LoadModule line in - Apache's <filename>httpd.conf</filename> file. The PostgreSQL - support is embedded into this <filename>libphp4.so</filename> - library. + æä éåöø ñôøééä îùåúôú <filename>libphp4.so</filename> + àùø ðèòðú ìúåê Apache áòæøú ùåøú ô÷åãä LoadModule áúåó + ÷åáõ &httpd.conf; ùì Apache. úîéëä ùì PostgreSQL îùåìáú + áúåê ñôøééú <filename>libphp4.so</filename> äæàú. </para> <para> <informalexample> @@ -131,12 +131,10 @@ </informalexample> </para> <para> - This will create a <filename>libphp4.so</filename> shared - library for Apache, but it will also create a - <filename>pgsql.so</filename> shared library that is loaded into - PHP either by using the extension directive in - &php.ini; file or by loading it explicitly in - a script using the <function>dl</function> function. + æä éåöø ñôøééä îùåúôú <filename>libphp4.so</filename> shared + òáåø Apache, àáì âí æä éåöø ñôøééä îùåúôú <filename>pgsql.so</filename> + àùø ðèòðú ìúåê PHP áòæøú äðçééú úåñôú á÷åáõ &php.ini; àå ò"é + èòéðä ùìå áñ÷øéôè äîùúîù áôåð÷öééú <function>dl</function>. </para> <para> <informalexample> @@ -148,17 +146,17 @@ </informalexample> </para> <para> - This will create a <filename>libmodphp4.a</filename> library, a - <filename>mod_php4.c</filename> and some accompanying files and - copy this into the <literal>src/modules/php4</literal> directory - in the Apache source tree. Then you compile Apache using - <literal>--activate-module=src/modules/php4/libphp4.a</literal> - and the Apache build system will create - <filename>libphp4.a</filename> and link it statically into the - <filename>httpd</filename> binary. The PostgreSQL support is - included directly into this <filename>httpd</filename> binary, - so the final result here is a single <filename>httpd</filename> - binary that includes all of Apache and all of PHP. + æä éåöø ñôøééú <filename>libmodphp4.a</filename>, + <filename>mod_php4.c</filename> åîñôø ÷áöéí ðìååéí åîòúé÷ äëì + ìúåê ñôøééú <literal>src/modules/php4</literal> äðîöàú áúåê + äñôøééä äøàùéú ùì ÷åã äî÷åø ùì Apache. àçøé ëï àúä ú÷îôì àú Apache + áòæøú <literal>--activate-module=src/modules/php4/libphp4.a</literal> + åîòøëú äáðééä ùì Apache úéöåø <filename>libphp4.a</filename> + åú÷ùø àåúå áöåøä ñèèéú ìúåê ÷åáõ ääôòìä <filename>httpd</filename>. + äúîéëä á- PostgreSQL ðëììú éùéøåú ìúåê ÷åáõ ääôòìä + <filename>httpd</filename>, åìëï äúåöàä äñåôéú äéà ÷åáõ äôòìä + <filename>httpd</filename> éçéã ùëåìì àú ëì ä- Apache + åàú ëì ä- PHP. </para> <para> <informalexample> @@ -170,25 +168,23 @@ </informalexample> </para> <para> - Same as before, except instead of including PostgreSQL support - directly into the final <filename>httpd</filename> you will get - a <filename>pgsql.so</filename> shared library that you can load - into PHP from either the &php.ini; file or - directly using <function>dl</function>. + ëîå ÷åãí, îìáã ùáî÷åí ùäúîéëä á- PostgreSQL úëìì éùéøåú ìúåê + <filename>httpd</filename> äñåôé àúä ú÷áì ñôøééä îùåúôú + <filename>pgsql.so</filename> ùúåëì ìèòåï ìúåê PHP àå îúåê + ÷åáõ &php.ini; àå éùéøåú áòæøú <function>dl</function>. </para> <para> - When choosing to build PHP in different ways, you should consider - the advantages and drawbacks of each method. Building as a shared - object will mean that you can compile apache separately, and don't - have to recompile everything as you add to, or change, PHP. - Building PHP into apache (static method) means that PHP will - load and run faster. For more information, see the Apache - <ulink url="&url.apachedso;">webpage on DSO support</ulink>. + ëàùø àúä áåçø ìáðåú àú PHP áãøëéí ùåðåú, àúä öøéê ìäúçùá + áéúøåðåú åáçñøåðåú ùì ëì ùéèä. áðééä ëàåáéé÷è îùåúó îùîòåúä + ùàúä éëåì ì÷îôì àú PHP áðôøã, åàúä ìà úæã÷÷ ì÷îôì äëì îçãù + ëàùø àúä úøöä ìäåñéó àå ìùðåú àú ä- PHP. áðééú PHP ìúåê Apache + (ùéèä ñèèéú) îùîòåúä ù- PHP éèòï åéòáåã îäø éåúø. ìòåã îéãò, øàä + àú + <ulink url="&url.apachedso;">òîåã úîéëä á- DSO </ulink> ùì Apache. </para> <note> <para> - Apache's default http.conf currently ships with a section that looks - like this: + áøéøú äîçãì &httpd.conf; ùì Apache éåöà ìàåø òí çì÷ äð÷øà ëê: <informalexample> <programlisting> <![CDATA[ @@ -197,47 +193,46 @@ ]]> </programlisting> </informalexample> - Unless you change that to "Group nogroup" or something like that ("Group daemon" is - also very common) PHP will not be able to open files. + àìà àí ëï úùðä àú æä ì- "Group nogroup" àå ìîùäå áñâðåï (âí "Group daemon" + äéà îàåã ðôåöä), PHP ìà éåëì ìôúåç ÷áöéí. </para> </note> <note> <para> - Make sure you specify the installed version of apxs when using --with-apxs=/path/to/apxs. - You must NOT use the apxs version that is in the apache sources but the one that is actually - installed on your system. + ååãà ëé öééðú àú äâøñä äîåú÷ðú ùì Apxs áòæøú + <option role="configure">--with-apxs=/path/to/apxs</option>. + àñåø ìäùúîù áâøñú apxs äðîöàú áúåê î÷åø ä- Apache, àìà áâøñä ùáàîú + îåú÷ðú òì îòøëú ääôòìä ùìê. </para> </note> </sect2> <sect2 id="install.apache.windows"> - <title>Installing PHP on Windows with Apache 1.3.x</title> + <title>äú÷ðú PHP òì Windows òí Apache 1.3.x</title> <simpara> - There are two ways to set up PHP to work with Apache 1.3.x - on Windows. One is to use the CGI binary (php.exe), - the other is to use the Apache module DLL. In either case - you need to stop the Apache server, and edit your - <filename>srm.conf</filename> or <filename>httpd.conf</filename> - to configure Apache to work with PHP. + éùðï ùúé ùéèåú ìäâãéø àú PHP ùéòáåã òí Apache 1.3.x + òì Windows. äùéèä äøàùåðä äéà äìùúîá á÷åáõ ääôòìä îñåâ + CGI (php.exe), åäùéèä äùðééä äéà ìäùúîù áîåãåì DLL ùì + Apache. áëì î÷øä àúä öøéê ìòöåø àú ùøú Apache, åìòøåê + àú &httpd.conf; ùìê ìäâãéø àú Apache ùéòáåã òí PHP. </simpara> <simpara> - It is worth noting here that now the SAPI module has been - made more stable under windows, we recommend it's use above - the CGI binary, since it is more transparent and secure. + æä çùåá ìöééï ëàï ùáéîéí àìå îåãåì ä- SAPI ðòùä éåúø + éöéá úçú Windows, ìëï àðçðå îîìéöéí á÷åáõ ääôòìä + îñåâ CGI, îùåí ùäåà éåúø áøåø ìäôòìä åéåúø îàåáèç. </simpara> <simpara> - Although there can be a few variations of configuring PHP - under Apache, these are simple enough to be used by the - newcomer. Please consult the Apache Docs for further - configuration directives. + àó òì ôé ùéù îñôø ååøéàöéåú ùì äâãøú PHP úçú Apache, + äï îñôé÷ ôùåèåú òì îðú ùâí îùúîùéí çãùéí éåëìå ìäùúîù áäï. + àðà äúééòõ áúéòåã ùì Apache ìäðçéåú äâãøä ðåñôåú. </simpara> <para> - If you unziped the PHP package to c:\php\ as described - in the <link linkend="install.windows.manual">Manual - Installation Steps</link> section, you need to insert - these lines to your Apache configuration file to set - up the CGI binary: + ôúç àú çáéìú PHP àì úåê <filename>c:\php\</filename> ëîå äîôåøè + áçì÷ <link linkend="install.windows.manual">öòãé + äú÷ðä éãðééí</link>, àúä æ÷å÷ ìäëðéñ àú ùåøåú àìä + á÷åáõ ääâãøåú ùì Apache ùìê ìäâãéø àú ÷åáõ ääôòìä + îñåâ CGI: <itemizedlist> <listitem> <simpara> @@ -261,91 +256,91 @@ </simpara> </listitem> </itemizedlist> - Note that the second line in the list above can be found - in the actual versions of <filename>httpd.conf</filename>, - but it is commented out. Remember also to substitute the - <filename>c:/php/</filename> for your actual path to PHP. + ùéí ìá ùäùåøä äùðééä áøùéîä ìîòìä éëåìä ìäéîöà áâøñàåú äàîéúéåú + ùì &httpd.conf;, àáì äéà îå÷ôú ñéîï äòøä. æëåø ùàúä öøéê âí ìäçìéó + àú <filename>c:/php/</filename> ìðúéá äàîéúé ùì PHP àöìê. </para> <warning> <para> - By using the CGI setup, your server is open - to several possible attacks. Please read - our <link linkend="security.cgi-bin">CGI security - section</link> to learn how to defend yourself from attacks. + áùéîåù áäú÷ðú CGI, äùøú ùìê ôúåç ìîñôø äú÷ôåú àôùøéåú. + àðà ÷øà àú <link linkend="security.cgi-bin">çì÷ àáèçú + CGI</link> ùìðå òì îðú ììîåã ëéöã úåëì ìäâï òì òöîê îôðé + äú÷ôåú. </para> </warning> <para> - If you would like to use PHP as a module in Apache, - be sure to move <filename>php4ts.dll</filename> to - the windows/system (for Windows 9x/Me) or winnt/system32 - (for Windows NT/2000/XP) directory, overwriting any older file. - Then you should add the following two lines to you Apache - conf file: + àí àúä øåöä ìäùúîù á- PHP ëîåãåì á- Apache, úååãà ëé äòú÷ú àú + <filename>php4ts.dll</filename> àì úåê ñôøééú <filename>windows/system</filename> + (á- Windows 9x/Me), ñôøééú <filename>winnt/system32</filename> (á- Windows + NT/2000) àå ñôøééú <filename>windows/system32</filename> (á- Windows XP), + ëàùø àúä ëåúá òì ÷áöéí éùðéí àùø ééúëï å÷ééîéí. àæ àúä öøéê ìäåñéó àú + äùåøåú äáàåú ì÷åáõ &httpd.conf; ùì Apache ùìê. <itemizedlist> <listitem> <simpara> - <literal> - LoadModule php4_module c:/php/sapi/php4apache.dll - </literal> + ôúç àú &httpd.conf; áòæøú òåøê äàäåá òìéê åàúø àú äðçééú + <literal>LoadModule</literal> åäåñó àú äùåøä äáàä + <emphasis>áñåó</emphasis> øùéîú ääðçéåú: + <literal>LoadModule php4_module c:/php/sapi/php4apache.dll</literal> </simpara> </listitem> <listitem> <simpara> - <literal> - AddType application/x-httpd-php .php .phtml - </literal> + ééúëï åàúä úîöà àçøé ùéîåù áîú÷éï Windows ùì Apache ùàúä öøéê ìäâãéø + àú äðçééú <literal>AddModule</literal> ùì <filename>mod_php4.c</filename>. + æä áîéåçã çùåá àí äðçééú <literal>ClearModuleList</literal> îåâãøú, + àùø àåúä úîöà ò"é âìéìä ìîèä ùì ëîä ùåøåú. àúä úøàä øùéîä ùì òøëé + <literal>AddModule</literal>, ùí äåñó àú äùåøä äáàä <emphasis>áñåó</emphasis> + äøùéîä: + <literal>AddModule mod_php4.c</literal> + </simpara> + </listitem> + <listitem> + <simpara> + çôù àçøé äáéèåé äãåîä àì + <literal># AddType allows you to tweak mime.types</literal>. àúä + úøàä îñôø òøëé <literal>AddType</literal>, äåñó àú äùåøä äáàä + <emphasis>áñåó</emphasis> ùì äøùéîä: + <literal>AddType application/x-httpd-php .php</literal>. + àúä éëåì ìáçåø ëàï ëì ñéåîú ùàúä øåöä ù- PHP éðúç. .php + äéà ôùåè äñéåîú ùàðçðå îîìéöéí òìéä. àúä éëåì àôéìå ìëìåì .html, + å- .php3 ìååãà ëé äñ÷øéôèéí äéùðéí ùìê éòáãå. </simpara> </listitem> </itemizedlist> </para> <simpara> - After changing the configuration - file, remember to restart the server, for example, - <literal>NET STOP APACHE</literal> followed by - <literal>NET START APACHE</literal>, if you run Apache - as a Windows Service, or use your regular shortcuts. + àçøé äùéðåé ùì ÷åáõ ääâãøåú, æëåø ìàúçì àú äùøú ùìê, ìãåâîà, + <command>NET STOP APACHE</command> åàçøéä + <command>NET START APACHE</command>, àí àúä îøéõ àú Apache + ëùéøåú Windows, àå äùúîù á÷éöåøé äãøê äøâéìéí ùìê. </simpara> - <note> - <simpara> - You may find after using the windows installer for Apache - that you need to define the <literal>AddModule</literal> - directive for <filename>mod_php4.c</filename> in the - configuration file (<filename>httpd.conf</filename>). - This is done by adding <literal>AddModule mod_php4.c</literal> - to the <literal>AddModule</literal> list, near the beginning - of the configuration file. This is especially important if - the <literal>ClearModuleList</literal> directive is defined. - Failure to do this may mean PHP will not be registered as an - Apache module. - </simpara> - </note> - <simpara> - There are 2 ways you can use the source code highlighting feature, - however their ability to work depends on your installation. - If you have configured Apache to use PHP as an ISAPI module, then by - adding the following line to your configuration file you can use - this feature: <literal>AddType application/x-httpd-php-source .phps - </literal> + éùðï ùúé ùéèåú ùáäï àúä éëåì ìäùúîù áúëåðú äáìèú ÷åã äî÷åø, àáì + äéëåìú ùìäï ìòáåã úìåéä áäú÷ðä ùìê. àí àúä äâãøú àú Apache ìòáåã + ëîåãåì SAPI, àæ äåñôú äùåøä äáàä àì &httpd.conf; ùìê (áàåúå î÷åí + àùø äëðñú àú <literal>AddType application/x-httpd-php .php</literal> + áùìáéí ìîòìä) àúä éëåì ìäùúîù áùåøä äáàä: + <literal>AddType application/x-httpd-php-source .phps</literal>. </simpara> <simpara> - If you chose to configure Apache to use PHP as a CGI binary, you - will need to use the <function>show_source</function> function. To - do this simply create a PHP script file and add this code: + àí àúä áçøú ìäâãéø àú Apache ìäùúîù á- PHP ë÷åáõ äôòìä îñåâ CGI, + àúä úöèøê ìäùúîù áôåð÷öééú <function>show_source</function>. + ìòùåú æàú ôùåè öåø ñ÷øéôè PHP åäåñó àú äùåøä äáàä ì÷åã: <literal>&lt;?php show_source ("original_php_script.php"); ?></literal>. - Substitute <literal>original_php_script.php</literal> with - the name of the file you wish to show the source of. + äçìó àú <literal>original_php_script.php</literal> òí + ùí ùì ä÷åáõ ùàúä øåöä ìäøàåú àú ä÷åã ùìå. </simpara> <note> <simpara> - On Win-Apache all backslashes in a path statement such - as "c:\directory\file.ext", must be converted to - forward slashes, as "c:/directory/file.ext". + á- Win-Apache ëì äìåëñðéí äàçåøééí áîùôèé äðúéáéí ëîå + "c:\directory\file.ext", éù öåøê ìäîéøí àì ìåëñðéí + ÷ãîééí, ëîå "c:/directory/file.ext". </simpara> </note> </sect2>
« previous php.doc.he (#159) next »