This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Hollynn
Hollynn

I installed October late last night and while becoming familiar with the backend of October, I uploaded a PNG to replace the blank image holder for the User. Now, I get a fatal error and can't even access the backend. Any suggestions?

/vendor/october/rain/src/Database/Attach/Resizer.php line 244

Undefined

EXCEPTION

Symfony\Component\Debug\Exception\FatalErrorException


        $mime = $file->getMimeType();
        $filePath = $file->getPathname();

        switch ($mime) {
            case 'image/jpeg': $img = @imagecreatefromjpeg($filePath); break;
            case 'image/gif':  $img = @imagecreatefromgif($filePath);  break;
            case 'image/png':  $img = @imagecreatefrompng($filePath);  break;
            default:           $img = false;                           break;
        }

        return $img;
    }
  

Last updated

theresa7064
theresa7064

I am getting the same error on png image files when I just click on one in the media manager. "call to undefined function October/Rain/Database/Attach/imagecreatefrompng() from line 244 ...

Hollynn
Hollynn

I got help from a backend developer, and he fixed it in less than five minutes. Maybe I can get him to post his solution which might help you as well, teresa7064.

daniel.mccarthy9551
daniel.mccarthy9551

So Holly's problem was that she was on a Mac. FWIW so am I. This is a common problem with the default installation of Apache/PHP on Mac. The solution for this was originally posted in an Apple forum at https://discussions.apple.com/thread/6617744.

You can boil it down to this one line: curl -s http://php-osx.liip.ch/install.sh | bash -s 5.6

You can also look at using Vagrant, which will allow you setup a VM of sorts to do PHP development in a pre-configured environment with little to no configuration.

Last updated

theresa7064
theresa7064

Thank you - I followed the first steps and that worked.

1-5 of 5

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.