Net_SMTP potential bug
| From: | Mike McCallister | Date: | Thu, 02 Oct 2003 22:47:18 +0000 |
| Subject: | Net_SMTP potential bug | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-22332@lists.php.net to get a copy of this message | ||
Greetings,
I realize that this is probably a bug with PHP itself (results in segfault). However, you can make the segfault go away by slightly altering the constructor in Net_SMTP. All you do is comment out the Auth/SASL.php stuff in the constructor and voila - no more segfault:
function Net_SMTP($host = null, $port = null, $localhost = null)
{
if (isset($host)) $this->host = $host;
if (isset($port)) $this->port = $port;
if (isset($localhost)) $this->localhost = $localhost;
$this->_socket = new Net_Socket();
/*
* Include the Auth_SASL package. If the package is not available,
* we disable the authentication methods that depend upon it.
*/
/*if ((@include_once 'Auth/SASL.php') === false) {
$pos = array_search('DIGEST-MD5', $this->auth_methods);
unset($this->auth_methods[$pos]);
$pos = array_search('CRAM-MD5', $this->auth_methods);
unset($this->auth_methods[$pos]);
}*/
}
The segfaulting only started happening in 4.3.3 and does currently affect 4.3.4RC1. Again - I am only posting this to help others who might be affected by this. I am NOT flaming the nice author of Net_SMTP in anyway. It should obviously not be segfaulting - error in PHP. Furthermore, I realize that my comment this out fix is hardly a fix at all - just trying to help anyone else affected by this.
In case anyone is curious:
'./configure' '--with-openssl=/usr' '--enable-memory-limit' '--with-mysql' '--with-zlib' '--with-apache=../apache_1.3.28' '--enable-inline-optimization' '--with-curl=/usr/local' '--with-mcrypt=/usr/local'
[PEAR] Archive_Tar - already installed: 1.1[PEAR] Console_Getopt - already installed: 1.0 Optional dependencies: 'xmlrpc' PHP extension is recommended to utilize some features
[PEAR] PEAR - upgraded: 1.3b1Wrote PEAR system config file at: /usr/local/etc/pear.conf You may want to add: /usr/local/lib/php to your php.ini include_path
[PEAR] DB - upgraded: 1.5.0RC2 [PEAR] HTTP - already installed: 1.2.1 [PEAR] Mail - already installed: 1.1.2 [PEAR] Net_SMTP - already installed: 1.2.3 [PEAR] Net_Socket - already installed: 1.0.1 [PEAR] XML_Parser - already installed: 1.0.1 [PEAR] XML_RPC - already installed: 1.0.4