Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've got a linux vps running CentOs 5.5 (cpanel/whm), I've installed MailParse via Module Installers section on whm, and it did install it, the end of setup log:

running: make INSTALL_ROOT="/root/tmp/pear-build-root/install-mailparse-2.1.5" install
Installing shared extensions:     /root/tmp/pear-build-root/install-mailparse-2.1.5/usr/lib/php/extensions/no-debug-non-zts-20090626/
running: find "/root/tmp/pear-build-root/install-mailparse-2.1.5" | xargs ls -dils
508718   4 drwxr-xr-x 3 root root   4096 Feb  6 21:08 /root/tmp/pear-build-root/install-mailparse-2.1.5
508745   4 drwxr-xr-x 3 root root   4096 Feb  6 21:08 /root/tmp/pear-build-root/install-mailparse-2.1.5/usr
508746   4 drwxr-xr-x 3 root root   4096 Feb  6 21:08 /root/tmp/pear-build-root/install-mailparse-2.1.5/usr/lib
508747   4 drwxr-xr-x 3 root root   4096 Feb  6 21:08 /root/tmp/pear-build-root/install-mailparse-2.1.5/usr/lib/php
508748   4 drwxr-xr-x 3 root root   4096 Feb  6 21:08 /root/tmp/pear-build-root/install-mailparse-2.1.5/usr/lib/php/extensions
508749   4 drwxr-xr-x 2 root root   4096 Feb  6 21:08 /root/tmp/pear-build-root/install-mailparse-2.1.5/usr/lib/php/extensions/no-debug-non-zts-20090626
508744 196 -rwxr-xr-x 1 root root 193502 Feb  6 21:08 /root/tmp/pear-build-root/install-mailparse-2.1.5/usr/lib/php/extensions/no-debug-non-zts-20090626/mailparse.so

Build process completed successfully
Installing '/usr/lib/php/extensions/no-debug-non-zts-20090626/mailparse.so'
install ok: channel://pecl.php.net/mailparse-2.1.5
Extension mailparse enabled in php.ini
The mailparse.so object is not in /usr/local/lib/php/extensions/no-debug-non-zts-20090626

Now, when i try to use mailparse functions using php i get the following error:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20090626/mailparse.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20090626/mailparse.so: cannot open shared object file: No such file or directory in Unknown on line 0

What should i do?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Bug in install script. "mailparse.so" is in "/usr/lib/php/extensions/no-debug-non-zts-20090626/", but php looking for it in "/usr/local/lib/php/extensions/no-debug-non-zts-20090626/".

fix "extension=....mailparse.so" to "extension=/usr/lib/php/extensions/no-debug-non-zts-20090626/mailparse.so" or "extension=mailparse.so"(if extesion_dir correct) in php.ini.

Run "find /usr/local/lib/ -type f -name "*.ini" -exec grep mailparse {} \; -print" to find php configuration file.

After edit php configuration file, restart Apache from cPanel or "service httpd restart".

share|improve this answer
@alvosu Thanks so much, where the specific php.ini is located or should i just create a new one in public html? –  Tom Feb 6 '11 at 21:40
@Tom run command(use ssh root account): "find /etc/ -type f -exec grep mailparse {} \; -print" to find php configuration file –  alvosu Feb 6 '11 at 21:42
@alvosu it doesn't print anything –  Tom Feb 6 '11 at 21:48
"find /etc/ -name php.ini -print" –  alvosu Feb 6 '11 at 21:50
same, but anyways i've added extension = "/usr/lib/php/extensions/no-debug-non-zts-20090626/mailparse.so" to /usr/local/lib/php.ini, it appeared in phpinfo() that mailparse is active, but now when i try to use it, i get PHP: syntax error, unexpected '=' in /usr/local/lib/php.ini on line 789 which is : url_rewriter.tags = a=href,area=href,frame=src,input=src,form=,fieldset=.. Any ideas? –  Tom Feb 6 '11 at 21:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.