89523

Issue uploading image, call to undefined function finfo_buffer()

Question:

Trying to upload an image via a script based on Laravel framework and coming across this error:

Call to undefined function Intervention\Image\finfo_buffer() * Checks if string contains binary image data * * @param mixed $input * @return boolean */ private function isBinary($input) { $mime = finfo_buffer(finfo_open(FILEINFO_MIME_TYPE), (string) $input); return substr($mime, 0, 4) != 'text'; }

I'm not really that well versed on Laravel so would appreciate some help.

Regards

Answer1:

You need fileinfo extension enabled for your PHP. See <a href="http://github.com/Intervention/image/issues/131" rel="nofollow">Call to undefined function Intervention\Image\finfo_buffer()</a>.

<blockquote>

olivervogel commented on May 20:

ext-fileinfo is now required for installation.

</blockquote>

Check your php.ini file to see if something along the line of extension=php_fileinfo.dll or extension=fileinfo.so is commented out. If so uncomment it and restart your web server.

Recommend

  • Quadratically constrained MIQP with julia and gurobi
  • Python - strings and integers in Numpy array
  • C++11(native code) vs Java(bytecode) [closed]
  • LuaJIT, how to convert cdata to userdata?
  • twitter: share link with parameters
  • Mongoose nested schema CastError
  • CakePHP3: How can I do text searching using full-text indexes
  • two interfaces, multiple inheritance combine into one container?
  • TreeView: checkboxes only in child nodes
  • How can I stub rand in minitest?
  • Aspell won't build on OS X 10.9 (Mavericks)
  • Connecting Couchbase sync adapter to couchdb server
  • dojo 1.9: what annotation does declare.safeMixin add?
  • Get pretty git rev name
  • PHP - sending email with attachment does not show message content
  • Backward compatibility of Python 3.5 for external modules
  • XSLT foreach repeating nodes to flat
  • Doctrine2 bulk import try to work with another entity
  • Does Apple allow the usage of sysctl.h within iOS applications?
  • Passing “get” parameters doesn't work, parameter not visible in the link
  • Hibernate to update table schema
  • How to access culture data in globalize.js V1.0.0
  • How to add git credentials to the build so it would be able to be used within a shell code?
  • OOP Javascript - Is “get property” method necessary?
  • Declaring variable dynamically in VB.net
  • Abort upload large uploads after reading headers
  • PHP - How to update data to MySQL when click a radio button
  • Submit form in a displaytag pagination
  • How do you troubleshoot character encoding problems?
  • Windows forms listbox.selecteditem displaying “System.Data.DataRowView” instead of actual value
  • Getting Messege Twice Using IMvxMessenger
  • embed rChart in Markdown
  • apache spark aggregate function using min value
  • Bitwise OR returns boolean when one of operands is nil
  • Sorting a 2D array using the second column C++
  • How to get NHibernate ISession to cache entity not retrieved by primary key
  • How can i traverse a binary tree from right to left in java?
  • How can I use `wmic` in a Windows PE script?
  • Unable to use reactive element in my shiny app
  • How can I use threading to 'tick' a timer to be accessed by other threads?