Dependency issues, Error 500, RobotLoader, Cache.php
- ondrejkopicka
- Member | 8
Hi there,
I am not sure this is the right thread for this kind of issue so please, feel
free to redirect this to another thread if needed.
My setup: LAMP php 5.6, Apache/2.4.18, Ubuntu 16.04
I am trying to run a nette web app on localhost and at the moment I am
experiencing problem with HTTP ERROR 500.
The weird thing is that I cannot find any information in any log file. Neither
the project log, neither the /var/log/apache2/access.log or
/var/log/apache2/access.log or var/log/syslog. I have no problem with running
nette sandbox but when I try to run the app, it crashes with E500.
I was able to trace the problem manualy by die(); function and I ended up in
the function load in vendor/nette/caching/src/Caching/Cache.php on the
line 97.
<?php
92 public function load($key, $fallback = NULL)
93 {
94 $data = $this->storage->read($this->generateKey($key));
95 if ($data === NULL && $fallback) {
96 return $this->save($key, function (& $dependencies) use ($fallback) {
97 return call_user_func_array($fallback, array(& $dependencies));
98 });
99 }
100 return $data;
101 }
?>
caled from function register from RobotLoader when setting up a configurator in bootstrap.php by lines
<?php
$configurator->createRobotLoader()
->addDirectory(__DIR__)
->addDirectory(__DIR__ . '/../vendor/others/')
->register();
?>
the path ‘/../vendor/others/’ seems ok.
by die() function I was able to get the value for parameters of the function call_user_func_array:
<?php
json_encode( $fallback ) = [{"ignoreDirs":".*, *.old, *.bak, *.tmp, temp","acceptFiles":"*.php, *.php5","autoRebuild":true},"rebuildCallback"]
json_encode( array(& $dependencies) ) = [null]
?>
I have set rights for the project root html as follows:
<?php
chown -R www-data.www-data html
chmod -R 755 html
chmod -R 777 html/temp html/log
?>
composer update/composer install finished without any errors.
the error is same for “minimum-stability”: “stable” and
“minimum-stability”: “dev” settings in composer.json
I tried to clear both browser and project cache.
I have enabled all possible error reporting in php.ini
Do you know what may cause this issue or how to proceed? I am not able to dive deeper with die() function.
Last edited by ondrejkopicka (2017-07-16 00:52)