Bluehost.com Web Hosting $6.95

PHP hangs!!

This is a discussion on PHP hangs!! within the PHP Language forums, part of the PHP Programming Forums category; Hi all, I am trying to deploy the latest PHP,MySQL and Apache for a new webmail server (My old ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-04-2006
grpprod@gmail.com
 
Posts: n/a
Default PHP hangs!!

Hi all,
I am trying to deploy the latest PHP,MySQL and Apache for a new webmail
server (My old IMP 3.1 works fine with PHP 4.2.2). Now I have a serious
problem which seems unsolved so far. Here are the versions:

CentOS 4.4
PHP 5.1.6
Apache 2.2.3
MySQL 5.0.24a
UW-IMAP 2004g
Latest Horde+IMP -OR
RoundCube

Problem description (it happens both with IMP and RoundCube).
The problem occurs when opening certain messages from inside the
webmail interface (in IMP it happens also during logging in). Suddenly
CPU usage jumps at 99.5% and Apache hangs. For example, I tried to view
an HTML message with 4 photos attached. The browser stopped after
loading 3 out of 4 photos, and httpd CPU usage jumps at 99.5%. It can't
serve other clients. Only solution? To do a 'pkill' for the hung
process and then restart Apache.

I notice the following error to be logged, but I am not sure this has
something to do with the problem:

[Tue Oct 03 15:07:32 2006] [error] [client 1.2.3.4] PHP Warning:
fgets() [<a href='function.fgets'>function.fgets[/url]]: SSL: fatal
protocol error in
/usr/local/apache223/htdocs/roundcube/program/lib/imap.inc on line 130,
referer:
http://server.mydomain.com/roundcube...LD%20-%20INBOX

Reply With Quote
  #2 (permalink)  
Old 10-04-2006
Ron Barnett
 
Posts: n/a
Default Re: PHP hangs!!

<grpprod@gmail.com> wrote in message
news:1159939326.813039.287630@k70g2000cwa.googlegr oups.com...
> Hi all,
> I am trying to deploy the latest PHP,MySQL and Apache for a new webmail
> server (My old IMP 3.1 works fine with PHP 4.2.2). Now I have a serious
> problem which seems unsolved so far. Here are the versions:
>
> CentOS 4.4
> PHP 5.1.6
> Apache 2.2.3
> MySQL 5.0.24a
> UW-IMAP 2004g
> Latest Horde+IMP -OR
> RoundCube
>
> Problem description (it happens both with IMP and RoundCube).
> The problem occurs when opening certain messages from inside the
> webmail interface (in IMP it happens also during logging in). Suddenly
> CPU usage jumps at 99.5% and Apache hangs. For example, I tried to view
> an HTML message with 4 photos attached. The browser stopped after
> loading 3 out of 4 photos, and httpd CPU usage jumps at 99.5%. It can't
> serve other clients. Only solution? To do a 'pkill' for the hung
> process and then restart Apache.
>
> I notice the following error to be logged, but I am not sure this has
> something to do with the problem:
>
> [Tue Oct 03 15:07:32 2006] [error] [client 1.2.3.4] PHP Warning:
> fgets() [<a href='function.fgets'>function.fgets[/url]]: SSL: fatal
> protocol error in
> /usr/local/apache223/htdocs/roundcube/program/lib/imap.inc on line 130,
> referer:
> http://server.mydomain.com/roundcube...LD%20-%20INBOX


try putting
error_reporting(E_FULL);

at the beginning of the script ..roundcube/program/lib/imap.inc
and if that line refers to a function in another file put that line in the
other file too.
eventually you will find the problem.

It is almost 100% certain that a function (either yours or inbuilt) in the
new PHP behaves differently to one in the earlier version, either because of
the change to v5 or because your configuration settings between the old and
new systems differ in some way.

HTH

Cheers,

Ron Barnett
IT Support for Business
www.rjbarnett.co.uk

-----------------------------------------------------------------------------------------
For labellers and labelling supplies visit www.labelzrus.co.uk


Reply With Quote
  #3 (permalink)  
Old 10-04-2006
grpprod
 
Posts: n/a
Default Re: PHP hangs!!

> try putting
> error_reporting(E_FULL);
>
> at the beginning of the script ..roundcube/program/lib/imap.inc
> and if that line refers to a function in another file put that line in the
> other file too.
> eventually you will find the problem.
>
> It is almost 100% certain that a function (either yours or inbuilt) in the
> new PHP behaves differently to one in the earlier version, either because of
> the change to v5 or because your configuration settings between the old and
> new systems differ in some way.


Thanks for the reply. However, I have to note that the same behaviour
occurs also when installing the new applications in my OLD PHP
platform. Is the approach you described suitable for such a case?

Reply With Quote
  #4 (permalink)  
Old 10-04-2006
Ron Barnett
 
Posts: n/a
Default Re: PHP hangs!!

"grpprod" <grpprod@gmail.com> wrote in message
news:1159982421.301625.36310@i42g2000cwa.googlegro ups.com...
>> try putting
>> error_reporting(E_FULL);
>>
>> at the beginning of the script ..roundcube/program/lib/imap.inc
>> and if that line refers to a function in another file put that line in
>> the
>> other file too.
>> eventually you will find the problem.
>>
>> It is almost 100% certain that a function (either yours or inbuilt) in
>> the
>> new PHP behaves differently to one in the earlier version, either because
>> of
>> the change to v5 or because your configuration settings between the old
>> and
>> new systems differ in some way.

>
> Thanks for the reply. However, I have to note that the same behaviour
> occurs also when installing the new applications in my OLD PHP
> platform. Is the approach you described suitable for such a case?


Yes it works on all PHP versions (or it should do).

I usually put it in my scripts with a check on the server name, so when the
code is on the production server, all errors are suppressed and the script
fails silently, but on the development server, all errors are reported so I
can debug every last warning and notice.
I then put the code on the production box with E_ALL set on and test the
code, then if all is well the errors are suppressed forever. - I would like
to have a written error log but some hosts don't support that,

Cheers

Ron


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 12:27 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0