cvs: phpdoc /en/install/macos bundled.xml index.xml
| From: | Philip Olson | Date: | Mon, 29 Jan 2007 02:38:08 +0000 |
| Subject: | cvs: phpdoc /en/install/macos bundled.xml index.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969375077@lists.php.net to get a copy of this message | ||
philip Mon Jan 29 02:38:08 2007 UTC
Added files:
/phpdoc/en/install/macos bundled.xml
Modified files:
/phpdoc/en/install/macos index.xml
Log:
Added a wordy "Installing the bundled version" for Mac OS to the install
section.
http://cvs.php.net/viewvc.cgi/phpdoc/en/install/macos/index.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/install/macos/index.xml diff -u phpdoc/en/install/macos/index.xml:1.7 phpdoc/en/install/macos/index.xml:1.8 --- phpdoc/en/install/macos/index.xml:1.7 Wed Aug 18 15:56:40 2004 +++ phpdoc/en/install/macos/index.xml Mon Jan 29 02:38:08 2007 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <chapter id="install.macosx"> <title>Installation on Mac OS X</title> <para> @@ -10,6 +10,7 @@ 9 and earlier versions. </para> &install.macos.packages; + &install.macos.bundled; &install.macos.server; &install.macos.client; </chapter> http://cvs.php.net/viewvc.cgi/phpdoc/en/install/macos/bundled.xml?view=markup&rev=1.1 Index: phpdoc/en/install/macos/bundled.xml +++ phpdoc/en/install/macos/bundled.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <sect1 id="install.macosx.bundled"> <title>Using the bundled PHP</title> <simpara> PHP has come standard with Macs since OS X version 10.0.0. Enabling PHP with the default web server requires uncommenting a few lines in the Apache configuration file <filename>httpd.conf</filename> whereas the <acronym>CGI</acronym> and/or <acronym>CLI</acronym> are enabled by default (easily accessible via the Terminal program). </simpara> <simpara> Enabling PHP using the instructions below is meant for quickly setting up a local development environment. It's <emphasis>highly recommended</emphasis> to always upgrade PHP to the newest version. Like most live software, newer versions are created to fix bugs and add features and PHP being is no different. See the appropriate MAC OS X installation documentation for further details. The following instructions are geared towards a beginner with details provided for getting a default setup to work. All users are encouraged to compile, or install a new packaged version. </simpara> <simpara> The standard installation type is using mod_php, and enabling the bundled mod_php on Mac OS X for the Apache web server (the default web server, that is accessible via System Preferences) involves the following steps: </simpara> <para> <orderedlist> <listitem> <simpara> Locate and open the Apache configuration file. By default, the location is as follows: <filename>/etc/httpd/httpd.conf</filename> </simpara> <simpara> Using <literal>Finder</literal> or <literal>Spotlight</literal> to find this file may prove difficult as by default it's private and owned by the <literal>root</literal> user. </simpara> <note> <simpara> One way to open this is by using a Unix based text editor in the Terminal, for example <literal>nano</literal>, and because the file is owned by root we'll use the <literal>sudo</literal> command to open it (as root) so for example type the following into the <literal>Terminal</literal> Application (after, it will prompt for a password): <literal>sudo nano /etc/httpd/httpd.conf</literal> </simpara> <simpara> Noteworthy nano commands: <literal>^w</literal> (search), <literal>^o</literal> (save), and <literal>^x</literal> (exit) where <literal>^</literal> represents the Ctrl key. </simpara> </note> </listitem> <listitem> <para> With a text editor, uncomment the lines (by removing the #) that look similar to the following (these two lines are often not together, locate them both in the file): <screen> <![CDATA[ # LoadModule php4_module libexec/httpd/libphp4.so # AddModule mod_php4.c ]]> </screen> Notice the location/path. When building PHP in the future, the above files should be replaced or commented out. </para> </listitem> <listitem> <para> Be sure the desired extensions will parse as PHP (examples: .php .html and .inc) </para> <para> Due to the following statement already existing in <filename>httpd.conf</filename> (as of Mac Panther), once PHP is enabled the <filename>.php</filename> files will automatically parse as PHP. <screen> <![CDATA[ <IfModule mod_php4.c> # If php is turned on, we respect .php and .phps files. AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps # Since most users will want index.php to work we # also automatically enable index.php <IfModule mod_dir.c> DirectoryIndex index.html index.php </IfModule> </IfModule> ]]> </screen> </para> </listitem> <listitem> <simpara> Be sure the DirectoryIndex loads the desired default index file </simpara> <simpara> This is also set in <filename>httpd.conf</filename>. Typically <filename>index.php</filename> and <filename>index.html</filename> are used. By default <filename>index.php</filename> is enabled because it's also in the PHP check shown above. Adjust accordingly. </simpara> </listitem> <listitem> <simpara> Set the &php.ini; location or use the default </simpara> <simpara> A typical default location on Mac OS X is <filename>/usr/local/php/php.ini</filename> and a call to <function>phpinfo</function> will reveal this information. If a &php.ini; is not used, PHP will use all default values. See also the related FAQ on <link linkend="faq.installation.phpini">finding php.ini</link>. </simpara> </listitem> <listitem> <simpara> Locate or set the <literal>DocumentRoot</literal> </simpara> <simpara> This is the root directory for all the web files. Files in this directory are served from the web server so the PHP files will parse as PHP before outputting them to the browser. A typical default path is <filename>/Library/WebServer/Documents</filename> but this can be set to anything in <filename>httpd.conf</filename>. Alternatively, the default DocumentRoot for individual users is <filename>/Users/yourusername/Sites</filename> </simpara> </listitem> <listitem> <simpara> Create a <function>phpinfo</function> file </simpara> <para> The <function>phpinfo</function> function will display information about PHP. Consider creating a file in the DocumentRoot with the following PHP code: <programlisting role="php"> <![CDATA[ <?php phpinfo(); ?> ]]> </programlisting> </para> </listitem> <listitem> <simpara> Restart Apache, and load the PHP file created above </simpara> <simpara> To restart, either execute <literal>sudo apachectl graceful</literal> in the shell or stop/start the "Personal Web Server" option in the OS X System Preferences. By default, loading local files in the browser will have an <acronym>URL</acronym> like so: <filename>http://localhost/info.php</filename> Or using the DocumentRoot in the user directory is another option and would end up looking like: <filename>http://localhost/~yourusername/info.php</filename> </simpara> </listitem> </orderedlist> </para> <simpara> The <acronym>CLI</acronym> (or <acronym>CGI</acronym> in older versions) is appropriately named <filename>php</filename> and likely exists as <filename>/usr/bin/php</filename>. Open up the terminal, read the <link linkend="features.commandline">commandline section</link> of the PHP manual, and execute <literal>php -v</literal> to check the PHP version of this PHP binary. A call to <function>phpinfo</function> will also reveal this information. </simpara> </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 -->
http://cvs.php.net/viewvc.cgi/phpdoc/en/install/macos/index.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc/en/install/macos/index.xml diff -u phpdoc/en/install/macos/index.xml:1.7 phpdoc/en/install/macos/index.xml:1.8 --- phpdoc/en/install/macos/index.xml:1.7 Wed Aug 18 15:56:40 2004 +++ phpdoc/en/install/macos/index.xml Mon Jan 29 02:38:08 2007 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <chapter id="install.macosx"> <title>Installation on Mac OS X</title> <para> @@ -10,6 +10,7 @@ 9 and earlier versions. </para> &install.macos.packages; + &install.macos.bundled; &install.macos.server; &install.macos.client; </chapter> http://cvs.php.net/viewvc.cgi/phpdoc/en/install/macos/bundled.xml?view=markup&rev=1.1 Index: phpdoc/en/install/macos/bundled.xml +++ phpdoc/en/install/macos/bundled.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <sect1 id="install.macosx.bundled"> <title>Using the bundled PHP</title> <simpara> PHP has come standard with Macs since OS X version 10.0.0. Enabling PHP with the default web server requires uncommenting a few lines in the Apache configuration file <filename>httpd.conf</filename> whereas the <acronym>CGI</acronym> and/or <acronym>CLI</acronym> are enabled by default (easily accessible via the Terminal program). </simpara> <simpara> Enabling PHP using the instructions below is meant for quickly setting up a local development environment. It's <emphasis>highly recommended</emphasis> to always upgrade PHP to the newest version. Like most live software, newer versions are created to fix bugs and add features and PHP being is no different. See the appropriate MAC OS X installation documentation for further details. The following instructions are geared towards a beginner with details provided for getting a default setup to work. All users are encouraged to compile, or install a new packaged version. </simpara> <simpara> The standard installation type is using mod_php, and enabling the bundled mod_php on Mac OS X for the Apache web server (the default web server, that is accessible via System Preferences) involves the following steps: </simpara> <para> <orderedlist> <listitem> <simpara> Locate and open the Apache configuration file. By default, the location is as follows: <filename>/etc/httpd/httpd.conf</filename> </simpara> <simpara> Using <literal>Finder</literal> or <literal>Spotlight</literal> to find this file may prove difficult as by default it's private and owned by the <literal>root</literal> user. </simpara> <note> <simpara> One way to open this is by using a Unix based text editor in the Terminal, for example <literal>nano</literal>, and because the file is owned by root we'll use the <literal>sudo</literal> command to open it (as root) so for example type the following into the <literal>Terminal</literal> Application (after, it will prompt for a password): <literal>sudo nano /etc/httpd/httpd.conf</literal> </simpara> <simpara> Noteworthy nano commands: <literal>^w</literal> (search), <literal>^o</literal> (save), and <literal>^x</literal> (exit) where <literal>^</literal> represents the Ctrl key. </simpara> </note> </listitem> <listitem> <para> With a text editor, uncomment the lines (by removing the #) that look similar to the following (these two lines are often not together, locate them both in the file): <screen> <![CDATA[ # LoadModule php4_module libexec/httpd/libphp4.so # AddModule mod_php4.c ]]> </screen> Notice the location/path. When building PHP in the future, the above files should be replaced or commented out. </para> </listitem> <listitem> <para> Be sure the desired extensions will parse as PHP (examples: .php .html and .inc) </para> <para> Due to the following statement already existing in <filename>httpd.conf</filename> (as of Mac Panther), once PHP is enabled the <filename>.php</filename> files will automatically parse as PHP. <screen> <![CDATA[ <IfModule mod_php4.c> # If php is turned on, we respect .php and .phps files. AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps # Since most users will want index.php to work we # also automatically enable index.php <IfModule mod_dir.c> DirectoryIndex index.html index.php </IfModule> </IfModule> ]]> </screen> </para> </listitem> <listitem> <simpara> Be sure the DirectoryIndex loads the desired default index file </simpara> <simpara> This is also set in <filename>httpd.conf</filename>. Typically <filename>index.php</filename> and <filename>index.html</filename> are used. By default <filename>index.php</filename> is enabled because it's also in the PHP check shown above. Adjust accordingly. </simpara> </listitem> <listitem> <simpara> Set the &php.ini; location or use the default </simpara> <simpara> A typical default location on Mac OS X is <filename>/usr/local/php/php.ini</filename> and a call to <function>phpinfo</function> will reveal this information. If a &php.ini; is not used, PHP will use all default values. See also the related FAQ on <link linkend="faq.installation.phpini">finding php.ini</link>. </simpara> </listitem> <listitem> <simpara> Locate or set the <literal>DocumentRoot</literal> </simpara> <simpara> This is the root directory for all the web files. Files in this directory are served from the web server so the PHP files will parse as PHP before outputting them to the browser. A typical default path is <filename>/Library/WebServer/Documents</filename> but this can be set to anything in <filename>httpd.conf</filename>. Alternatively, the default DocumentRoot for individual users is <filename>/Users/yourusername/Sites</filename> </simpara> </listitem> <listitem> <simpara> Create a <function>phpinfo</function> file </simpara> <para> The <function>phpinfo</function> function will display information about PHP. Consider creating a file in the DocumentRoot with the following PHP code: <programlisting role="php"> <![CDATA[ <?php phpinfo(); ?> ]]> </programlisting> </para> </listitem> <listitem> <simpara> Restart Apache, and load the PHP file created above </simpara> <simpara> To restart, either execute <literal>sudo apachectl graceful</literal> in the shell or stop/start the "Personal Web Server" option in the OS X System Preferences. By default, loading local files in the browser will have an <acronym>URL</acronym> like so: <filename>http://localhost/info.php</filename> Or using the DocumentRoot in the user directory is another option and would end up looking like: <filename>http://localhost/~yourusername/info.php</filename> </simpara> </listitem> </orderedlist> </para> <simpara> The <acronym>CLI</acronym> (or <acronym>CGI</acronym> in older versions) is appropriately named <filename>php</filename> and likely exists as <filename>/usr/bin/php</filename>. Open up the terminal, read the <link linkend="features.commandline">commandline section</link> of the PHP manual, and execute <literal>php -v</literal> to check the PHP version of this PHP binary. A call to <function>phpinfo</function> will also reveal this information. </simpara> </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 -->