Sandbox failed to open stream: No such file or directory _Nette.RobotLoader/_9b9661b8677b49c1f3e6bb2a049cc5cd

Upozornění: Tohle vlákno je hodně staré a informace nemusí být platné pro současné Nette.
Čamo
Člen | 798
+
0
-

Zdravím vás, vie mi prosím niekto poradiť s týmto errorom. Stiahol som si cez Composer sandbox. Nastavil som práva pre zápis na temp a log adresár. A po spustení mi vyhodí error: „fopen(/opt/lampp/htdocs/nettesbox/app/../temp/cache/_Nette.RobotLoader/_9b9661b8677b49c1f3e6bb2a049cc5cd): failed to open stream: No such file or directory“

callstack vyzerá takto:
bootstrap:

public function register($prepend = FALSE)
{
            $this->classes = $this->getCache()->load($this->getKey(), [$this, 'rebuildCallback']);
            spl_autoload_register([$this, 'tryLoad'], TRUE, (bool) $prepend);
            return $this;
}

cache:

public function load($key, $fallback = NULL)
{
            $data = $this->storage->read($this->generateKey($key));
            if ($data === NULL && $fallback) {
                return $this->save($key, function (& $dependencies) use ($fallback) {
                    return call_user_func_array($fallback, [& $dependencies]);
                });
            }
            return $data;
}

cache:

public function save($key, $data, array $dependencies = NULL)
{
            $key = $this->generateKey($key);

            if ($data instanceof Nette\Callback || $data instanceof \Closure) {
                if ($data instanceof Nette\Callback) {
                    trigger_error('Nette\Callback is deprecated, use closure or Nette\Utils\Callback::toClosure().', E_USER_DEPRECATED);
                }
                $this->storage->lock($key);
                try {
                   $data = call_user_func_array($data, [& $dependencies]);
                } catch (\Throwable $e) {
                    $this->storage->remove($key);

filestorage:

public function lock($key)
{
            $cacheFile = $this->getCacheFile($key);
            if ($this->useDirs && !is_dir($dir = dirname($cacheFile))) {
                @mkdir($dir); // @ - directory may already exist
            }
            $handle = fopen($cacheFile, 'c+b');
            if ($handle) {
                $this->locks[$key] = $handle;
                flock($handle, LOCK_EX);
            }

Keby niekto vedel, budem mu vďačný.

Čamo
Člen | 798
+
0
-

Aha takže nestačí len chmod 755 ./folder ale treba chmod -R 755 ./folder