问题
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
- Open /xampp/php/php.ini
- Change ;extension=php_intl.dll to extension=php_intl.dll (remove the semicolon)
- run composer update
来源:https://stackoverflow.com/questions/27746819/cakephp-3-0-not-running-without-intl-extension