Facebook Social Icon Twitter Social Icon YouTube Social Icon

php_mailparse.dll for PHP 5.3.x

From M.Eng. René Schwarz, Bremen/Merseburg
Jump to: navigation, search


Information icon.svg

Eine Version der Seite in Deutsch ist hier verfügbar: php_mailparse.dll für PHP 5.3.x

Information icon.svg

PHP does no longer provide builds created with Visual Studio C++ 6 (VC6). Since PHP 5.3.6 you need a version of php_mailparse.dll compiled with VC9. This version is available here.

I tried a long time to get a working binary version of the PECL extension (PECL: „PHP Extension Community Library“) mailparse for PHP 5.3.x in the Internet. As that failed, I tried to compile the searched *.dll file by myself. Unfortunately, the attempt took more time than planned. Therefore thanks to Иван Гущин, who compiled the php_mailparse.dll for PHP 5.3.x and wrote a documentation for the compilation in my order. The compiled php_mailparse.dll is published as public download.


Download and Installation of php_mailparse.dll for PHP 5.3.x

The resulting php_mailparse.dll, compiled in VC6 and against the actual PHP 5.3.5 source is publicly downloadable here. php_mailparse.dll can easily been setup as extension in PHP 5.3.x: Simply copy php_mailparse.dll to the subdirectory /ext of the PHP installation (e.g. C:\Program Files (x86)\PHP\ext) and activate the extension in the PHP config file (php.ini, usually found in the PHP installation directory, e.g. C:\Program Files (x86)\PHP). Up next there is an exemplary extract of a php.ini with activated mailparse extension:


;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;

; If you wish to have an extension loaded automatically, use the following
; syntax:
;
;   extension=modulename.extension
;
; For example, on Windows:
;
;   extension=msql.dll
;
; ... or under UNIX:
;
;   extension=msql.so
;
; ... or with a path:
;
;   extension=/path/to/extension/msql.so
;
; If you only provide the name of the extension, PHP will look for it in its
; default extension directory.
;
; Windows Extensions
; Note that ODBC support is built in, so no dll is needed for it.
; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
; extension folders as well as the separate PECL DLL download (PHP 5).
; Be sure to appropriately set the extension_dir directive.
;

extension=php_mbstring.dll
extension=php_bz2.dll
extension=php_curl.dll
;extension=php_dba.dll
extension=php_exif.dll
extension=php_fileinfo.dll
extension=php_gd2.dll
extension=php_gettext.dll
;extension=php_gmp.dll
;extension=php_intl.dll
extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
;extension=php_ming.dll
;extension=php_mssql.dll
extension=php_mysql.dll
extension=php_mysqli.dll
;extension=php_oci8.dll      ; Use with Oracle 10gR2 Instant Client
;extension=php_oci8_11g.dll  ; Use with Oracle 11g Instant Client
extension=php_openssl.dll
;extension=php_pdo_firebird.dll
;extension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
extension=php_pdo_pgsql.dll
;extension=php_pdo_sqlite.dll
extension=php_pgsql.dll
;extension=php_phar.dll
;extension=php_pspell.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
;extension=php_soap.dll
extension=php_sockets.dll
;extension=php_sqlite.dll
;extension=php_sqlite3.dll
;extension=php_sybase_ct.dll
extension=php_tidy.dll
extension=php_xmlrpc.dll
;extension=php_xsl.dll
;extension=php_zip.dll
extension=php_mailparse.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_mime_magic.dll


The extension is being activated in line 73.


Nuvola apps important.svg

mailparse requires the PECL extension mbstring (php_mbstring.dll) to be loaded before loading of php_mailparse.dll (see line 32)!


Background Story

I run on several Windows servers the e-mail ticket system Cerberus Helpdesk. This system uses mailparse to parse in- and outgoing e-mails. Until PHP version 5.2.x the neccessary php_mailparse.dll as binary for Windows systems could be found at the build page of the PHP developer Pierre Joye at this page.

Some time ago, the Windows builds have been discontinued; a long term planned buildbox for the PECL extensions for Windows systems hasn't been implemented until today. Therefore every single user has to care by his own to compile the corresponding extensions since PHP 5.3.x.

Unfortunately, even the manufacturer of the ticket system haven't been able to remedy until today. Since the missing binary of php_mailparse.dll has been a major blocker of an update to PHP 5.3.x a solution was needed.