CakePHP 3.0 not running without intl extension

久未见 提交于 2019-12-11 01:45:33

问题


I am trying to install and run a CakePHP 3.0 project on a shared host.
However, CakePHP 3.0 requires php-intl extension, but the hosting provider has denied me to install/enable intl extension on the shared hosting.

How can I run CakePHP 3.0 without intl extension ?

Is there anyway to disable it in CakePHP? Or is there any alternative that I can use ?

I am into a big trouble. Please help...


回答1:


if there are still problem to install php_intl, try next plugin: https://github.com/hraq/cake-intl

That won't give any intl functionality, but will allow you to use Cake in server where can't use php_intl for some reason.




回答2:


In both XAMPP and WAMP, mcrypt and mbstring extensions are working by default.

In XAMPP, intl extension is included but you have to uncomment extension=php_intl.dll in php.ini and restart the server through the XAMPP Control Panel.

In WAMP, the intl extension is “activated” by default but not working. To make it work you have to go to php folder (by default) C:\wamp\bin\php\php{version}, copy all the files that looks like icu*.dll and paste them into the apache bin directory C:\wamp\bin\apache\apache{version}\bin. Then restart all services and it should be OK.

http://book.cakephp.org/3.0/en/installation.html#requirements




回答3:


You have three options:

1). Don't use CakePHP.

2). Don't use that host.

3). Write a compatibility class that covers all the aspects of php-intl that get used in a way that complies with your host's restrictions.

This is simply because your host will not support something it doesn't already support. It may be possible for you to call them and ask politely for them to allow you to use that extension - but it is not likely they will provide a solution for you.

Therefore, without that extension, you cannot use Cake-PHP - and the only other option would be to write your own compat class - which, since that would be a huge PITA - I only included that to emphasize that you should only consider the other two options.




回答4:


CakePHP 3 doesn't work without, Intl extension is required, look to cookbook: http://book.cakephp.org/3.0/en/installation.html#requirements




回答5:


Yes you need INTL to run cakephp 3.

You can try following :

http://coolestguidesontheplanet.com/upgrade-to-php-5-4-or-5-5-mac-osx-10-8-mountain-lion/

Then change path in php.ini, for example

extension_dir = "/usr/local/php5-5.4.32-20140828-070730/lib/php/extensions/no-debug-non-zts-20100525"

extension = mcrypt.so

extension = intl.so




回答6:


Just open php.ini file and look around below this line: [ExtensionList]

You must see this line: extension=php_intl.dll. if not, please add it :)




回答7:


if you have a bitnami mamp image (for Mac OS) then uncomment the php_intl.so line in php.ini instead of php_intl.dll




回答8:


Solution

  1. Open /xampp/php/php.ini
  2. Change ;extension=php_intl.dll to extension=php_intl.dll (remove the semicolon)
  3. run composer update


来源:https://stackoverflow.com/questions/27746819/cakephp-3-0-not-running-without-intl-extension

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!