Symfony2 : How to make the php_intl extension available for Symfony2?
Asked Answered
L

3

6

I'm trying to follow this documentation on Symfony : http://symfony.com/doc/current/book/forms.html

ok so here is my thing, I've externalised my form and created a specific form class for handling the process and being able to reuse it.

So what happen when I submit the form, whatever the info are okay or not for my class, I get this fatal Error :

Fatal error: Call to a member function setAttribute() on a non-object in C:\Program Files (x86)\wamp\www\QNetworks\vendor\symfony\src\Symfony\Component\Form\Extension\Core\DataTransformer\NumberToLocalizedStringTransformer.php on line 130 Call Stack

I'm running with php 5.3.9 and my intl extension is installed and activated BUT when I run the app/check.php command I see :

[[WARNING]] Checking that the intl extension is available: FAILED

* Install and enable the intl extension (used for validators) *

So I don't understand what the problem with this extension. Should I reinstall it ? When I go here : http://php.net/manual/en/intl.requirements.php I see tht i can install the PECL or the ICU library, but i don't know if I should and if there is any relation with my problem ..

Lil answered 27/6, 2012 at 21:2 Comment(1)
I had the same problem on wamp server with php version 5.3.8. Fortunately turning off intl extention worked for me. It's workaround rather then solution but it's quick and it helps.Jeanett
D
2

Your Intl extention must be configured propertly. Check on your server if this really activated using phpinfo()

then on your php.ini activate logging:

[intl]
intl.error_level = E_WARNING
extension=php_intl.dll

and check logs

If it's activated maybe it's a malfunction. Try to redownload the dll into c:\PHP\ext\php_intl.dll

Ditmore answered 28/6, 2012 at 15:33 Comment(1)
Thanks, I've finally decided to reinstall wamp with the last version of php and it works now.Lil
S
1

take care you have two php.ini :

  • *wamp\bin\php\php5.3.13
  • *wamp\bin\apache\apache2.2.22\bin

you should uncomment extension=php_intl.dll in both.

Santossantosdumont answered 22/4, 2013 at 13:21 Comment(0)
T
-2

After enable intl extension, you need copy some files to apache bin directory. It could help you: http://www.youtube.com/watch?v=gtIcpdPzXiE

Traject answered 30/5, 2014 at 13:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.