EMONCMS web page not loading

I have had emoncms running for a number of years on my raspberry pi and successfully upgraded it a number of times. However just recently the web page stopped responding as in the web browser reports this page is not responding. in the past I usually solve it by restarting my raspberry pi and it comes good. However recently this no longer resolved the issue.
The problem is when I start my browser (any browser I have tried 4 different devices) I get the “this page isn’t working 192.168.1.24 didn’t send any data.
ERR_EMPTY_RESPONSE”
so I looked on my pi and ensured all the services are running apache, emonhub etc. and still no joy. I looked at the apache error log and nothing in there. I upped apache logging to trace8 and nothing to note appeared.
I then enabled log level info on emoncms settings and still nothing in the logs.
So I resorted to editing the php files and inserting log entries to track what the php code was actually going.
What I found was that index.php calls function emon_session_start in user_mode.php
emon_session_start finds no existing session so it calls login in rememberme_model.php
login calls getCookieValues
getCookieValuesfinds no cookie and returns false
the login function then compares cookie values and then returns false to emon_session_start
user_model.php emon_session_start then checks some session variables sets them to values as they have not been set yet and returns a session to index.php
index php continues on and in section // 6) Load the main page controller
sets $output[‘content’] to some html
continues to section // 7) Output
where output type is html and embed is 0
It does a print view and nothing comes out on the browser window except the error message, I also never get a reply from the webserver if I use wireshark to monitor at the tcp/ip level. However if I run php index.php from the linux console in the /var/www/emoncms directory I get the html pumped out to the console.

Anyone got some ideas whats going on?

I am running php version:
root@emonpi:/var/www/emoncms# php -v
PHP 5.6.20-0+deb8u1 (cli) (built: Apr 28 2016 00:01:26)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
also I tried creating a file info.php with contents of <?php phpinfo(); ?>
and that does not return anything either.

1 Like

Do you use low write version? If not my immediate suspicion would be a failing SD card so backup your data (if it isn’t already). Failing SD Cards present in different ways - not always an immediate shutdown.

If this did not respond it looks like a problem with your base system (or your network) rather than EmonCMS. If you try and access the info.php file from the command line (presumably Curl) do you see anything?

By this do you mean from an SSH session on the pi? Or on the remote machine?

Are you running wireshark on the pi or on the local machine?

Any changes since it worked either with emoncms or the base system?

If I run info.php from command line using php then it does return data.
I suspect some thing has gone wrong with my Apache installation. I have tried re installing the php5 module with no luck.

I will try a reinstall of Apache and see what happens. After backing up my SD card to another SD card.

Thanks for the help.