After PHP 5.2.9 update having webmail delivery issue.

Support/Development for PHP
User avatar
JnascECSI
Forum Regular
Forum Regular
Posts: 306
Joined: Mon Apr 14, 2008 8:29 am
Location: Rhode Island

After PHP 5.2.9 update having webmail delivery issue.

Unread post by JnascECSI »

Anyone having problems with Horde/Webmail sending emails out?

After updating this morning to 5.2.9 thru atomic i've been getting beat up with phone calls that customers can recieve email's but sent emails are not being delivered.

I went into a test Domain that is on this box and verified that thru Webmail if i send something it gives no error and does show up in the sent-mail box.

But nothing seems to be delivered and i cc'd about 6 email address's across multible domains even sent one to my home email address thru Cox Communications and never recieved it. Also the queue is empty so does'nt seem to be stuck anywhere from what i can tell.
James Nascimento
Chief Information Officer
East Commerce Solutions, Inc.
22 Morris Lane
East Providence, RI 02914
Ph. 800-527-5395 x263
Fax. 888-999-5891
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Re: After PHP 5.2.9 update having webmail delivery issue.

Unread post by scott »

Anything useful in the logs? You could try setting /etc/php.ini to display_errors too
User avatar
JnascECSI
Forum Regular
Forum Regular
Posts: 306
Joined: Mon Apr 14, 2008 8:29 am
Location: Rhode Island

Re: After PHP 5.2.9 update having webmail delivery issue.

Unread post by JnascECSI »

Yup,
Checked all the logs i could think of and did'nt see anything abnormal also when i did the test i turned error reporting on and i got no error.

I can verify that going direct thru SMTP with outlook or anything else seems to work it's just when in horde.
James Nascimento
Chief Information Officer
East Commerce Solutions, Inc.
22 Morris Lane
East Providence, RI 02914
Ph. 800-527-5395 x263
Fax. 888-999-5891
hostingguy
Forum Regular
Forum Regular
Posts: 661
Joined: Mon Oct 29, 2007 6:51 pm

Re: After PHP 5.2.9 update having webmail delivery issue.

Unread post by hostingguy »

did you update asl at the same time? There are a couple of functions that asl disables that may be needed by horde.
User avatar
JnascECSI
Forum Regular
Forum Regular
Posts: 306
Joined: Mon Apr 14, 2008 8:29 am
Location: Rhode Island

Re: After PHP 5.2.9 update having webmail delivery issue.

Unread post by JnascECSI »

hostingguy wrote:did you update asl at the same time? There are a couple of functions that asl disables that may be needed by horde.

Yup, after the update ran asl -u , then rebooted and ran asl -s -f .

I'm using php warn only for PHP function of ASL but i had already known about the "popen" issue with horde so it is allowed so not to interfer with horde.

Horde does process the emails and they do go to the sent-email box but it seems that they are not sent outbound for some reason. And if i check the queue there's nothing sitting there or held up.

This has got me stumped.
James Nascimento
Chief Information Officer
East Commerce Solutions, Inc.
22 Morris Lane
East Providence, RI 02914
Ph. 800-527-5395 x263
Fax. 888-999-5891
aus-city
Forum Regular
Forum Regular
Posts: 685
Joined: Thu Oct 26, 2006 11:56 pm

Re: After PHP 5.2.9 update having webmail delivery issue.

Unread post by aus-city »

Are you sure in asl your allowing:

ALLOW_escapeshellcmd="yes"
ALLOW_popen="yes"

It will not work with out BOTH being enabled.

Also what OS are you running?
User avatar
mikeshinn
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 4155
Joined: Thu Feb 07, 2008 7:49 pm
Location: Chantilly, VA

Re: After PHP 5.2.9 update having webmail delivery issue.

Unread post by mikeshinn »

This sounds like a PHP issue. 5.2.9 includes syntax changes, so check your error logs to see if there are any PHP errors.

In logical terms too this sounds like a PHP issue, if everything was working until you upgraded to PHP 5.2.9 it stands to reason that the upgrade to PHP is the likely culprit. Try rolling back to 5.2.8 or whatever version you were running and see what happens. 5.2.9 definitely includes changes in the PHP syntax - its a language afterall and its changing so if you upgrade its not too surprising that something might break.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Re: After PHP 5.2.9 update having webmail delivery issue.

Unread post by scott »

Also I'd try sending to a local mailbox on the system, and a remote one. Just to rule out it being something network related.

Followup: I just confirmed that Horde works with php 5.2.9 on C4
biggles
Forum Regular
Forum Regular
Posts: 806
Joined: Tue Jul 15, 2008 2:38 pm
Location: Sweden
Contact:

Re: After PHP 5.2.9 update having webmail delivery issue.

Unread post by biggles »

I got exactly the same error after 5.29. I had previously only allowed popen in my configuration, but after reading aus-citys other thread also started to use ALLOW_escapeshellcmd="yes", which solved the problem.

Thanks aus-city!
User avatar
JnascECSI
Forum Regular
Forum Regular
Posts: 306
Joined: Mon Apr 14, 2008 8:29 am
Location: Rhode Island

Re: After PHP 5.2.9 update having webmail delivery issue.

Unread post by JnascECSI »

Thanks guys,
All set that was the issue, for some reason i did have ALLOW_escapeshellcmd="yes" set but for some reason it was'nt working. So i rebooted ran asl -s -f and wamm-o it started working again.

Thanks aus-city for the heads up.
James Nascimento
Chief Information Officer
East Commerce Solutions, Inc.
22 Morris Lane
East Providence, RI 02914
Ph. 800-527-5395 x263
Fax. 888-999-5891
zeki
Forum Regular
Forum Regular
Posts: 120
Joined: Sat Aug 12, 2006 8:14 am

Re: After PHP 5.2.9 update having webmail delivery issue.

Unread post by zeki »

hi
i had the problem too.
after a asl -r -f and a reboot i have the same error.
i can write email in the webmail, sent it and i see it in sent-mail, but the email is not delivered...
i had to remove manualy escapeshell from the disabled functions in php.ini

now its okay!

thanks guys

greets
zek
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Re: After PHP 5.2.9 update having webmail delivery issue.

Unread post by breun »

Yeah, escapeshellcmd was added to the PHP checks in ASL 2.0.7 and if you hadn't yet ran 'asl -s -f' after upgrading to that version, then escapeshellcmd wasn't disabled in /etc/php.ini yet. I found out that Horde needs escapeshellcmd (and fails silently without it!) a couple of days ago and modified the ASL FAQ accordingly.

As far as I'm concerned there is absolutely no harm in allowing escapeshellcmd as it's not a function that executes code. It's a function that takes a string and returns an escaped string, so I found it kind of silly that it's getting disabled by default, especially since it breaks Horde.
Last edited by breun on Wed Mar 04, 2009 6:03 pm, edited 1 time in total.
Lemonbit Internet Dedicated Server Management
hostingguy
Forum Regular
Forum Regular
Posts: 661
Joined: Mon Oct 29, 2007 6:51 pm

Re: After PHP 5.2.9 update having webmail delivery issue.

Unread post by hostingguy »

not so much that horde requires it, popen requires it.
http://us3.php.net/manual/en/features.s ... ctions.php
popen() You can only execute executables within the safe_mode_exec_dir. For practical reasons it's currently not allowed to have .. components in the path to the executable. escapeshellcmd() is executed on the argument of this function.
diego
Forum Regular
Forum Regular
Posts: 111
Joined: Tue Aug 05, 2008 5:01 pm

Re: After PHP 5.2.9 update having webmail delivery issue.

Unread post by diego »

After the upgrade i got a lot of this errors, on my httpd/error_log

PHP Fatal error: Can't load Horde/SessionObjects.php, open_basedir restriction. in /usr/share/psa-horde/lib/Horde/IMAP/Tree.php on line 311

And also i am unable to access phpbb 3 forum installed on my server recently.
sebas
Forum User
Forum User
Posts: 85
Joined: Thu Feb 12, 2009 8:53 pm
Location: Mexico
Contact:

Re: After PHP 5.2.9 update having webmail delivery issue.

Unread post by sebas »

I used the solution of editing
/etc/asl/config
and modifying

ALLOW_escapeshellcmd="yes"
ALLOW_popen="yes"

and then running

asl -s -f

that fixes the issue, but I was trying to use a more granular approach.

I am running Plesk 9 so I modified

/etc/httpd/conf.d/zzz_horde_vhost.conf

and added the lines about php_admin_value disable_functions as follows.

<Directory /usr/share/psa-horde>
<IfModule sapi_apache2.c>
php_admin_flag engine on
php_admin_flag magic_quotes_gpc off
php_admin_flag safe_mode off

php_admin_value open_basedir "/usr/share/psa-horde:/etc/psa/webmail/horde:/etc/psa:/tmp:/var/tmp:/var/log/psa-horde:/usr/share/doc:/usr/share/psa-pear"
php_admin_value include_path "/usr/share/psa-horde:/usr/share/psa-horde/lib:/usr/share/psa-pear:."
php_admin_value disable_functions "dl , exec , passthru , pfsockopen , posix_kill , posix_mkfifo , posix_setuid , proc_close , proc_open , proc_terminate , shell_exec , system , leak , posix_setpgid , posix_setsid , proc_get_status , proc_nice , show_source"
</IfModule>

<IfModule mod_php5.c>
php_admin_flag engine on
php_admin_flag magic_quotes_gpc off
php_admin_flag safe_mode off

php_admin_value open_basedir "/usr/share/psa-horde:/etc/psa/webmail/horde:/etc/psa:/tmp:/var/tmp:/var/log/psa-horde:/usr/share/doc:/usr/share/psa-pear"
php_admin_value include_path "/usr/share/psa-horde:/usr/share/psa-horde/lib:/usr/share/psa-pear:."
php_admin_value disable_functions "dl , exec , passthru , pfsockopen , posix_kill , posix_mkfifo , posix_setuid , proc_close , proc_open , proc_terminate , shell_exec , system , leak , posix_setpgid , posix_setsid , proc_get_status , proc_nice , show_source"
</IfModule>
</Directory>

Then restarted apache.

I also added temporarily a
phpinfo()
to
/imp/compose.php

so that I could take a look a the value for disable_functions
disable_functions
Local
dl , exec , passthru , pfsockopen , posix_kill , posix_mkfifo , posix_setuid , proc_close , proc_open , proc_terminate , shell_exec , system , leak , posix_setpgid , posix_setsid , proc_get_status , proc_nice , show_source

Global
dl , exec , escapeshellcmd , passthru , pfsockopen , popen , posix_kill , posix_mkfifo , posix_setuid , proc_close , proc_open , proc_terminate , shell_exec , system , leak , posix_setpgid , posix_setsid , proc_get_status , proc_nice , show_source

as you can see the values are correct but I cannot send email using this configuration.

Any idea why?

Thanks for your help.
CentOS release 6.5 (Final)
Plesk psa-11.5.30-cos6.build115130819.13
ASL 3.2.18-37
Linux 2.6.32-358.11.1.el6.x86_64
Post Reply