Page 1 of 1

PHP causes IMAP problem

Posted: Wed Aug 10, 2005 8:32 pm
by grey_juce
We are trying to build mail server.
Right now project in development and can be viewed at:
http://mail.photorain.com

We had PHP programmer working on this project. But seems we're running into one problem after another and not be able to solve it ourselves.

Our PHP connection script doesn't connect to IMAP server.

Considering bringing somebody into troubleshooting process.

Required knowledge of PHP (application written in PHP) and good practical knowledge of Linux administration. Possible needs to re-compile PHP. Quite likely, one of PHP's library causing problem.

What’s specifically wrong, when we run PHP connecting script to connect to IMAP server, for some unknown reason process calls SSL. And as SSL not installed, it give an error. But why it calls SSL in a first place, which is not suppose to – that is a big question!

Posted: Wed Aug 10, 2005 9:21 pm
by timvw
Where/how did you get the imap extension? My guess is that php was compiled --with-imap-ssl=/path/to/openssl/

How practically fix it

Posted: Thu Aug 11, 2005 8:02 am
by grey_juce
Where/how did you get the imap extension? My guess is that php was compiled --with-imap-ssl=/path/to/openssl/
------------------------------------------------

Interesting thing, when we got new server - it worked for without errors. But after a while, it began producing error.

So we requested to re-instal server OS and a packages.
It's been done. We uploaded scripts, and everything waqs working fine. And again after a while IMAP began givng same problem.

So we are on a second cirle at the sme spot. Difference, at first we had PHP version 4 something. Now we have 5.0.4 (I think) -- the same problem.

Posted: Thu Aug 11, 2005 1:46 pm
by feyd
erroneously posted by grey_juce wrote:Having problem connecting to IMAP server from PHP scripts.
Example
http://mail.photorain.com/test.php
... in a broser, after some waiting time (30 - 50 sec) .. giving this error:


Warning: imap_open() [function.imap-open]: Couldn't open stream {localhost:143/notls}INBOX in /home/photorain/wwwroot/photorain.com/test.php on line 9
[CLOSED] IMAP connection broken (server response)

Can use some help ti solve this ...


Sergei

Re: How practically fix it

Posted: Thu Aug 11, 2005 5:34 pm
by grey_juce
[quote="grey_juce"]Where/how did you get the imap extension? My guess is that php was compiled --with-imap-ssl=/path/to/openssl/
------------------------------------------------

IMAP extensions ca,e with Linux OS.

Does any one know how to fix it?

still IMAP problem

Posted: Fri Aug 12, 2005 8:46 am
by grey_juce
Still having problem and asking for help .. please, please, please !!!
We even willing to hire a right person to solve this problem.

1) on this server:
phpinfo ();
http://mail.photorain.com/phpinfo.php
... this test script doesn't work
http://mail.photorain.com/test.php

2) on this server
phpinfo();
http://www.fligel.com/info.php
... the same IMAP connecting script - working fine
http://www.fligel.com/test.php

On both servers same PHP version with same extensions set

Posted: Fri Aug 12, 2005 10:18 am
by timvw
Does the IMAP server allow access from both hosts? (It appears you are connecting to localhost, so you would need an imap server on both hosts running...) Is there a firewall blocking tcp/ip connections?

Posted: Fri Aug 12, 2005 11:41 am
by grey_juce
No, there is no firewall blocking.

On this troubled server we even requested to reinstall OS.
After reinstallation IMAP connection worked for a day or two and after a while began producing the same as was before errors.

Company I host servers with trying to help, but they don't know exactly what causing this problem.
At first we thought this is a PHP extensions like "timvw" mentioned previously "My guess is that php was compiled --with-imap-ssl=/path/to/openssl/"
.. it still possibilities.

But looking and comparing two servers, looks like PHP versions are identical with same extensions sets. On one machine IMAP connection works, on another doesn't.

Still unsolved mistery!!

Posted: Fri Aug 12, 2005 12:12 pm
by grey_juce
Another fact ...
While connecting via SSH, we tried both, port 143 (without SSL) and 993 (with encryption) - both work fine.

Start thinking, may it Apache version 1.3 ???

Posted: Fri Aug 12, 2005 4:02 pm
by timvw
But you need an imap on both servers.. (As your script is connecting on localhost).

Anyway, time to tail your error.log and imapd.log files ;)