php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15998 Difference in mail() function in PHP 4.1.2, causes delay in sending mail.
Submitted: 2002-03-11 10:36 UTC Modified: 2002-03-11 11:15 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: paul dot mullett at nlightn dot co dot uk Assigned:
Status: Not a bug Package: Mail related
PHP Version: 4.1.2 OS: Linux/Unix Redhat
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: paul dot mullett at nlightn dot co dot uk
New email:
PHP Version: OS:

 

 [2002-03-11 10:36 UTC] paul dot mullett at nlightn dot co dot uk
There appears to be a difference between the way mail() works between 4.1.0 and 4.1.2.  This can cause scripts which worked perfectly in PHP 4.1.0 to take as much as a minute to excecute in PHP 4.1.2.

I upgraded using a pkg file from pkgmaster.com for a Cobalt RAQ4 server, and I have spoken to another PHP user using Redhat 7 who has experienced the same issue.

Basically PHP mail() functions were taking as long as a minute to excecute, when prior to the upgrade they took seconds.

We found that while we had no problems with PHP 4.1.0, we had to add all our IP's into the /etc/hosts file to cure the problem experienced with 4.1.2.

Config is:

System Linux rev66.cobalt 2.2.16C28_III #1 Mon Jul 30 22:07:58 PDT 2001 i586 unknown

Build Date Feb 27 2002

Configure Command  './configure' '--prefix=/usr' '--with-apxs=/usr/sbin/apxs' '--with-gd' '--with-gettext=/usr' '--enable-safe-mode' '--with-config-file-path=/etc/httpd' '--with-exec-dir=/usr/bin' '--with-zlib' '--enable-magic-quotes' '--with-regex=system' '--with-ttf' '--with-db' '--with-gdbm' '--with-mbstring' '--with-mbstr-enc-trans' '--enable-track-vars' '--enable-wddx=shared' '--enable-mm=shared' '--enable-xml' '--disable-debug' '--with-libdir=/usr/lib' '--with-db3' '--with-interbase=shared' '--with-pgsql=shared' '-- 

Although we have solved this issue by adding the IP's to the /etc/hosts file, it may be worth documenting this somewhere for others reference, it took a great deal of hair-pulling to get it solved!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-11 11:00 UTC] rasmus@php.net
There were no code changes to the mail() function code between 4.1.0 and 4.1.2.  And even if there was, all mail() does is open a pipe to your sendmail or equivalent mail delivery program.  PHP does not try to do any domain name resolution on the addresses so this DNS delay you are experiencing can not possibly be PHP related as the DNS resolution is done by the external mail delivery program.  You probably changed something else on your system.  Check your /etc/resolv.conf and make sure the DNS servers listed there are responding quickly.
 [2002-03-11 11:13 UTC] paul dot mullett at nlightn dot co dot uk
The servers are responding fine.

Sendmail was working fine from the command line, before AND after the PHP upgrade, but the php mail() command was taking a VERY long time until I added all the IP details to /etc/hosts.  Now it works fine.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Sep 24 04:03:36 2021 UTC