Home | 簡體中文 | 繁體中文 | 雜文 | 打賞(Donations) | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 知乎專欄 | Search | Email

第 5 章 PECL :: The PHP Extension Community Library

目錄

5.1. pecl 命令
5.1.1. version
5.1.2. list
5.1.2.1. 查看已經安裝的擴展
5.1.2.2. 列出擴展檔案列表
5.1.3. install
5.1.4. search
5.2. php-apc - APC (Alternative PHP Cache) module for PHP 5
5.2.1. 編譯安裝 APC Cache
5.3. php5-gd - GD module for php5
5.4. Database Extensions
5.4.1. sqlite
5.4.2. mysqli
5.4.3. MongoDB
5.4.3.1. 安裝
5.4.3.2. GridFS
5.4.4. PHP Memcache
5.4.4.1. pecl
5.4.4.2. memcached
5.4.4.3. apt-get
5.4.4.4. example
5.4.5. php-redis.x86_64 : Extension for communicating with the Redis key-value store
5.4.5.1. pecl 安裝
5.4.5.2. yum安裝
5.4.5.3. 源碼編譯安裝
5.4.5.4. 配置 redis.ini
5.4.5.5. Session 配置
5.4.6. php5-pgsql - PostgreSQL module for php5
5.4.7. PHP connect SQL Server under unix like
5.4.8. MySQL
5.4.9. oracle
5.5. xmlrpc
5.6. openssl
5.7. mcrypt
5.8. mhash
5.9. simplexml
5.10. ionCube
5.11. ZendOptimizer
5.12. zip
5.13. pcntl
5.13.1.
5.14. pthreads
5.14.1. pecl/pthreads requires PHP (version >= 7.0.0RC5), installed version is 5.6.16
5.14.2. Thread
5.14.3. Pool
5.14.4. FAQ
5.14.4.1. You cannot serialize or unserialize PDO instances
5.14.5. 互斥鎖
5.14.6. FAQ
5.14.6.1. configure: error: pthreads requires ZTS, please re-compile PHP with ZTS enabled
5.14.6.2. pecl/pthreads requires PHP (version >= 7.0.0RC2), installed version is 5.6.13
5.14.6.3. Class 'Stackable' not found in /path/to/file.php
5.15. libevent
5.15.1. event_base_loop
5.15.2.
5.16. mbstring
5.17. Suhosin
5.18. freetype
5.19. XCache
5.19.1. apt-get
5.19.2. make
5.20. XHProf
5.20.1. XHGui
5.21. Xdebug
5.21.1. Webgrind
5.21.2. WinCacheGrind
5.22. UploadProgress
5.23. msgpack
5.24. iconv
5.25. imagick
5.26. sysvmsg
5.27. exif
5.28. Lua for PHP extension
5.29. libuv php extension
5.30. AMQP
5.30.1. 安裝 AMQP
5.30.2. Recv
5.30.3. Send
5.31. ZeroMQ
5.32. Stomp client extension
5.33. Phalcon - High performance PHP framework
5.34. PECL FAQ
5.34.1. Cannot install, php_dir for channel "pecl.php.net" is not writeable by the current user

http://pecl.php.net/

5.1. pecl 命令

5.1.1. version

# pecl help version
PEAR Version: 1.10.1
PHP Version: 5.6.16
Zend Engine Version: 2.6.0
Running on: Linux iZ62u09t59qZ 3.10.0-229.11.1.el7.x86_64 #1 SMP Thu Aug 6 01:06:18 UTC 2015 x86_64			
			

查看模組版本

# php -dextension=pthreads.so --ri pthreads | grep Version
Version => 2.0.10			
			

5.1.2. list

5.1.2.1. 查看已經安裝的擴展

列出已經安裝的擴展

# pecl list
Installed packages, channel pecl.php.net:
=========================================
Package  Version State
pthreads 2.0.10  stable
				

5.1.2.2. 列出擴展檔案列表

# pecl list pthreads
Installed Files For pthreads
============================
Type Install Path
doc  /srv/php-5.6.16/lib/php/doc/pthreads/examples/Benchmark.php
doc  /srv/php-5.6.16/lib/php/doc/pthreads/examples/CallAnyFunction.php
doc  /srv/php-5.6.16/lib/php/doc/pthreads/examples/Fetch.php
doc  /srv/php-5.6.16/lib/php/doc/pthreads/examples/KeepAliveSession.php
doc  /srv/php-5.6.16/lib/php/doc/pthreads/examples/Mutexes.php
doc  /srv/php-5.6.16/lib/php/doc/pthreads/examples/MySQLi.php
doc  /srv/php-5.6.16/lib/php/doc/pthreads/examples/NewSynchronization.php
doc  /srv/php-5.6.16/lib/php/doc/pthreads/examples/Notifications.php
doc  /srv/php-5.6.16/lib/php/doc/pthreads/examples/ObjectsAsParameters.php
doc  /srv/php-5.6.16/lib/php/doc/pthreads/examples/Objects.php
doc  /srv/php-5.6.16/lib/php/doc/pthreads/examples/Pooling.php
doc  /srv/php-5.6.16/lib/php/doc/pthreads/examples/Scope.php
doc  /srv/php-5.6.16/lib/php/doc/pthreads/examples/SelectiveInheritance.php
doc  /srv/php-5.6.16/lib/php/doc/pthreads/examples/SharingResources.php
doc  /srv/php-5.6.16/lib/php/doc/pthreads/examples/SimpleWebRequest.php
doc  /srv/php-5.6.16/lib/php/doc/pthreads/examples/Singleton.php
doc  /srv/php-5.6.16/lib/php/doc/pthreads/examples/SocketServer.php
doc  /srv/php-5.6.16/lib/php/doc/pthreads/examples/SQLWorker.php
doc  /srv/php-5.6.16/lib/php/doc/pthreads/examples/StackableArray.php
doc  /srv/php-5.6.16/lib/php/doc/pthreads/examples/Stacking.php
doc  /srv/php-5.6.16/lib/php/doc/pthreads/examples/stub.php
test /srv/php-5.6.16/lib/php/test/pthreads/tests/binding.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/callstatic-etc.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/chunk.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/class-defaults.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/closures-as-members.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/complex-statics.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/complex-statics-set-null.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/conditions.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/constants.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/corrupted-resources.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/counting-members.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/detach.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/doc-comments.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/exception-handler.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/foreign-private-members.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/functions.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/global-constants.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/globals.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/global-voodoo.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/gone.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/graceful-fatalities.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/included-files.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/includeme.inc
test /srv/php-5.6.16/lib/php/test/pthreads/tests/ini.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/interface.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/interfaces.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/isset-empty-compat.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/isset-unset.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/killed-info.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/legacy-ctor.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/merging-members.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/merging-range.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/mutex.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/norefs.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/normalize-members.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/normal-reads.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/null-member-crash.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/oomethods.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/objects-from-closures.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/pools-default.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/pools.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/runtime-inheritance.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/selective-inheritance.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/shift-pop.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/shutdown-handler.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/stack-by-reference-pass.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/stack-by-reference.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/stateful-fatalities.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/staticmethods.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/static-resolution.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/statics.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/statics-thorn-in-other-side.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/synchronization.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/thorn-in-side.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/thread.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/trait-aliases.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/unset-defaults.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/waiting-timeouts.phpt
test /srv/php-5.6.16/lib/php/test/pthreads/tests/wait.phpt
doc  /srv/php-5.6.16/lib/php/doc/pthreads/LICENSE
doc  /srv/php-5.6.16/lib/php/doc/pthreads/README.md
src  /srv/php-5.6.16/lib/php/extensions/no-debug-zts-20131226/pthreads.so

				

5.1.3. install

安裝擴展

# pecl install pthreads			
			

5.1.4. search

# pecl search amqp
Retrieving data...0%
Matched packages, channel pecl.php.net:
=======================================
Package Stable/(Latest) Local
amqp    1.6.1 (stable)        Communicate with any AMQP compliant server