-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Basics for working on PHP7? #541
Copy link
Copy link
Closed
Description
Hallo,
i started experimenting with my little script to get php7 compatiblity...
<?php
// set up autoloader
if (file_exists ( '../vendor/autoload.php' )) {
require ('../vendor/autoload.php');
}
if (file_exists ( 'vendor/autoload.php' )) {
require ('vendor/autoload.php');
}
// import the Intervention Image Manager Class
use Intervention\Image\ImageManagerStatic as Image;
// configure with favored image driver (gd by default)
Image::configure(array('driver' => 'gd'));
// and you are ready to go ...
$image = Image::make('temp/foo.jpg')->resize(300, 200);
?>And always get the error:
[Wed Apr 27 22:30:53.161713 2016] [:error] [pid 25072] [client 192.168.178.60:56698] PHP Fatal error: Uncaught Intervention\\Image\\Exception\\NotReadableException: Image source not readable in /var/www/test/vendor/intervention/image/src/Intervention/Image/AbstractDecoder.php:302\nStack trace:\n#0 /var/www/test/vendor/intervention/image/src/Intervention/Image/AbstractDriver.php(64): Intervention\\Image\\AbstractDecoder->init('temp/foo.jpg')\n#1 /var/www/test/vendor/intervention/image/src/Intervention/Image/ImageManager.php(50): Intervention\\Image\\AbstractDriver->init('temp/foo.jpg')\n#2 /var/www/test/vendor/intervention/image/src/Intervention/Image/ImageManagerStatic.php(57): Intervention\\Image\\ImageManager->make('temp/foo.jpg')\n#3 /var/www/os_stage/test.php(17): Intervention\\Image\\ImageManagerStatic::make('temp/foo.jpg')\n#4 {main}\n thrown in /var/www/test/vendor/intervention/image/src/Intervention/Image/AbstractDecoder.php on line 302
Any ideas for something very basic i missed? I installed gd lib for php7 on my Ubuntu where i´m testing...
Thanks
Christian
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels