Giter Site home page Giter Site logo

Comments (10)

xeoncross avatar xeoncross commented on August 21, 2024

The locale class is actually two core functions (wrappers for the PHP ICU library) and the PHP gettext extension.

_() gettext 
__() MessageFormatter
__date() DateFormatter wrapper

Together, those provide localization and support for ICU choices or locale aware dates.

from micromvc.

PHLAK avatar PHLAK commented on August 21, 2024

I'm getting similar problems as @filip-avocado, after installing MicroMVC for the first time I'm seeing the following in my error logs:

[Tue Nov 29 15:16:06 2011] [error] [client 127.0.0.1] PHP Warning:  require(/home/chris/workspace/Miscellaneous/micromvc/Class/Locale.php): failed to open stream: No such file or directory in /home/chris/workspace/Miscellaneous/micromvc/Common.php on line 98
[Tue Nov 29 15:16:06 2011] [error] [client 127.0.0.1] PHP Fatal error:  require(): Failed opening required '/home/chris/workspace/Miscellaneous/micromvc/Class/Locale.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/chris/workspace/Miscellaneous/micromvc/Common.php on line 98

from micromvc.

EvanDotPro avatar EvanDotPro commented on August 21, 2024

You need PHP's intl extension. You can install it via pecl or your distribution's packages. This should make the Locale class available so it doesn't try to hit micromvc's autoloader.

Example (pecl):

sudo pecl install intl

Example (Fedora / RHEL / CentOS):

sudo yum install php-intl

Example (Debian/Ubuntu):

sudo apt-get install php5-intl

from micromvc.

PHLAK avatar PHLAK commented on August 21, 2024

Thanks @EvanDotPro, that fixed it.

from micromvc.

miles-x avatar miles-x commented on August 21, 2024

i use the wamp and enable php_intl, but this problem also exist;

Warning: require(H:\Wamp\www/Class/Locale.php) [function.require]: failed to open stream: No such file or directory in H:\Wamp\www\Common.php on line 98

from micromvc.

xeoncross avatar xeoncross commented on August 21, 2024

@togeak you should check with the WAMP developers. However, I'm sure that it's probably not loading right. Make sure you have the right build version, and make sure it's being loaded correctly. You can create a file and <?php phpinfo(); in it to see what is loaded and what version of PHP you are using.

from micromvc.

miles-x avatar miles-x commented on August 21, 2024

Wamp 2.2 / PHP 5.3.8

from micromvc.

miles-x avatar miles-x commented on August 21, 2024

c:\Program Files\PHP is not in the %PATH%, thanks!

from micromvc.

johnpbloch avatar johnpbloch commented on August 21, 2024

Figured I'd add this here in case anybody needs the knowledge later.

If you're trying to get this running locally on OS X 10.7.4 (using the installed Apache and PHP, not Mamp), it's not difficult.

At first I tried a standard sudo pecl install intl, but it couldn't find the ICU libraries (because they didn't exist). So I needed to install ICU

Just go to http://site.icu-project.org/download and download the latest release (49.1.1 as of writing this). Then install from source like so:

cd path/to/icu/sources
cd source
chmod +x runConfigureICU configure install-sh
./runConfigureICU MacOSX
gnumake
sudo gnumake install

And you're done. Run sudo pecl install intl and it should work just fine. Use the default location for the ICU libraries (mine didn't say where the default location was, just that it was the default).

from micromvc.

 avatar commented on August 21, 2024

Hint for Windows/Xampp users (like me): copy all the icu* files from /xampp/php/ folder to /xampp/apache/bin/
and add the line extension=php_intl.dll to your php.ini

[Original hint from apachefriends.org forum ]

from micromvc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.