WP需要和/或使用哪些PHP扩展和库?
-
-
您是否知道您的网站(https://queryposts.com/)上存在SSL错误?Do you aware that there is a SSL error on your site(https://queryposts.com/) ?
- 0
- 2018-07-19
- I am the Most Stupid Person
-
@IamtheMostStupidPerson谢谢您,由于某些原因自动证书更新失败了,应该立即修复.@IamtheMostStupidPerson thank you, automated certificate renewal had failed there for some reason, should be fixed now.
- 0
- 2018-07-19
- Rarst
-
不用担心,这就是加密.不是吗我以为它会自动续订...如果您的情况不能自动续订,我们该怎么办?No worries, It is Let's Encrypt. isn't? I thought it automatically renew... In case if it isn't automatically renew as your case, what can we do?
- 0
- 2018-07-19
- I am the Most Stupid Person
-
@IamtheMostStupidPerson托管支持已将其重置(它是通过它们的集成设置的),通常它会自动为我续订.@IamtheMostStupidPerson hosting support had reset it (it was set up through their integration), it does normally renew automatically for me.
- 0
- 2018-07-19
- Rarst
-
很难找到,但是有官方建议:https://make.wordpress.org/hosting/handbook/handbook/server-environment/#php-extensionsExtremely hard to find, but there is an official recommendation: https://make.wordpress.org/hosting/handbook/handbook/server-environment/#php-extensions
- 0
- 2018-11-06
- aidanh010
-
10 个回答
- 投票数
-
- 2012-02-13
我对此进行了更多的思考,并根据WP代码库的大小(包括捆绑的库),手动编译此类列表(并在每个新版本中都重复使用-meh)似乎不太现实.
我查找了适当的静态代码分析工具- PHP_CompatInfo ,并在对内核使用的扩展的报告进行了一些修补之后(版本扫描为3.3.1):
-
- HTTP API(类
WP_Http_curl
) -
url_is_accessable_via_ssl()
-
SimplePie(被类WP_SimplePie_File
覆盖) -
GoogleSpell(来自TinyMCE软件包,是否未使用?)
- HTTP API(类
-
日期/时间-367次使用
-
-
iis7_rewrite_rule_exists()
-
iis7_delete_rewrite_rule()
-
iis7_add_rewrite_rule()
-
saveDomDocument()
-
-
POSIX正则表达式-23种用法
-
过滤器-2种用法
- class
PHPMailer-> ValidateAddress()
(可选)
- class
-
FTP -72种用法
- class
ftp_base
- class
ftp
(pure 和 sockets 版本) - 类
WP_Filesystem_FTPext
- 类
WP_Filesystem_ftpsockets
- class
-
GD -56种用法
-
wp-admin \includes \image-edit.php
-
wp-admin \includes \image.php
-
wp-includes \media.php
-
-
哈希-6种用法
-
wp-includes \pluggable.php
多种用途(可选-wp-includes \ compat.php
中的后备)
-
-
图标-5种用法
- class
SimplePie
(可选) -
wp_check_invalid_utf8()
(可选) -
wp-mail.php
(可选)
- class
-
JSON -20种用法
- 可选,
wp-includes/compat.php
中的后备
- 可选,
-
libxml -4种用法
- class
WP_oEmbed-> _parse_xml()
(可选) - SimplePie
- class
-
多字节字符串-29种用法
-
wp-includes/compat.php
中的一些后备
-
-
MySQL -60种用法
- class
wpdb
-
类(被类SimplePie_Cache
WP_Feed_Cache
覆盖)
- class
-
OpenSSL -4种用法
- 类
PHPMailer
- 类
-
PCRE -743次使用
-
SimpleXML -1种用法
- class
WP_oEmbed
(似乎是可选的)
- class
-
套接字-64种用法
- class
ftp
(实现)
- class
-
SPL -3种用法
-
令牌生成器-3种用法
-
wp_doc_link_parse()
(可选)
-
-
XML解析器-89种用法
-
XMLReader -1次使用
- SimplePie(似乎是可选的)
-
Zlib -30种用法
I gave this some more thought and given size of WP code base (including bundled libraries) it doesn't seem very realistic to compile such list by hand (and repeat it for every new version - meh).
I looked up appropriate static code analysis tool - PHP_CompatInfo and after some tinkering generated following report of extensions used by core (version scanned 3.3.1):
cURL - 127 uses (requires libcurl)
- HTTP API (class
WP_Http_curl
) url_is_accessable_via_ssl()
SimplePie(overridden with classWP_SimplePie_File
)GoogleSpell(from TinyMCE package, is not used?)
- HTTP API (class
Date/Time - 367 uses
DOM - 6 uses (requires libxml)
iis7_rewrite_rule_exists()
iis7_delete_rewrite_rule()
iis7_add_rewrite_rule()
saveDomDocument()
POSIX Regex - 23 uses
Filter - 2 uses
- class
PHPMailer->ValidateAddress()
(optional)
- class
FTP - 72 uses
- class
ftp_base
- class
ftp
(pure and sockets versions) - class
WP_Filesystem_FTPext
- class
WP_Filesystem_ftpsockets
- class
GD - 56 uses
wp-admin\includes\image-edit.php
wp-admin\includes\image.php
wp-includes\media.php
Hash - 6 uses
wp-includes\pluggable.php
multiple uses (optional - fallback inwp-includes\compat.php
)
iconv - 5 uses
- class
SimplePie
(optional) wp_check_invalid_utf8()
(optional)wp-mail.php
(optional)
- class
JSON - 20 uses
- optional, fallbacks in
wp-includes/compat.php
- optional, fallbacks in
libxml - 4 uses
- class
WP_oEmbed->_parse_xml()
(optional) - SimplePie
- class
Multibyte String - 29 uses
- some fallback in
wp-includes/compat.php
- some fallback in
MySQL - 60 uses
- class
wpdb
class(overridden with classSimplePie_Cache
WP_Feed_Cache
)
- class
OpenSSL - 4 uses
- class
PHPMailer
- class
PCRE - 743 uses
SimpleXML - 1 uses
- class
WP_oEmbed
(seems optional)
- class
Sockets - 64 uses
- class
ftp
(sockets
implementation)
- class
SPL - 3 uses
Tokenizer - 3 uses
wp_doc_link_parse()
(optional)
XML Parser - 89 uses
XMLReader - 1 uses
- SimplePie (seems optional)
Zlib - 30 uses
-
巨大的资源.幸运的是,上面的大多数扩展和库现在默认情况下都是使用PHP 5.2.4及更高版本编译的.Great resource. Luckily most of the extensions and libraries above are now compiled by default with PHP 5.2.4 and above.
- 4
- 2012-02-18
- Chris_O
-
@Chris_O,只要遵循默认值...核心团队多次说过,野外有一些weeeeird PHP配置.我自己提出这个问题的原因是,VPS是在工作时从新的托管服务提供商处购买的,出乎意料的是它的配置非常少,缺少一些典型的扩展.使用扩展名的这种检查列表提供支持,然后发现并要求它们一个接一个地安装,会更加方便.@Chris_O as long as default is followed... It's been said several times by core team that there are some weeeeird PHP configurations out there in the wild. What prompted this question from myself is that VPS was purchased at work from new hosting provider and unexpectedly it had very minimal configuration with some typical extensions missing. It would be more convenient to provide support with such check list of extensions, then discover and ask them to be installed one by one.
- 0
- 2012-02-18
- Rarst
-
哪个库用于解压缩主题和插件?Which lib is used to unzip themes and plugins?
- 0
- 2016-11-24
- jgraup
-
@jgraup ZipArchive或PclZip请参阅相关的解压缩功能http://queryposts.com/?s=unzip_file@jgraup ZipArchive or PclZip see related unzip functions http://queryposts.com/?s=unzip_file
- 1
- 2016-11-24
- Rarst
-
你永远不会停止让我惊奇@Rarst ;-)You never cease to amaze me @Rarst ;-)
- 0
- 2016-11-24
- jgraup
-
使用v4.7和新的本机PDF缩略图/预览,您的服务器需要Imagick,ImageMagick和Ghostscript支持.With v4.7 and the new native PDF thumbnail/preview your server needs Imagick, ImageMagick, and Ghostscript support.
- 1
- 2017-03-03
- j08691
-
缺少** ORACLE **扩展名和其他数据库...Missing **ORACLE** extension and other databases...
- 0
- 2017-03-24
- Please_Dont_Bully_Me_SO_Lords
-
@EASI嗯?WordPress除了MySQL之外对其他任何功能均不提供本地支持.@EASI hm? WordPress has no native support for anything but MySQL.
- 0
- 2017-03-24
- Rarst
-
值得一提的是,那些库"可能会被内核使用",但这取决于特定的配置和执行路径.例如,如果您使用wp-cli进行核心和插件更新,则不太可能使用FTP.it is probably worth mentioning that those libraries **might be used** by core, but it depends on specific configurations and execution paths. for example FTP is unlikely to be used if you use wp-cli to make core and plugin updates.
- 0
- 2017-12-07
- Mark Kaplun
-
- 2012-02-13
这个问题的答案可能很复杂而且很长,据我所知,服务器与服务器之间也存在一些差异.操作系统(IIS,Apache)..我不能说以下列表是完整列表,但其中包括一些我所知道的必需列表:
-
Curl和CurlSSL –不确定是否必需,但是如果可用,很多WordPress代码都将使用它. 但是,许多插件确实需要 require 和/或在没有它的情况下功能有限.
-
Exif –允许WordPress的媒体处理程序提取Exif数据 图片不足.
-
Gettext -.po .mo处理翻译本地化国际化..
-
FTP –用于通过FTP进行插件和WordPress升级.
-
GD –无需介绍,对吗?
-
图标 –从邮件到RSS解析的所有字符转换.
-
Mbregex和Mbstring –名称非常具有描述性-提供了在各处使用的功能:-)
-
Mcrypt – WordPress不需要,但是许多插件确实需要它.
-
Mime Magic –在wordpress中已弃用-但仍具有向后兼容性.
-
* Mysql和系统的Mysql * –我们都知道这是什么以及为什么需要它,不是吗?
-
Openssl –该库用于处理处理连接 用WordPress的SSL证书加密的SSL可能能够连接到任何SSL(https)加密的位置.
-
POSIX –用于确保WordPress正确维护文件权限和所有权.
-
路径信息检查 –一些永久链接设置.
-
Pspell – TinyMCE的拼写检查功能.
-
套接字 –在WordPress中管理FTP连接和邮件处理AKA SMTP和POP.
-
邮编 –不确定是否需要-但是,如果可用,wordpress将使用此跨平台兼容的zip文件创建和提取类.
-
Zlib –在许多情况下使用.示例-js和css文件压缩.同样,不确定是否需要但需要.
就像上面所说的-这绝不是完整列表-它是大约一年前编译的-可能需要更新.其中许多功能并非完全必需,而是建议.在许多情况下,如果可用,wordpress会使用功能,如果没有,则会忽略该任务. 一个很好的例子是缺少GD库,它不会停止wordpress的运行,但是不会裁剪,调整大小或更改上传的图像-因此将原始图像(并在"插入"中保留" size"选项为灰色)图片发布"功能..
作为旁注-我也要说,也许这个问题在serverfault.com上比在这里可能会得到更多正确/更新的答案...
The answer for this might be complicated and very long, as far as I know, there will also be some differences between servers & OS (IIS, Apache).. I can not say that the following list is a FULL list, but it includes some of those I know that are required :
Curl and CurlSSL – Not sure it is REQUIRED but but much of the WordPress code will use it if it is available. Many plugins however DO require it and/or will have limited functions without it.
Exif – allows media handler of WordPress to pull Exif data out of images.
Gettext - .po .mo handling translation localization internationalization ..
FTP – used to do plugin and WordPress upgrades via FTP.
GD – No need introduction, right ?.
Iconv – character set conversions for everything from mail to RSS parsing.
Mbregex and Mbstring – the name is pretty descriptive - provide functions used all over the place :-)
Mcrypt – Not needed for wordpress, but many plugins do need it.
Mime Magic – Deprecated now in wordpress - but still good to have for back compatibility.
*Mysql and Mysql of the system *– we all know what this is and why it is needed, no ?
Openssl – This library is used to handle processing connections encrypted with SSL certificates for WordPress may to be able to connect to any SSL (https) encrypted location.
POSIX – used to ensure that WordPress properly maintains file permissions and ownerships .
Path Info Check – some permalink setups .
Pspell – spell checking capabilities to TinyMCE, .
Sockets – managing FTP connections and mail handling AKA SMTP and POP in WordPress.
Zip – Not sure if REQUIRED - but this cross-platform compatible zip file creation and extraction class WILL be used by wordpress if available.
Zlib – Used in many cases . example - js and css files compression. again, not sure if REQUIRED but needed.
Like Above stated - this is by no means a FULL list - It was compiled about a year ago - and it might need some update . Many of those functions are not exactly REQUIRED but ADVISED. In many cases wordpress will use a function IF it is available, and if not , will ignore the task. A good example is the lack of GD library, it will not stop wordpress from functioning, but it will not crop, resize , or alter the uploaded images - thus leaving the original (and grey- out the "size" option in the "insert image to post" function)..
As a side note - I would also say that maybe this question will probably get more correct/updated answers on serverfault.com than here ...
-
为什么在Wordpress网站上找不到此地址?Why is this no where to be found on the Wordpress website?
- 0
- 2017-03-20
- Tadej
-
- 2013-02-10
(这并不是要提供答案.只是一些有用的信息.如果您认为此信息没有用,请告诉我,我将其删除.)
我认为用packages 进行交流对于新手来说会更容易,但是由于软件包因系统而异,因此很难涵盖所有软件包.
根据我对Debian(和基于Debian的发行版)的经验,我想分享以下特定信息:
- php5-cli
- php5-dev
- php5-fpm
- php5-cgi
- php5-mysql
- php5-xmlrpc
- php5-curl
- php5-gd
- php-apc(不是必需的,但推荐)
- php-pear
- php5-imap
- php5-mcrypt
- php5-pspell
上述软件包安装了其他答案中提到的所有扩展/库/模块; 全部,Mime Magic除外,它是 WordPress不再需要的.
确保您的服务器与WordPress 100%兼容的另一种好方法是检查托管主机公司预先安装了哪些软件包.由于他们在客户投诉不兼容方面具有多年的经验,因此他们会更好地了解.
对于Hostgator ,他们预先安装的PHP模块包括(您可能只需要most ,但不是全部):
Media Temple提供了一个
phpinfo();
一个>文件供您检查其配置.这对于比较也很有用.(This is not intended to be an answer. Just some useful information. If you think this info is not useful, let me know, I'll simply delete it.)
I think talking in terms of packages would be easier for newbies, but since packages vary from system to system, it's hard to cover all of them.
As I have experience with Debian (& Debian-based distros), I'd like to share this specific information:
- php5-cli
- php5-dev
- php5-fpm
- php5-cgi
- php5-mysql
- php5-xmlrpc
- php5-curl
- php5-gd
- php-apc (not required, but recommended)
- php-pear
- php5-imap
- php5-mcrypt
- php5-pspell
The aforementioned packages install all the extensions/libraries/modules mentioned in the other answers; all, except Mime Magic, which is no longer required by WordPress.
Another good way to make sure your server is 100% compatible with WordPress is to check what packages the managed hosting companies come pre-installed with. As they have years of experience with customer complaints about incompatibilities, they'll know better.
In case of Hostgator, the PHP modules they pre-install include (you'll probably only need most but not all of them):
Media Temple provides a
phpinfo();
file for you to check their config. It's useful for comparison purposes too.-
WP需要什么php5-cli,php5-dev,(php5-fpm &&php5-cgi),php5-pear,php5-imap和php5-pspell?您的方法似乎是仅安装所有内容,但效果不佳.如果您可以控制安装,就应该模仿共享托管环境.另外,您应该选择一种运行PHP的方式(FastCGI或CGI),但不能同时选择两种方式.What does WP need php5-cli, php5-dev, (php5-fpm && php5-cgi), php5-pear, php5-imap, and php5-pspell for? Your approach seems to be to just install everything and it is a poor one. As is the idea that you should mimic shared hosting environments if you have control over your install. Also, you should choose one way to run PHP (FastCGI or CGI) but not both.
-
除了版本(php5),这实际上是最好的答案..这个问题并没有说明"做什么",而只是说明了"哪个"模块.投票了!Besides the version (php5), this is actually the best answer here .. the question does not state 'what for', just 'which' modules. Voted up!
- 0
- 2018-12-19
- GerardJP
-
- 2018-01-18
如果您想要一种简单的方法来验证服务器是否满足这些要求,现在可以使用方便的 WP-CLIext命令这样做.
wp ext required
显示了运行WordPress的所有PHP扩展必要,而wp ext recommended
显示了可选个.wp ext check
是两个命令的组合.当您需要一种快速的方法来检查新服务器上的系统要求和/或想要以编程方式进一步处理此列表时,这些便会派上用场.
这是
wp ext required
的工作方式:$ wp ext required +-----------+-----------+ | extension | installed | +-----------+-----------+ | curl | 1 | | date | 1 | | dom | 1 | | filter | 1 | | ftp | 1 | | gd | 1 | | hash | 1 | | iconv | 1 | | json | 1 | | libxml | 1 | | mbstring | 1 | | mysqli | 1 | | openssl | 1 | | pcre | 1 | | posix | 1 | | SimpleXML | 1 | | sockets | 1 | | SPL | 1 | | tokenizer | 1 | | xml | 1 | | xmlreader | 1 | | zlib | 1 | +-----------+-----------+ Success: All required extensions are installed
If you want an easy way to verify if your server meets these requirements, there's now a handy WP-CLI ext command to do so.
wp ext required
shows all PHP extensions necessary to run WordPress, whilewp ext recommended
shows optional ones.wp ext check
is a combination of both commands.These come in handy when you need a quick way to check the system requirements on a new server and/or if you want to further process this list programmatically.
Here's how
wp ext required
works:$ wp ext required +-----------+-----------+ | extension | installed | +-----------+-----------+ | curl | 1 | | date | 1 | | dom | 1 | | filter | 1 | | ftp | 1 | | gd | 1 | | hash | 1 | | iconv | 1 | | json | 1 | | libxml | 1 | | mbstring | 1 | | mysqli | 1 | | openssl | 1 | | pcre | 1 | | posix | 1 | | SimpleXML | 1 | | sockets | 1 | | SPL | 1 | | tokenizer | 1 | | xml | 1 | | xmlreader | 1 | | zlib | 1 | +-----------+-----------+ Success: All required extensions are installed
-
- 2014-07-10
如果您使用的是Debian 7(Debian Wheezy),则需要安装PHP本身和少量扩展. @Rarst提到的大部分内容已经包含在Debian最基本的PHP安装之一中.
PHP
Debian Wheezy中有四个选项: libapache2-mod-php5 , libapache2-mod-php5filter ,php5-cgi ,或php5-fpm .我选择php5-fpm,但这完全取决于您希望Web服务器和PHP交互的方式.
MySQL
您还需要PHP才能使用MySQL.您的选择是php5-mysql 和php5-mysqlnd .php5-mysqlnd是本地的,通常更快.有些人可能会选择类似MariaDB的替代方案.
图形库 可选
如果要调整图像大小,可以安装php5-gd 或< a href=" https://packages.debian.org/wheezy/php5-imagick" rel="nofollow">php5-imagick .php5-imagick将为您提供更好的质量,如果可用,Wordpress将使用它.如果两个都安装,将使用php5-imagick.如果两者均未安装,则图像将不会调整大小(Wordpress也不会抱怨).
HTTP 可选
如果您安装php5-curl ,它将被使用,但并非必需除了可能会有更好的性能外,其他任何事情.
Wordpress和大多数扩展都不需要,尽管某些扩展可能有其他要求.
这是完整的基本安装线,可为Wordpress提供实现最佳性能所需的一切,而不是没有:
apt-get install php5-fpm php5-mysqlnd php5-imagick php5-curl
If you're using Debian 7 (Debian Wheezy), you need to install PHP itself and a small number of extensions. Most of what was mentioned by @Rarst is already included with one of Debian's most basic PHP installs.
PHP
You have four options in Debian Wheezy: libapache2-mod-php5, libapache2-mod-php5filter, php5-cgi, or php5-fpm. I choose php5-fpm but it all depends on how you want your web server and PHP to interact.
MySQL
You also need PHP to use MySQL. Your options are php5-mysql and php5-mysqlnd. php5-mysqlnd is native and generally faster. Some might choose an alternative like MariaDB.
Graphics Library Optional
If you want your images resized, you may install either php5-gd or php5-imagick. php5-imagick will give you better quality and Wordpress will use it if it's available. If both are installed, php5-imagick will be used. If neither is installed, images will not be resized (and Wordpress won't complain).
HTTP Optional
If you install php5-curl, it will be used but is not required for anything except perhaps better performance.
Nothing else is required by Wordpress and most extensions, though some extensions may have other requirements.
Here is the complete basic install line to give Wordpress everything it needs for optimal performance and nothing it doesn't:
apt-get install php5-fpm php5-mysqlnd php5-imagick php5-curl
-
- 2019-06-01
WordPress手册现在列出了推荐的PHP模块:
WordPress核心利用了PHP扩展.如果首选扩展名 缺少WordPress要么不得不做更多的工作来完成任务 该模块有助于或在最坏的情况下将其移除 功能.因此,下面列出的PHP扩展是 推荐.
- bcmath –用于提高数学计算的性能.
- curl –执行远程请求操作.
- exif –处理存储在图像中的元数据.
- filter –用于安全过滤用户输入.
- fileinfo –用于检测文件上传的模仿类型
- mod_xml –用于生成XML,例如用于XML网站地图.请注意,mod_xml是一个Apache模块,而不是PHP扩展,但已列出 提升意识.
- mysqli –连接到MySQL以进行数据库交互.
- libsodium –生成随机字节.
- openssl –允许与其他主机的基于SSL的连接.
- pcre –提高代码搜索中模式匹配的性能.
- imagick –为媒体上传提供更好的图像质量.看到WP_Image_Editor传入!有关详细信息.图像尺寸调整更智能(适用于 较小的图像)和PDF缩略图支持(如果还提供了Ghost脚本) 可用.
- xml –用于XML解析,例如从第三方站点.
它还将下列PHP扩展列为可选:
- gd –如果未安装Imagick,则GD图形库将用作功能有限的后备图像处理.
- mcrypt –当libsodium不可用时生成随机字节.
- xmlreader –用于XML解析.
- zlib – Gzip压缩和解压缩.
The WordPress handbook now lists the recommended PHP modules:
WordPress core makes use of PHP extensions. If the preferred extension is missing WordPress will either have to do more work to do the task the module helps with or, in the worst case, will remove functionality. Therefore the PHP extensions listed below are recommended.
- bcmath – Used to improve the performance of math calculations.
- curl – Performs remote request operations.
- exif – Works with metadata stored in images.
- filter – Used for securely filtering user input.
- fileinfo – Used to detect mimetype of file uploads
- mod_xml – Used for generating XML, such as for an XML sitemap. Note that mod_xml is an Apache module, not a PHP extension, but is listed for awareness.
- mysqli – Connects to MySQL for database interactions.
- libsodium – Generates random bytes.
- openssl – Permits SSL-based connections to other hosts.
- pcre – Increases performance of pattern matching in code searches.
- imagick – Provides better image quality for media uploads. See WP_Image_Editor is incoming! for details. Smarter image resizing (for smaller images) and PDF thumbnail support, when Ghost Script is also available.
- xml – Used for XML parsing, such as from a third-party site.
It also lists the following PHP extensions as being optional:
- gd – If Imagick isn’t installed, the GD Graphics Library is used as a functionally limited fallback for image manipulation.
- mcrypt – Generates random bytes when libsodium isn’t available.
- xmlreader – Used for XML parsing.
- zlib – Gzip compression and decompression.
-
呵呵,我想知道mod_xml与做什么无关,因为核心既不实现XML网站地图,也不绑定在特定Web服务器上运行.Huh, I wonder what does `mod_xml` has to do with anything since core neither implements XML sitemaps or tied to running on specific web server.
- 0
- 2019-06-02
- Rarst
-
- 2019-07-29
值得一提的是,自WordPress 5.2起,有一个内置功能可报告缺少的模块.在"工具">"站点健康"中找到它.
It's worth mentioning that since WordPress 5.2, there is a built in feature that reports on missing modules. Find it at Tools > Site Health.
-
- 2017-03-20
在Debian上安装PHPfor Wordpress时的一个小"备忘单":
0.添加dotdeb存储库
将这两行添加到您的
/etc/apt/sources.list
文件中:deb http://packages.dotdeb.org jessie all deb-src http://packages.dotdeb.org jessie all
添加GPG密钥:
wget https://www.dotdeb.org/dotdeb.gpg sudo apt-key add dotdeb.gpg
更新"包裹清单":
sudo apt-get update
1.安装PHP 7:
apt-get install php7.0-common libapache2-mod-php7.0 php7.0-cli
来源: http://php.net/manual/zh/install .unix.debian.php
2.模块列表,包含在"php7.0-common"包中:
/usr/lib/php/20151012/calendar.so /usr/lib/php/20151012/ctype.so /usr/lib/php/20151012/exif.so /usr/lib/php/20151012/fileinfo.so /usr/lib/php/20151012/ftp.so /usr/lib/php/20151012/gettext.so /usr/lib/php/20151012/iconv.so /usr/lib/php/20151012/pdo.so /usr/lib/php/20151012/phar.so /usr/lib/php/20151012/posix.so /usr/lib/php/20151012/shmop.so /usr/lib/php/20151012/sockets.so /usr/lib/php/20151012/sysvmsg.so /usr/lib/php/20151012/sysvsem.so /usr/lib/php/20151012/sysvshm.so /usr/lib/php/20151012/tokenizer.so
来源: https://packages.debian.org/sid/amd64/php7.0-common/filelist
3.要安装wordpress要求/推荐的其他模块:
apt-get install php7.0-curl php7.0-gd php7.0-mbstring php7.0-mcrypt php7.0-pspell php7.0-zip
来源: https://wordpress.stackexchange.com/a/42141/107878
4.我在debian上找不到以下内容:
Openssl Path Info Check Zlib
5. " apt-cache搜索php7"返回:
php7.0 - server-side, HTML-embedded scripting language (metapackage) php7.0-apcu - APC User Cache for PHP php7.0-apcu-bc - APCu Backwards Compatibility Module php7.0-bcmath - Bcmath module for PHP php7.0-bz2 - bzip2 module for PHP php7.0-cgi - server-side, HTML-embedded scripting language (CGI binary) php7.0-cli - command-line interpreter for the PHP scripting language php7.0-common - documentation, examples and common module for PHP php7.0-curl - CURL module for PHP php7.0-dba - DBA module for PHP php7.0-dbg - Debug symbols for PHP7.0 php7.0-dev - Files for PHP7.0 module development php7.0-enchant - Enchant module for PHP php7.0-fpm - server-side, HTML-embedded scripting language (FPM-CGI binary) php7.0-gd - GD module for PHP php7.0-geoip - GeoIP module for PHP php7.0-gmp - GMP module for PHP php7.0-igbinary - igbinary serializer for PHP php7.0-imagick - Provides a wrapper to the ImageMagick library php7.0-imap - IMAP module for PHP php7.0-interbase - Interbase module for PHP php7.0-intl - Internationalisation module for PHP php7.0-json - JSON module for PHP php7.0-ldap - LDAP module for PHP php7.0-mbstring - MBSTRING module for PHP php7.0-mcrypt - libmcrypt module for PHP php7.0-memcached - memcached extension module for PHP, uses libmemcached php7.0-mongodb - MongoDB driver for PHP php7.0-msgpack - MessagePack serializer for PHP php7.0-mysql - MySQL module for PHP php7.0-odbc - ODBC module for PHP php7.0-opcache - Zend OpCache module for PHP php7.0-pgsql - PostgreSQL module for PHP php7.0-phpdbg - server-side, HTML-embedded scripting language (PHPDBG binary) php7.0-pspell - pspell module for PHP php7.0-readline - readline module for PHP php7.0-recode - recode module for PHP php7.0-redis - PHP extension for interfacing with Redis php7.0-snmp - SNMP module for PHP php7.0-soap - SOAP module for PHP php7.0-sqlite3 - SQLite3 module for PHP php7.0-ssh2 - Bindings for the libssh2 library php7.0-sybase - Sybase module for PHP php7.0-tidy - tidy module for PHP php7.0-xdebug - Xdebug Module for PHP php7.0-xml - DOM, SimpleXML, WDDX, XML, and XSL module for PHP php7.0-xmlrpc - XMLRPC-EPI module for PHP php7.0-xsl - XSL module for PHP (dummy) php7.0-zip - Zip module for PHP
A small "cheatsheet" when installing PHP for Wordpress on Debian:
0. Add the dotdeb repository
Add these two lines to your
/etc/apt/sources.list
file:deb http://packages.dotdeb.org jessie all deb-src http://packages.dotdeb.org jessie all
Add the GPG key:
wget https://www.dotdeb.org/dotdeb.gpg sudo apt-key add dotdeb.gpg
Update the "package list":
sudo apt-get update
1. Install PHP 7:
apt-get install php7.0-common libapache2-mod-php7.0 php7.0-cli
Source: http://php.net/manual/en/install.unix.debian.php
2. List of modules, which are included in the "php7.0-common" package:
/usr/lib/php/20151012/calendar.so /usr/lib/php/20151012/ctype.so /usr/lib/php/20151012/exif.so /usr/lib/php/20151012/fileinfo.so /usr/lib/php/20151012/ftp.so /usr/lib/php/20151012/gettext.so /usr/lib/php/20151012/iconv.so /usr/lib/php/20151012/pdo.so /usr/lib/php/20151012/phar.so /usr/lib/php/20151012/posix.so /usr/lib/php/20151012/shmop.so /usr/lib/php/20151012/sockets.so /usr/lib/php/20151012/sysvmsg.so /usr/lib/php/20151012/sysvsem.so /usr/lib/php/20151012/sysvshm.so /usr/lib/php/20151012/tokenizer.so
Source: https://packages.debian.org/sid/amd64/php7.0-common/filelist
3. To install the additional modules which are required/recommended by wordpress:
apt-get install php7.0-curl php7.0-gd php7.0-mbstring php7.0-mcrypt php7.0-pspell php7.0-zip
Source: https://wordpress.stackexchange.com/a/42141/107878
4. I couldn't find the following on debian:
Openssl Path Info Check Zlib
5. "apt-cache search php7" returns:
php7.0 - server-side, HTML-embedded scripting language (metapackage) php7.0-apcu - APC User Cache for PHP php7.0-apcu-bc - APCu Backwards Compatibility Module php7.0-bcmath - Bcmath module for PHP php7.0-bz2 - bzip2 module for PHP php7.0-cgi - server-side, HTML-embedded scripting language (CGI binary) php7.0-cli - command-line interpreter for the PHP scripting language php7.0-common - documentation, examples and common module for PHP php7.0-curl - CURL module for PHP php7.0-dba - DBA module for PHP php7.0-dbg - Debug symbols for PHP7.0 php7.0-dev - Files for PHP7.0 module development php7.0-enchant - Enchant module for PHP php7.0-fpm - server-side, HTML-embedded scripting language (FPM-CGI binary) php7.0-gd - GD module for PHP php7.0-geoip - GeoIP module for PHP php7.0-gmp - GMP module for PHP php7.0-igbinary - igbinary serializer for PHP php7.0-imagick - Provides a wrapper to the ImageMagick library php7.0-imap - IMAP module for PHP php7.0-interbase - Interbase module for PHP php7.0-intl - Internationalisation module for PHP php7.0-json - JSON module for PHP php7.0-ldap - LDAP module for PHP php7.0-mbstring - MBSTRING module for PHP php7.0-mcrypt - libmcrypt module for PHP php7.0-memcached - memcached extension module for PHP, uses libmemcached php7.0-mongodb - MongoDB driver for PHP php7.0-msgpack - MessagePack serializer for PHP php7.0-mysql - MySQL module for PHP php7.0-odbc - ODBC module for PHP php7.0-opcache - Zend OpCache module for PHP php7.0-pgsql - PostgreSQL module for PHP php7.0-phpdbg - server-side, HTML-embedded scripting language (PHPDBG binary) php7.0-pspell - pspell module for PHP php7.0-readline - readline module for PHP php7.0-recode - recode module for PHP php7.0-redis - PHP extension for interfacing with Redis php7.0-snmp - SNMP module for PHP php7.0-soap - SOAP module for PHP php7.0-sqlite3 - SQLite3 module for PHP php7.0-ssh2 - Bindings for the libssh2 library php7.0-sybase - Sybase module for PHP php7.0-tidy - tidy module for PHP php7.0-xdebug - Xdebug Module for PHP php7.0-xml - DOM, SimpleXML, WDDX, XML, and XSL module for PHP php7.0-xmlrpc - XMLRPC-EPI module for PHP php7.0-xsl - XSL module for PHP (dummy) php7.0-zip - Zip module for PHP
-
- 2012-02-13
您需要mysqli,pdo和gd扩展名.有时是xml-rpc.
我已经使用mysqlnd本机扩展运行WP已有一段时间了,它非常简洁.内置了反射功能,因此,如果您想查看特定请求中数据库的运行状况,可以执行此操作.
zip是不需要扩展名的,大多数程序都调用系统zip可执行文件.
you need the mysqli, pdo, and gd extensions. and sometimes xml-rpc.
I've been running WP with the mysqlnd native extension for a while now, it's pretty neat. Has reflection stuff built in, so if you want to see what's going on with the db in that specific request, you can do it.
zip as an extension is not needed, most programs call the system zip executable.
-
WP不使用PDO层.可能有一些插件可以使您执行此操作,但是WP的数据库API仍来自PHP的远古时代.WP doesn't use the PDO layer. There are probably plugins that enable you to do this, but WP's database API is still from the ancient times of PHP...
- 2
- 2012-02-13
- onetrickpony
-
- 2020-02-06
WordPress.org 说从WP Core 5.3+开始,以及使用推荐版本的PHP(当前为PHP 7.2)时,仅需要以下PHP扩展:
curl -- Performs remote request operations. dom -- Used to validate Text Widget content and to automatically configuring IIS7+. exif -- Works with metadata stored in images. fileinfo -- Used to detect mimetype of file uploads. hash -- Used for hashing, including passwords and update packages. json -- Used for communications with other servers. mbstring -- Used to properly handle UTF8 text. mysqli -- Connects to MySQL for database interactions. libsodium -- Validates Signatures and provides securely random bytes. openssl -- Permits SSL-based connections to other hosts. pcre -- Increases performance of pattern matching in code searches. imagick -- Provides better image quality for media uploads. See WP_Image_Editor is incoming! for details. Smarter image resizing (for smaller images) and PDF thumbnail support, when Ghost Script is also available. xml -- Used for XML parsing, such as from a third-party site. zip -- Used for decompressing Plugins, Themes, and WordPress update packages.
...但是他们还建议以下可选扩展名:
filter -- Used for securely filtering user input. gd -- If Imagick isn’t installed, the GD Graphics Library is used as a functionally limited fallback for image manipulation. iconv -- Used to convert between character sets. mcrypt -- Generates random bytes when libsodium and /dev/urandom aren’t available. simplexml -- Used for XML parsing. xmlreader -- Used for XML parsing. zlib -- Gzip compression and decompression.
但是请记住,其中一些必需的(或可选的)扩展已经捆绑在其他PHP软件包中.例如,
dom
通常包含在xml
扩展名中.如果您使用的是Ubuntu等,其他文件,例如fileinfo
,可能已经作为所谓的php-common
软件包的一部分安装了.此外,还有一些其他扩展名,例如
bcmath
并不是WordPress正式要求或推荐的,但仍被许多流行的插件(如Yoast SEO)使用.您可以在LittleBizzy上关注我们的清单WordPress PHP扩展感兴趣.
Officially, WordPress.org says that only the following PHP extensions are required as of WP Core 5.3+ and when using the recommended version of PHP, which is currently PHP 7.2:
curl -- Performs remote request operations. dom -- Used to validate Text Widget content and to automatically configuring IIS7+. exif -- Works with metadata stored in images. fileinfo -- Used to detect mimetype of file uploads. hash -- Used for hashing, including passwords and update packages. json -- Used for communications with other servers. mbstring -- Used to properly handle UTF8 text. mysqli -- Connects to MySQL for database interactions. libsodium -- Validates Signatures and provides securely random bytes. openssl -- Permits SSL-based connections to other hosts. pcre -- Increases performance of pattern matching in code searches. imagick -- Provides better image quality for media uploads. See WP_Image_Editor is incoming! for details. Smarter image resizing (for smaller images) and PDF thumbnail support, when Ghost Script is also available. xml -- Used for XML parsing, such as from a third-party site. zip -- Used for decompressing Plugins, Themes, and WordPress update packages.
...but they also recommend the following optional extensions:
filter -- Used for securely filtering user input. gd -- If Imagick isn’t installed, the GD Graphics Library is used as a functionally limited fallback for image manipulation. iconv -- Used to convert between character sets. mcrypt -- Generates random bytes when libsodium and /dev/urandom aren’t available. simplexml -- Used for XML parsing. xmlreader -- Used for XML parsing. zlib -- Gzip compression and decompression.
Keep in mind, however, that some of these required (or optional) extensions are already bundled into other PHP packages. For example,
dom
is often included in thexml
extension. And others likefileinfo
are probably already installed as part of a so-calledphp-common
package if you are using Ubuntu, etc.In addition, there are a few other extensions such as
bcmath
that are not officially required or recommended by WordPress but are still used by many popular plugins, like Yoast SEO.You can follow our list of WordPress PHP extensions over at LittleBizzy if interested.
Codex 仅在服务器要求中提到了PHP版本,但是可以在广泛的范围内配置PHP,以排除/包括不同部分
什么是扩展/库:
WP完全需要工作吗? MySQL ... 特定功能是否需要- ? GD?...
- 对于特定功能的最佳操作是首选? cURL ...
- 是插件常用的吗?邮政编码...