Jump to content

MAMP Pro/localhost Error Uploading Images


Tiki Tiki

Recommended Posts

Posted

I'm running a test installation of Beta 5a using MAMP Pro, all appears to be well, except that I get a 'Filename cannot be empty' error message whenever I attempt to add an image to a post, profile, etc. I have both gd and imagick enabled, and I get a similar error regardless of which one I choose in IPB's settings.

Sorry, there is a problem

exception 'ErrorException' with message 'file_put_contents(): Filename cannot be empty' in /Applications/MAMP/htdocs/system/Image/Imagemagick.php:46
Stack trace:
#0 [internal function]: IPS\IPS::errorHandler(2, 'file_put_conten...', '/Applications/M...', 46, Array)
#1 /Applications/MAMP/htdocs/system/Image/Imagemagick.php(46): file_put_contents('', '\xFF\xD8\xFF\xE0\x00\x10JFIF\x00\x01\x01\x01\x00...')
#2 /Applications/MAMP/htdocs/system/Image/Image.php(53): IPS\Image\_Imagemagick->__construct('\xFF\xD8\xFF\xE0\x00\x10JFIF\x00\x01\x01\x01\x00...')
#3 /Applications/MAMP/htdocs/system/File/File.php(889): IPS\_Image::create('\xFF\xD8\xFF\xE0\x00\x10JFIF\x00\x01\x01\x01\x00...')
#4 /Applications/MAMP/htdocs/applications/core/modules/front/members/profile.php(868): IPS\_File->thumbnail('core_Profile', 200, 200)
#5 [internal function]: IPS\core\modules\front\members\_profile->editPhoto()
#6 /Applications/MAMP/htdocs/system/Dispatcher/Controller.php(85): call_user_func(Array)
#7 /Applications/MAMP/htdocs/applications/core/modules/front/members/profile.php(65): IPS\Dispatcher\_Controller->execute()
#8 /Applications/MAMP/htdocs/system/Dispatcher/Dispatcher.php(129): IPS\core\modules\front\members\_profile->execute()
#9 /Applications/MAMP/htdocs/index.php(13): IPS\_Dispatcher->run()
#10 {main}

Error code: EX2

Does anyone know what is happening here?

I can see that the images are being added to uploads/monthly_2015_01/, but thumbnails aren't created, and nothing shows up in a post or profile photo, etc.

The good news is that 'Remove Orphaned Files' is working perfectly. LOL!

Posted

Can you temporary disable ImageMagik (and choose GD) then try it again ? What error do you get this time ? As the current error appears to be biased towards IMagik...

Posted

I get similar errors regardless of which method I choose.

GD, attempting to add an image to a record in Pages:

Sorry, there is a problem

exception 'ErrorException' with message 'file_put_contents(): Filename cannot be empty' in /Applications/MAMP/htdocs/system/Image/Image.php:260
Stack trace:
#0 [internal function]: IPS\IPS::errorHandler(2, 'file_put_conten...', '/Applications/M...', 260, Array)
#1 /Applications/MAMP/htdocs/system/Image/Image.php(260): file_put_contents('', '\xFF\xD8\xFF\xE0\x00\x10JFIF\x00\x01\x01\x01\x00...')
#2 /Applications/MAMP/htdocs/system/Image/Image.php(85): IPS\_Image->setExifData('\xFF\xD8\xFF\xE0\x00\x10JFIF\x00\x01\x01\x01\x00...')
#3 /Applications/MAMP/htdocs/system/File/File.php(889): IPS\_Image::create('\xFF\xD8\xFF\xE0\x00\x10JFIF\x00\x01\x01\x01\x00...')
#4 /Applications/MAMP/htdocs/applications/cms/sources/Records/Records.php(651): IPS\_File->thumbnail('content_Records', '200', '200')
#5 /Applications/MAMP/htdocs/applications/cms/modules/front/database/record.php(481): IPS\cms\_Records->processForm(Array)
#6 [internal function]: IPS\cms\modules\front\database\_record->edit()
#7 /Applications/MAMP/htdocs/system/Dispatcher/Controller.php(85): call_user_func(Array)
#8 /Applications/MAMP/htdocs/system/Content/Controller.php(42): IPS\Dispatcher\_Controller->execute()
#9 /Applications/MAMP/htdocs/applications/cms/sources/Databases/Dispatcher.php(282): IPS\Content\_Controller->execute()
#10 /Applications/MAMP/htdocs/applications/cms/modules/front/pages/page.php(229): IPS\cms\Databases\_Dispatcher->run()
#11 [internal function]: IPS\cms\modules\front\pages\_page->__call('edit', Array)
#12 [internal function]: IPS\cms\modules\front\pages\page->edit()
#13 /Applications/MAMP/htdocs/system/Dispatcher/Controller.php(85): call_user_func(Array)
#14 /Applications/MAMP/htdocs/applications/cms/modules/front/pages/page.php(33): IPS\Dispatcher\_Controller->execute()
#15 /Applications/MAMP/htdocs/system/Dispatcher/Dispatcher.php(129): IPS\cms\modules\front\pages\_page->execute()
#16 /Applications/MAMP/htdocs/index.php(13): IPS\_Dispatcher->run()
#17 {main}

Error code: EX2

I get a similar error when attempting to add an image to a forum post:

There was a problem processing the uploaded file. file_put_contents(): Filename cannot be empty

 

Posted

What is the value of upload_tmp_dir in PHP? For MAMP it should default too: /Applications/MAMP/tmp/php

Yup. I also made sure that /Applications/MAMP/tmp/php is writable.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...