You are not logged in.
- Topics: Active | Unanswered
#1 2010-02-05 19:32:17
- Luke
- Member
- Registered: 2009-09-17
- Posts: 22
Maximum execution time of 60 seconds exceeded in email.php
Fatal error: Maximum execution time of 60 seconds exceeded in C:\xampp\htdocs\FluxBB\forum\include\email.php on line 107
Why is it doing this?
Line 107 is:
if (!($server_response = fgets($socket, 256)))
What server is that trying to connect to though? I've got it configured in my config to connect to Gmail and that has been working for ages, it stopped working when we switched from PunBB to FluxBB, I believe.
Offline
#2 2010-02-05 19:34:34
- Luke
- Member
- Registered: 2009-09-17
- Posts: 22
Re: Maximum execution time of 60 seconds exceeded in email.php
It gets past this step OK:
if (!($socket = fsockopen($smtp_host, $smtp_port, $errno, $errstr, 15)))
Offline
#3 2010-02-07 08:24:29
- Franz
- Lead developer

- From: Germany
- Registered: 2008-05-13
- Posts: 3,755
- Website
Re: Maximum execution time of 60 seconds exceeded in email.php
Do you get this same error everytime you try what you tried to do? It might very well be possible that some action is too slow, but execution always stops at a different line (therefore, different lines could be displayed in that error and thus, wouldn't help to find the actual problem).
Offline
#4 2010-02-11 09:53:32
- Luke
- Member
- Registered: 2009-09-17
- Posts: 22
Re: Maximum execution time of 60 seconds exceeded in email.php
It's always the same line.
Offline
#5 2010-02-11 10:11:18
- Reines
- Lead developer

- From: Scotland
- Registered: 2008-05-11
- Posts: 3,140
- Website
Re: Maximum execution time of 60 seconds exceeded in email.php
I'm not sure why it would be happening, but it sounds like it's connecting to the mail server, but for some reason isn't receiving any data so is getting stuck waiting for a response.
Did anything else change (version, host, settings?) when you changed from PunBB to FluxBB? I'm not aware of email.php having been changed at all in the 1.2 branch.
Offline
#6 2010-03-05 20:52:27
- Luke
- Member
- Registered: 2009-09-17
- Posts: 22
Re: Maximum execution time of 60 seconds exceeded in email.php
Nah, but to be honest I think there's something wrong somewhere with Apache/PHP or whatever as your decode_username() function gets stuck too on the line that simply adds a space to the beginning of a string.
The only 'fix' (read: bodge) I've found is by having Apache automatically restarted every 3 hours, but obviously I'd love to resolve it properly. I have no-idea what's causing it so it's pretty hard to fix. ![]()
Offline
#7 2010-03-05 21:02:51
- Franz
- Lead developer

- From: Germany
- Registered: 2008-05-13
- Posts: 3,755
- Website
Re: Maximum execution time of 60 seconds exceeded in email.php
This is especially odd since the connection seems to be established correctly - else we would get a "normal" FluxBB error even before that step.
How exactly does fgets() react if the response is shorter than the given number of bytes?
Offline
#8 2010-03-06 00:38:35
- Smartys
- Former Developer
- Registered: 2008-04-27
- Posts: 3,117
- Website
Re: Maximum execution time of 60 seconds exceeded in email.php
Reading ends when length - 1 bytes have been read, on a newline (which is included in the return value), or on EOF (whichever comes first). If no length is specified, it will keep reading from the stream until it reaches the end of the line.
So, if my mail server were to write fewer than 256 bytes and not send an EOF, it would freeze.
I would talk to your webhost if PHP is hanging on random lines of code.
Offline
