WordPress除錯 – MailPoet Error: MailPoet requires a ZIP PHP extension. Please read our instructions on how to resolve this issue.

在使用 MailPoet 3 時會顯示這個錯誤訊息:

MailPoet Error: MailPoet requires a ZIP PHP extension. Please read our instructions on how to resolve this issue.

 

MailPoet 3 官方說明:


PHP Extensions

MailPoet 3 requires the following PHP extensions to be installed and loaded on your web server:  PDO, PDO_MYSQL, XML and ZIP.

The PHP Data Objects (PDO) extension defines a lightweight, consistent interface for accessing databases in PHP. While the main PDO extensions is usually installed/loaded by default in PHP 5.3 and newer versions, the specific module for the MySQL database (used by WordPress) may be missing or not loaded on your host. Please refer to the official PHP PDO installation guide or contact your hosting provider’s technical support for instructions on how to install and load the PDO_MYSQL extension.

The eXtensible Markup Language (XML) extension is required to parse HTML documents and encode/decode UTF-8 character set. Please refer to the official PHP XML installation guide or contact your hosting provider’s technical support for instructions on how to install and load the XML extension.

The ZIP extension is required to create compressed (.ZIP) archives. Please refer to the official PHP ZIP installation guide or contact your hosting provider’s technical support for instructions on how to install and load the ZIP extension.

 


解法:

 

When upgrading to PHP 7, you should make sure to install the PHP 7 versions of you libraries as well. The PPA providing PHP 7 also provides a php7.0-zip package. You can install it with:

  • sudo apt-get install php7.0-zip

To see additional PHP 7 libraries that are available, run:

  • sudo apt-cache search php7.0-*

sudo apt-get install php7.0-gd

下完上面的指令,再重新 php 和 apache2 就不會看到Error Message.

重啟 PHP 的方法:
https://stackoverflow.max-everyday.com/2017/04/wordpress-how-to-enable-the-gd-image-library-for-thumbnail/


libapache2-mod-php7.0 – server-side, HTML-embedded scripting language (Apache 2 module)

php-all-dev – package depending on all supported PHP development packages

php7.0 – server-side, HTML-embedded scripting language (metapackage)

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-dev – Files for PHP7.0 module development

php7.0-gd – GD module for PHP

php7.0-gmp – GMP module for PHP

php7.0-json – JSON module for PHP

php7.0-ldap – LDAP module 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-pspell – pspell module for PHP

php7.0-readline – readline module for PHP

php7.0-recode – recode module for PHP

php7.0-snmp – SNMP module for PHP

php7.0-sqlite3 – SQLite3 module for PHP

php7.0-tidy – tidy module for PHP

php7.0-xml – DOM, SimpleXML, WDDX, XML, and XSL module for PHP

php7.0-xmlrpc – XMLRPC-EPI module for PHP

libphp7.0-embed – HTML-embedded scripting language (Embedded SAPI library)

php7.0-bcmath – Bcmath module for PHP

php7.0-bz2 – bzip2 module for PHP

php7.0-enchant – Enchant module for PHP

php7.0-fpm – server-side, HTML-embedded scripting language (FPM-CGI binary)

php7.0-imap – IMAP module for PHP

php7.0-interbase – Interbase module for PHP

php7.0-intl – Internationalisation module for PHP

php7.0-mbstring – MBSTRING module for PHP

php7.0-mcrypt – libmcrypt module for PHP

php7.0-phpdbg – server-side, HTML-embedded scripting language (PHPDBG binary)

php7.0-soap – SOAP module for PHP

php7.0-sybase – Sybase module for PHP

php7.0-xsl – XSL module for PHP (dummy)

php7.0-zip – Zip module for PHP

php7.0-dba – DBA module for PHP

 


相關文章:

Guide to create your own MailPoet theme
http://docs.mailpoet.com/article/77-guide-to-creating-your-own-mailpoet-theme

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *