Forum

PHP with Hiawatha sometimes very slowly

Alex
23 October 2011, 13:21
In some cases PHP is under Hiawatha very very slowly. With Apache, it is much faster.
For example: export in phpMyAdmin of the tables can take a very long time and is canceled (no connection), so that does not work. What could be the problem?

Hiawatha version: 7.7
Operating System: FreeBSD 8.2
Hugo Leisink
23 October 2011, 16:27
I'm having the same problem with phpMyAdmin. phpMyAdmin has always been a problem. I don't know what the problem is. Since al other websites run just fine, my guess is that it's something in phpMyAdmin. It's probably been built for Apache and has never been tested with other webservers.
Hugo Leisink
23 October 2011, 16:36
Btw, do those problems always appear when using SSL?
Alex
23 October 2011, 17:36
exactly, only with SSL appears the problem. Can you solve this now? Because phpmyadmin is very confidential and must work only with ssl.
Hugo Leisink
23 October 2011, 19:38
I've looked at it and found some issue with the OpenSSL library. Please, try the following patch on hiawatha.c
354c354
< int result = 200, write_bytes;
---
> int result = 200, write_bytes, select_result;
486c486,493
< switch (select(session->client_socket + 1, &read_fds, NULL, NULL, &select_timeout)) {
---
>#ifdef HAVE_SSL
> select_result = session->binding->use_ssl ? SSL_pending(session->ssl_data) : 0;
>
> if (select_result == 0)
>#endif
> select_result = select(session->client_socket + 1, &read_fds, NULL, NULL, &select_timeout);
>
> switch (select_result) {
Alex
23 October 2011, 20:59
Thanks Hugo, I'll try this patch. Btw, this problem appear with Joomla, if I try to install some component?.
I'll let you know if there are problems
Hugo Leisink
24 October 2011, 19:01
I've updated the patch in my previous post. This one works better.
Alex
26 October 2011, 10:23
Hey Hugo,

Unfortunately I have no opportunity to test current. Everything works well with you?
Hugo Leisink
26 October 2011, 12:10
I've done some serious testing and I think that the patch in my previous post indeed solves the problem.
Alex
27 October 2011, 14:37
Excellent, I can hardly wait to install the patch on my servers.
Are you waiting with a new Hiawatha version yet or we have soon a 7.8?
Hugo Leisink
27 October 2011, 14:53
I'm working on a new version, but it won't be ready soon. My advice is to apply the patch manually.
Alex
28 October 2011, 00:05
Ok Hugo, take your time. You make awesome work!
Anisha
3 November 2011, 23:03
I'm so glad I found my soultion online.
This topic has been closed.