Skip to content

Fatal error: Uncaught UnexpectedValueException: PHP Startup: Failed to open directory: No such file or directory #7

@ben221199

Description

@ben221199

With the following code...

#!/usr/bin/env php
<?php
use Composer\Autoload\ClassLoader;
use Practically\Preloading\Preloader;

/** @var ClassLoader*/
$autoloader = require __DIR__ . '/vendor/autoload.php';
$preloader = new Preloader($autoloader);

$preloader->preload('/^app/');

$preloader->preloadDirectory(__DIR__.'/resources/views');
$preloader->preloadDirectory(__DIR__.'/views');

var_dump(opcache_get_status(true));

...I get the following error:

Fatal error:  Uncaught UnexpectedValueException: PHP Startup: Failed to open directory: No such file or directory in /var/www/html/vendor/practically/preloader/src/Preloader.php:56
	Stack trace:
		#0 /var/www/html/vendor/practically/preloader/src/Preloader.php(56): RecursiveDirectoryIterator->__construct('/var/www/html/v...')
		#1 /var/www/html/preload.php(13): Practically\Preloading\Preloader->preloadDirectory('/var/www/html/v...')
	thrown in /var/www/html/vendor/practically/preloader/src/Preloader.php on line 56

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions