php-doc-en/install/macos/client.xml
Bagi Levente László a56b34628b recover mistake
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@166704 c90b9560-bf6c-de11-be94-00142212c4b1
2004-08-18 15:56:40 +00:00

99 lines
2.9 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<sect1 id="install.macosx.client">
<title>Compiling for MacOS X Client</title>
<!-- TODO: verify these instructions (the wget URL below does not seem to work for me)
Goba - June 04. 2004. -->
<simpara>
The following instructions will help you install a PHP module for the Apache
web server included in MacOS X. This version includes support for the MySQL
and PostgreSQL databases. These instructions are graciously provided by
<ulink url="&url.macosx;">Marc Liyanage</ulink>.
</simpara>
<warning>
<para>
Be careful when you do this, you could screw up your Apache web server!
</para>
</warning>
<para>
Do this to install:
<orderedlist>
<listitem>
<simpara>
Open a terminal window.
</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.
</simpara>
</listitem>
<listitem>
<simpara>
Type <userinput>gunzip libphp4.so.gz</userinput>.
</simpara>
</listitem>
<listitem>
<simpara>
Type <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)
<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.
</para>
</listitem>
<listitem>
<simpara>
Finally, type <userinput>sudo apachectl graceful</userinput> to restart
the web server.
</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>.
</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.
</para>
</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
-->