Symfony

Symfony 2.0 RC1 was released a few days ago, do not forget to grab it, it is very stable now! :)

Today I’m facing an error which made me crazy a few hours.

I’m trying to get the file upload on Symfony 2 done but never success on my Windows + wamp machine.

Yup, like what I’ve written on the subject, when I try to move the file using UploadedFile->move() and tell the framework to guess the file extension for me using UploadedFile->guessExtension().

It always return nil, the getExtension() is working but not useful at all because the uploaded file always be ended with tmp extension.

Even though I can’t found the solution after researched on Google for a few hours.

Until I try to dig into the symfony source code itself and I finally found it is using php_fileinfo extension!

So, I just resolve my issue by enabling the php_fileinfo extension from wamp and it works!

Wasted my few hours… Learn new things…

Tagged with:
 

Facebook comments:

5 Responses to Symfony2 File Upload Error – “guessExtension() always return nil”

  1. nymo says:

    Thanks for that! I also get stucked for hours with that problem…they should add a note in the documentation because it’s not a standard :)

    Regards nymo

  2. PPR says:

    Thank you so mutch for solving my issue !!! :D

  3. JediX says:

    Thank you so much, you saved my day !

  4. André Abt says:

    Thanks – worked for me too!

  5. loutre says:

    Thank you, usefull tips. Should be written in the official docmentation.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Looking for something?

Use the form below to search the site:


Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...

reverse phone lookupTattoo DesignsSEO