[prev in list] [next in list] [prev in thread] [next in thread]
List: php-doc-cvs
Subject: [DOC-CVS] cvs: phpdoc /en/install pecl.xml /entities global.ent
From: "Kalle Sommer Nielsen" <kalle () php ! net>
Date: 2008-08-31 0:58:16
Message-ID: cvskalle1220144296 () cvsserver
[Download RAW message or body]
kalle Sun Aug 31 00:58:16 2008 UTC
Modified files:
/phpdoc/en/install pecl.xml
/phpdoc/entities global.ent
Log:
Commit improved PECL install section for Windows by Guillaume Rossolini
["kalle-20080831005816.txt" (text/plain)]
http://cvs.php.net/viewvc.cgi/phpdoc/en/install/pecl.xml?r1=1.17&r2=1.18&diff_format=u
Index: phpdoc/en/install/pecl.xml
diff -u phpdoc/en/install/pecl.xml:1.17 phpdoc/en/install/pecl.xml:1.18
--- phpdoc/en/install/pecl.xml:1.17 Mon Oct 15 12:43:06 2007
+++ phpdoc/en/install/pecl.xml Sun Aug 31 00:58:16 2008
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.17 $ -->
+<!-- $Revision: 1.18 $ -->
<chapter xml:id="install.pecl" xmlns="http://docbook.org/ns/docbook" \
xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Installation of PECL \
extensions</title> @@ -100,21 +100,192 @@
</sect1>
<sect1 xml:id="install.pecl.windows">
- <title>PECL for Windows users</title>
- <simpara>
- As with any other PHP extension <acronym>DLL</acronym>, installation is as
- simple as copying the PECL extension DLLs into the <link \
linkend="ini.extension-dir">
- extension_dir</link> folder and loading them from &php.ini;. For
- example, add the following line to your &php.ini;:
- </simpara>
+ <title>Installing a PHP extension</title>
<para>
- <screen>
-extension=php_extname.dll
- </screen>
+ On Windows, you have two ways to load a PHP extension: either compile it into \
PHP, or + load the DLL. Loading a precompiled extension is the easiest and \
preferred way. </para>
- <simpara>
- After doing this, restart the web service.
- </simpara>
+ <para>
+ To load an extension, you need to have it available as a ".dll" file on your \
system. + All the extensions are automatically and periodically compiled by the \
PHP Group + (see next section for the download).
+ </para>
+ <para>
+ To compile an extension into PHP, please refer to <link \
linkend="install.windows.building"> + building from source</link> documentation.
+ </para>
+ <para>
+ To compile a standalone extension (aka a DLL file), please refer to <link \
linkend="install.windows.building"> + building from source</link> documentation. If \
the DLL file is available neither with your + PHP distribution nor in PECL, you \
may have to compile it before you can start using the + extension.
+ </para>
+
+ <sect2 xml:id="install.pecl.windows.locate">
+ <title>Where to find an extension?</title>
+ <para>
+ PHP extensions are usually called "php_*.dll" (where the star represents the \
name of + the extension) and they are located under the "PHP\ext" \
("PHP\extensions" in PHP4) + folder.
+ </para>
+ <para>
+ PHP ships with the extensions most useful to the majority of developers. They \
are + called "core" extensions.
+ </para>
+ <para>
+ However, if you need functionnality not provided by any core extension, you may \
still be + able to find one in PECL. The PHP Extension Community Library (PECL) \
is a repository for + PHP Extensions, providing a directory of all known \
extensions and hosting facilities for + downloading and development of PHP \
extensions. + </para>
+ <para>
+ If you have developped an extension for your own uses, you might want to think \
about hosting + it on PECL so that others with the same needs can benefit from \
your time. A nice side effect + is that you give them a good chance to give you \
feedback, (hopefully) thanks, bug reports + and even fixes/patches. Before you \
submit your extension for hosting on PECL, please read + &url.pecl.submit.
+ </para>
+ </sect2>
+
+ <sect2 xml:id="install.pecl.windows.which">
+ <title>Which extension to download?</title>
+ <para>
+ <emphasis>Many times, you will find several versions of each DLL:</emphasis>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Different version numbers (at least the first two numbers should match)
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Different thread safety settings
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <listitem>
+ <simpara>
+ Different processor settings (x86, 64 bits...)
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <listitem>
+ <simpara>
+ Different debugging settings
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <listitem>
+ <simpara>
+ <literal>ect.</literal>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ You should keep in mind that your extension settings should match all the
+ settings of the PHP executable you are using. The following PHP script will
+ tell you <emphasis>all</emphasis> about your PHP settings:
+ <example>
+ <info><title>Getting your php information using \
<function>phpinfo</function></title></info> + <programlisting role="php">
+<![CDATA[
+<?php
+phpinfo();
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ <para>
+ Or from the command line, run:
+ <example>
+ <info><title>Getting your php information using the command line \
interface</title></info> + <programlisting role="cmd">
+<![CDATA[
+drive:\\path\to\php\executable\php.exe -i
+]]>
+ </programlisting>
+ </example>
+ </para>
+ </sect2>
+
+ <sect2 xml:id="install.pecl.windows.loading">
+ <title>Loading an extension</title>
+ <para>
+ The most common way to load a PHP extension is to include it in your \
<filename>php.ini</filename> + configuration file. Please note that many \
extensions are already present in your + <filename>php.ini</filename> and that \
you only need to remove the semicolon to activate them. + <example>
+ <info><title>Inactive extension</title></info>
+ <programlisting role="ini">
+<![CDATA[
+;extension=php_extname.dll
+]]>
+ </programlisting>
+ </example>
+ <example>
+ <info><title>Active extension</title></info>
+ <programlisting role="ini">
+<![CDATA[
+extension=php_extname.dll
+]]>
+ </programlisting>
+ </example>
+ </para>
+ <para>
+ However, some webservers are confusing because they do not use the php.ini \
located alongside + your PHP executable. To find out where your actual \
<filename>php.ini</filename> resides, look + for its path in \
<function>phpinfo</function>: + <example>
+ <info><title>Not the info we want</title></info>
+ <programlisting role="text">
+<![CDATA[
+Configuration File (php.ini) Path C:\WINDOWS
+]]>
+ </programlisting>
+ </example>
+ <example>
+ <info><title>This is what we need</title></info>
+ <programlisting role="text">
+<![CDATA[
+Loaded Configuration File C:\Program Files\PHP\5.2\php.ini
+]]>
+ </programlisting>
+ </example>
+ </para>
+ <para>
+ After activating an extension, save <filename>php.ini</filename>, restart the \
webserver and check + <function>phpinfo</function> again. The new extension \
should now have its own section. + </para>
+ </sect2>
+
+ <sect2 xml:id="install.pecl.windows.problemsolving">
+ <title>Resolving problems</title>
+ <para>
+ If the extension does not appear in <function>phpinfo</function>, you should \
check your logs to + learn where the problem comes from.
+ </para>
+ <para>
+ If you are using PHP from the command line (CLI), the extension loading error \
can be read + directly on screen.
+ </para>
+ <para>
+ If you are using PHP with a webserver, the location and format of the logs vary \
depending on + your software. Please read your webserver documentation to locate \
the logs, as it does not + have anything to do with PHP itself.
+ </para>
+ <para>
+ Common problems are the location of the DLL, the value of the "<link \
linkend="ini.extension-dir"> + extension_dir</link>" setting inside \
<literal>php.ini</literal> and compile-time setting mismatches. + </para>
+ <para>
+ If the problem lies in a compile-time setting mismatch, you probably didn't \
download the right DLL. + Try downloading again the extension with the right \
settings. Again, <function>phpinfo</function> + can be of great help.
+ </para>
+ </sect2>
+
</sect1>
<sect1 xml:id="install.pecl.pear">
http://cvs.php.net/viewvc.cgi/phpdoc/entities/global.ent?r1=1.339&r2=1.340&diff_format=u
Index: phpdoc/entities/global.ent
diff -u phpdoc/entities/global.ent:1.339 phpdoc/entities/global.ent:1.340
--- phpdoc/entities/global.ent:1.339 Sun Aug 24 06:12:39 2008
+++ phpdoc/entities/global.ent Sun Aug 31 00:58:16 2008
@@ -1,6 +1,6 @@
<!-- -*- SGML -*-
- $Id: global.ent,v 1.339 2008/08/24 06:12:39 kalle Exp $
+ $Id: global.ent,v 1.340 2008/08/31 00:58:16 kalle Exp $
Contains global "macros" for all the XML documents.
@@ -305,6 +305,7 @@
<!ENTITY url.pecl.get.win.php4.3 "http://snaps.php.net/win32/PECL_4_3/">
<!ENTITY url.pecl.get.win.php5.0 "http://snaps.php.net/win32/PECL_5_0/">
<!ENTITY url.pecl.package "http://pecl.php.net/package/">
+<!ENTITY url.pecl.submit "http://pecl.php.net/package-new.php">
<!-- linking to specific pecl packages is done like so: \
&url.pecl.package;package_name --> <!ENTITY url.pecl.package.get \
"http://pecl.php.net/get/"> <!-- download linking to specific pecl packages is done \
like so: &url.pecl.package.get;package_name -->
--
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic