Hi Chris,
I'm a coworker of robsch and tried to figure out the problem more in detail

[it didn't last 3 months, but we had to do other work]
I tried to "debug" the constructor and followed the path down to following problem:
If I make a
inside the Swift.php and the functions that are called during construction I get down to the point, that the stream changes to "UNKNOWN" after calling
at line 220, Swift.php.
And now some more astonishing things happen:
I added
Code: Select all
var_dump($this->connection); var_dump($this->connection);
right before line 220 (more or less as an accident

) and woha:
First Output of var_dump:
Code: Select all
object(Swift_Connection_SMTP)#9 (12) {
["handle:protected"]=>
resource(37) of type (stream)
["port:protected"]=>
int(25)
["encryption:protected"]=>
int(8)
["timeout:protected"]=>
int(15)
["username:protected"]=>
bool(false)
["password:protected"]=>
bool(false)
["authenticators:protected"]=>
array(0) {
}
["errno:protected"]=>
int(0)
["errstr:protected"]=>
string(0) ""
["extensions:protected"]=>
array(0) {
}
["isESMTP:protected"]=>
bool(false)
["server"]=>
string(9) "localhost"
}
Second Output of var_dump:
Code: Select all
object(Swift_Connection_SMTP)#9 (12) {
["handle:protected"]=>
resource(37) of type (Unknown)
["port:protected"]=>
int(25)
["encryption:protected"]=>
int(8)
["timeout:protected"]=>
int(15)
["username:protected"]=>
bool(false)
["password:protected"]=>
bool(false)
["authenticators:protected"]=>
array(0) {
}
["errno:protected"]=>
int(0)
["errstr:protected"]=>
string(0) ""
["extensions:protected"]=>
array(0) {
}
["isESMTP:protected"]=>
bool(false)
["server"]=>
string(9) "localhost"
}
So how can it be, that a variable changes during two directly following dumps? (you see, the handle is firstly a stream, than unknown)
It turns out to me, that there are two possibilies:
- PHP 5.2.2 is broken here
or
- our selfcompiled PHP suffers a module or something at the configuration files
I tested on other servers with PHP 5.1.2 and 5.2.3 and our Code does what it should... Maybe I should set up another server with 5.2.2 and test it there (the server were it should run is a live system)
I've also sent a mail "by hand" over an SMTP connection without calling the Swift constructor (made an Connection Object, called start() and afterwards used write on the Connection) - that works...
And last but not least: I used the PHP4 Version of SwiftMailer with the PHP5 on our Server and - IT WORKS!
It would be very nice, if you have a guess, a tip or even a litte straw for me/us
thx a lot