?? install.txt
字號:
* Enable the extension(s) in php.ini you want to use by uncommenting
the extension=php_*.dll lines in php.ini. This is done by deleting
the leading ; from the extension you want to load.
Example 2-8. Enable Bzip2 extension for PHP-Windows
// change the following line from ...
;extension=php_bz2.dll
// ... to
extension=php_bz2.dll
* Some of the extensions need extra DLLs to work. Couple of them can
be found in the distribution package, in the C:\php\dlls\ folder
in PHP 4 or in the main folder in PHP 5, but some, for example
Oracle (php_oci8.dll) require DLLs which are not bundled with the
distribution package. If you are installing PHP 4, copy the
bundled DLLs from C:\php\dlls folder to the main C:\php folder.
Don't forget to include C:\php in the system PATH (this process is
explained in a separate FAQ entry).
* Some of these DLLs are not bundled with the PHP distribution. See
each extensions documentation page for details. Also, read the
manual section titled Installation of PECL extensions for details
on PECL. An increasingly large number of PHP extensions are found
in PECL, and these extensions require a separate download.
Note: If you are running a server module version of PHP remember to
restart your webserver to reflect your changes to php.ini.
The following table describes some of the extensions available and
required additional dlls.
Table 2-1. PHP Extensions
Extension Description Notes
php_bz2.dll bzip2 compression functions None
php_calendar.dll Calendar conversion functions Built in since PHP
4.0.3
php_cpdf.dll ClibPDF functions None
php_crack.dll Crack functions None
php_ctype.dll ctype family functions Built in since PHP 4.3.0
php_curl.dll CURL, Client URL library functions Requires:
libeay32.dll, ssleay32.dll (bundled)
php_cybercash.dll Cybercash payment functions PHP <= 4.2.0
php_db.dll DBM functions Deprecated. Use DBA instead (php_dba.dll)
php_dba.dll DBA: DataBase (dbm-style) Abstraction layer functions None
php_dbase.dll dBase functions None
php_dbx.dll dbx functions
php_domxml.dll DOM XML functions PHP <= 4.2.0 requires: libxml2.dll
(bundled) PHP >= 4.3.0 requires: iconv.dll (bundled)
php_dotnet.dll .NET functions PHP <= 4.1.1
php_exif.dll EXIF functions php_mbstring.dll. And, php_exif.dll must
be loaded after php_mbstring.dll in php.ini.
php_fbsql.dll FrontBase functions PHP <= 4.2.0
php_fdf.dll FDF: Forms Data Format functions. Requires: fdftk.dll
(bundled)
php_filepro.dll filePro functions Read-only access
php_ftp.dll FTP functions Built-in since PHP 4.0.3
php_gd.dll GD library image functions Removed in PHP 4.3.2. Also note
that truecolor functions are not available in GD1, instead, use
php_gd2.dll.
php_gd2.dll GD library image functions GD2
php_gettext.dll Gettext functions PHP <= 4.2.0 requires
gnu_gettext.dll (bundled), PHP >= 4.2.3 requires libintl-1.dll,
iconv.dll (bundled).
php_hyperwave.dll HyperWave functions None
php_iconv.dll ICONV characterset conversion Requires: iconv-1.3.dll
(bundled), PHP >=4.2.1 iconv.dll
php_ifx.dll Informix functions Requires: Informix libraries
php_iisfunc.dll IIS management functions None
php_imap.dll IMAP POP3 and NNTP functions None
php_ingres.dll Ingres II functions Requires: Ingres II libraries
php_interbase.dll InterBase functions Requires: gds32.dll (bundled)
php_java.dll Java functions PHP <= 4.0.6 requires: jvm.dll (bundled)
php_ldap.dll LDAP functions PHP <= 4.2.0 requires libsasl.dll
(bundled), PHP >= 4.3.0 requires libeay32.dll, ssleay32.dll (bundled)
php_mbstring.dll Multi-Byte String functions None
php_mcrypt.dll Mcrypt Encryption functions Requires: libmcrypt.dll
php_mhash.dll Mhash functions PHP >= 4.3.0 requires: libmhash.dll
(bundled)
php_mime_magic.dll Mimetype functions Requires: magic.mime (bundled)
php_ming.dll Ming functions for Flash None
php_msql.dll mSQL functions Requires: msql.dll (bundled)
php_mssql.dll MSSQL functions Requires: ntwdblib.dll (bundled)
php_mysql.dll MySQL functions PHP >= 5.0.0, requires libmysql.dll
(bundled)
php_mysqli.dll MySQLi functions PHP >= 5.0.0, requires libmysql.dll
(libmysqli.dll in PHP <= 5.0.2) (bundled)
php_oci8.dll Oracle 8 functions Requires: Oracle 8.1+ client libraries
php_openssl.dll OpenSSL functions Requires: libeay32.dll (bundled)
php_oracle.dll Oracle functions Requires: Oracle 7 client libraries
php_overload.dll Object overloading functions Built in since PHP 4.3.0
php_pdf.dll PDF functions None
php_pgsql.dll PostgreSQL functions None
php_printer.dll Printer functions None
php_shmop.dll Shared Memory functions None
php_snmp.dll SNMP get and walk functions NT only!
php_soap.dll SOAP functions PHP >= 5.0.0
php_sockets.dll Socket functions None
php_sybase_ct.dll Sybase functions Requires: Sybase client libraries
php_tidy.dll Tidy functions PHP >= 5.0.0
php_tokenizer.dll Tokenizer functions Built in since PHP 4.3.0
php_w32api.dll W32api functions None
php_xmlrpc.dll XML-RPC functions PHP >= 4.2.1 requires: iconv.dll
(bundled)
php_xslt.dll XSLT functions PHP <= 4.2.0 requires sablot.dll,
expat.dll (bundled). PHP >= 4.2.1 requires sablot.dll, expat.dll,
iconv.dll (bundled).
php_yaz.dll YAZ functions Requires: yaz.dll (bundled)
php_zip.dll Zip File functions Read only access
php_zlib.dll ZLib compression functions Built in since PHP 4.3.0
_________________________________________________________________
Chapter 3. Installation of PECL extensions
Introduction to PECL Installations
PECL is a repository of PHP extensions that are made available to you
via the PEAR packaging system. This section of the manual is intended
to demonstrate how to obtain and install PECL extensions.
These instructions assume /your/phpsrcdir/ is the path to the PHP
source distribution, and that extname is the name of the PECL
extension. Adjust accordingly. These instructions also assume a
familiarity with the pear command.
To be useful, a shared extension must be built, installed, and loaded.
The methods described below provide you with various instructions on
how to build and install the extensions, but they do not automatically
load them. Extensions can be loaded by adding an extension directive.
To this php.ini file, or through the use of the dl() function.
When building PHP modules, it's important to have known-good versions
of the required tools (autoconf, automake, libtool, etc.) See the
Anonymous CVS Instructions for details on the required tools, and
required versions.
_________________________________________________________________
Downloading PECL extensions
There are several options for downloading PECL extensions, such as:
* http://pecl.php.net
The PECL web site contains information about the different
extensions that are offered by the PHP Development Team. The
information available here includes: ChangeLog, release notes,
requirements and other similar details.
* pear download extname
PECL extensions that have releases listed on the PECL web site are
available for download and installation using the pear command.
Specific revisions may also be specified.
* CVS
Most PECL extensions also reside in CVS. A web-based view may be
seen at http://cvs.php.net/pecl/. To download straight from CVS,
the following sequence of commands may be used. Note that phpfi is
the password for user cvsread:
$ cvs -d:pserver:cvsread@cvs.php.net:/repository login
$ cvs -d:pserver:cvsread@cvs.php.net:/repository co pecl/extname
* Windows downloads
Windows users may find compiled PECL binaries by downloading the
Collection of PECL modules from the PHP Downloads page, and by
retrieving a PECL Snapshot. To compile PHP under Windows, read the
Win32 Build README.
_________________________________________________________________
PECL for Windows users
As with any other PHP extension DLL, installation is as simple as
copying the PECL extension DLLs into the extension_dir folder and
loading them from php.ini. For example, add the following line to your
php.ini:
extension=php_extname.dll
After doing this, restart the web server.
_________________________________________________________________
Compiling shared PECL extensions with PEAR
PEAR makes it easy to create shared PHP extensions. Using the pear
command, do the following:
$ pear install extname
This will download the source for extname, compile, and install
extname.so into your extension_dir. extname.so may then be loaded via
php.ini
By default, the pear command will not install packages that are marked
with the alpha or beta state. If no stable packages are available, you
may install a beta package using the following command:
$ pear install extname-beta
You may also install a specific version using this variant:
$ pear install extname-0.1
_________________________________________________________________
Compiling shared PECL extensions with phpize
Sometimes, using the pear installer is not an option. This could be
because you're behind a firewall, or it could be because the extension
you want to install is not available as a PEAR compatible package,
such as unreleased extensions from CVS. If you need to build such an
extension, you can use the lower-level build tools to perform the
build manually.
The phpize command is used to prepare the build environment for a PHP
extension. In the following sample, the sources for an extension are
in a directory named extname:
$ cd extname
$ phpize
$ ./configure
$ make
# make install
A successful install will have created extname.so and put it into the
PHP extensions directory. You'll need to and adjust php.ini and add an
extension=extname.so line before you can use the extension.
_________________________________________________________________
Compiling PECL extensions statically into PHP
You might find that you need to build a PECL extension statically into
your PHP binary. To do this, you'll need to place the extension source
under the php-src/ext/ directory and tell the PHP build system to
regenerate its configure script.
$ cd /your/phpsrcdir/ext
$ pear download extname
$ gzip -d < extname.tgz | tar -xvf -
$ mv extname-x.x.x extname
This will result in the following directory:
/your/phpsrcdir/ext/extname
From here, force PHP to rebuild the configure script, and then build
PHP as normal:
$ cd /your/phpsrcdir
$ rm configure
$ ./buildconf --force
$ ./configure --help
$ ./configure --with-extname --enable-someotherext --with-foobar
$ make
$ make install
Note: To run the 'buildconf' script you need autoconf 2.13 and
automake 1.4+ (newer versions of autoconf may work, but are not
supported).
Whether --enable-extname or --with-extname is used depends on the
extension. Typically an extension that does not require external
libraries uses --enable. To be sure, run the following after
buildconf:
$ ./configure --help | grep extname
_________________________________________________________________
Chapter 4. Problems?
Read the FAQ
Some problems are more common than others. The most common ones are
listed in the PHP FAQ, part of this manual.
_________________________________________________________________
Other problems
If you are still stuck, someone on the PHP installation mailing list
may be able to help you. You should check out the archive first, in
case someone already answered someone else who had the same problem as
you. The archives are available from the support page on
http://www.php.net/support.php. To subscribe to the PHP installation
mailing list, send an empty mail to
php-install-subscribe@lists.php.net. The mailing list address is
php-install@lists.php.net.
If you want to get help on the mailing list, please try to be precise
and give the necessary details about your environment (which operating
system, what PHP version, what web server, if you are running PHP as
CGI or a server module, safe mode, etc...), and preferably enough code
to make others able to reproduce and test your problem.
_________________________________________________________________
Bug reports
If you think you have found a bug in PHP, please report it. The PHP
developers probably don't know about it, and unless you report it,
chances are it won't be fixed. You can report bugs using the
bug-tracking system at http://bugs.php.net/. Please do not send bug
reports in mailing list or personal letters. The bug system is also
suitable to submit feature requests.
Read the How to report a bug document before submitting any bug
reports!
____
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -