I have a website which I'm trying to run offline on my LAMP server but when I'm trying to enter it with localhost
or with local ip address the page is blank.
If I'm opening the Inspector I can see all the elements and if I'm hovering on an element in the inspector I can see where in the page they are located but they're invisible.
I checked the apache log file and saw that error (line breaks for more comfortable view):
[:error] [pid 3180] [client 127.0.0.1:60802] PHP Fatal error: require_once():
Failed opening required '/var/www/html' (include_path='.:/usr/share/php') in
/var/www/html/cache/cache.php on line 572
I then searched google for a solution and found this guide but didn't manage to solve the issue.
Would be happy to get some help.
EDIT:
This is the output of ls -la
:
total 12
drwxr-xr-x 3 root root 4096 אפר 6 11:53 .
drwxr-xr-x 15 root root 4096 אפר 6 11:53 ..
drwxrws--- 16 localhost www-data 4096 אפר 6 14:36 html
I managed to make the page visible by changing the opacity
in here:
<?=($config['environment']!=='dev')?'style="opacity:0;"':''?>
To this:
<?=($config['environment']!=='dev')?'style="opacity:1;"':''?>
Now I can see the page but for some reason the CSS isn't loading.
I am also getting a lot of those:
SQL/DB Error -- [Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'sitename_site.pv.name' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by]
EDIT #2:
After changing the permissions of /var/www
this is the error I'm getting:
Fatal error: Uncaught exception 'RuntimeException' with message 'The file could not be written to. Check that appropriate permissions have been set.' in /var/www/html/vendor/katzgrau/klogger/src/Logger.php:128 Stack trace: #0 /var/www/html/includes/db_class.php(7204): Katzgrau\KLogger\Logger->__construct('/var/www/html/i...') #1 /var/www/html/includes/db_class.php(7217): db_class->getLogger('404') #2 /var/www/html/includes/furl_router.php(55): db_class->logger('404') #3 /var/www/html/includes/furl_router.php(229): goTo404('no page-data / ...') #4 /var/www/html/index.php(17): require_once('/var/www/html/i...') #5 {main} thrown in /var/www/html/vendor/katzgrau/klogger/src/Logger.php on line 128