[solved] Empty pages after restored server

Summary

Page content doesn’t show up, server log says:
213.196.250.207 - - [22/May/2019:02:28:38 -0400] “GET / HTTP/1.1” 200 0 “-” “Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0”

Step to reproduce

Not reproducable, only on my server

Observed behavior

After a server crash at my hoster I had to build up the server from scratch. I host a few webpages built with older versions of modx, they run fine except the one I’m talking about. I restored the databases from SQL dumps, and got an error page code 500 (internal server error) first. I could fix this, now the server log gives me code 200 (see above). But the pages are blank, there is even no html source code in the browser.

Unfortunatly I cannot tell which version of modx it is exactly, if you can tell me how to get the version number from the DB or the files, I will post it. I tracked the problem down to the last function call in index.php:

/* execute the request handler */

if (!MODX_API_MODE) {
$modx->handleRequest();
}

Echo-strings before this call are put out in the browser, afterwards not. I hope that’s useful.

Expected behavior

The web pages should just show up :slight_smile:

Environment

MODX version unknown (see above), Lighttpd with lighttpd-mod-magnet, both 1.4.45 , MySQL 5.5.60, PHP 5.4.45, Firefox 66 from Ubuntu. I have to use this older versions due to custom scripts which need to be reprogrammed for newer versions. But I used this versions before the server crash, and they worked, and the other webpages just work fine.

Any help is greatly appreciated.

Kind regards
Andre

Hi!

Can you have a look in your PHP error log and MODX error log and see what those say?
The server log you posted there just shows the request from the browser.

To find the version, within the database look in the modx_system_settings table and find the key settings_version.

Maybe you did but check all configs paths, clear cache and rerun setup.

Hi,

thank you, settings_versions says 2.1.5-pl. I know it’s outdated, but updates are not the issue now, first I have to get the actual install running/showing the webpages.

I was trying to configure php to get more error output. As far as I see, lighttpd uses php-fpm. phpinfo() tells me that /etc/php5/fpm/php.ini is used, I configured it to log to syslog, but I don’t get relevant output from:

/var/log/lighttpd# tail -F error.log ip/error.log ip/access.log coaching-evaluationen.de/error.log coaching-  
evaluationen.de/access.log ../syslog ../php5-fpm.log ../mysql.err ../mysql.log ../mysql/error.log

only what I posted from the access.log. The relevant part of fpm/php.ini says:

grep -i error /etc/php5/fpm/php.ini |grep -v “;”

disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
error_reporting = E_ALL
display_errors = Off
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
track_errors = Off
html_errors = On
error_log = syslog
mssql.min_error_severity = 10

Where do I find the MODX error log or configure to use one?

Cheers
Andre

How can I clear the cache from the command line? I don’t like to rerun setup, as I fear to loose my data.

You wont lose data. Just empty the folder core/cache/

Guess I solved it. Due to restoring the backup as root, files and groups were root too. Changing to www-data.www-data did the trick.

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.