简体   繁体   中英

intl php extension exception zend framework 2 shared hosting

I finally managed to deploy my ZF2 site to a shared (and also free) hosting.

Everything seems to be working the right way, except a section that has a form. This is the error I'm getting:

Uncaught exception 'Zend\Form\Exception\ExtensionNotLoadedException'
with message 'Zend\Form\View\Helper component requires the intl PHP extension' in
/.../vendor/zendframework/zendframework/library/Zend/Form/View/Helper/FormMonthSelect.php

In the form, there's a field where the user is supposed to select his/her birthday. I think that the problem is there.

How I'm i supposed to enable that extension in the server? Or at least, modify something in my zf2 application so it doesn't need that extension?

Your diagnosis is correct -- FormMonthSelect does require intl extension.

Managing php extensions is usually something done by sys admins, so you'd either ask the hosting company to enable it or try to squeeze that in through htaccess (iffy, edit .htaccess to load php extension? ). Other then that I can only advise not to use anything that relies on intl , so maybe a simple text field with date parsing done by you manually.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM