[fw-general] [ZF2] Enable additional modules in local development environment

2012-10-24 Thread Christian Ebert
Hi, I want to enable certain modules - e.g. developer tools - solely on the local development environment. Currently I am loading my modules using application.config.php in index.php as shown in the skeleton application. Which is the recommended way to add certain modules for the local

Re: [fw-general] [ZF2] Enable additional modules in local development environment

2012-10-24 Thread Matus Zeman
Hi Chris, It's (almost) same to what I do also - I don't think you might need something more elegant. // Get application stack configuration $configuration = include 'config/application.config.php'; //loads local config if available if(is_readable('config/application.local.php')) {

AW: [fw-general] [ZF2] Enable additional modules in local development environment

2012-10-24 Thread Christian Ebert
Hi Matus, great to hear. I modified my solution accordingly so that the logic is similar to the global.php/local.php solution and more fail-safe. $appConfig = require 'config/application.config.php'; if(is_readable('config/application.config.local.php')){ $localAppConfig = require

Re: [fw-general] [ZF2] Enable additional modules in local development environment

2012-10-24 Thread Marco Pivetta
Hey there, for such an use case, I wouldn't use is_readable, as it will cause a stat call in production environment. You can handle this via an environment variable or by always having application.config.local.php and not committing it to your source control system. Marco Pivetta

Re: [fw-general] [ZF2] Enable additional modules in local development environment

2012-10-24 Thread Matus Zeman
TBH I think more fail-safe solution is without is_array check - considering the contract of config file - it should always return an array. You would discover an error if some in the file quicker. On Wed, Oct 24, 2012 at 9:45 AM, Christian Ebert ebert.ch...@gmail.comwrote: Hi Matus, great to

Re: [fw-general] [ZF2] Enable additional modules in local development environment

2012-10-24 Thread Marco Pivetta
Yes, the `.local` file would contain `?php return array();` Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 24 October 2012 10:57, Matus Zeman matus.ze...@gmail.com wrote: TBH I think more fail-safe solution is without is_array check - considering the contract of

AW: [fw-general] [ZF2] Enable additional modules in local development environment

2012-10-24 Thread Christian Ebert
@Marco, Matus: You are right. I ended up with: $appConfig = require 'config/application.config.php'; if(getenv('APPLICATION_ENV') == 'development' AND is_readable('config/application.config.local.php')){ $localAppConfig = require 'config/application.config.local.php';

[fw-general] Re: application route not working for me

2012-10-24 Thread debussy007
Sorry, I think it was a problem with my cache or something... got it working -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/application-route-not-working-for-me-tp4657748p4657764.html Sent from the Zend Framework mailing list archive at Nabble.com. --

[fw-general] Re: [ZF2] Disable layout for 404 error page

2012-10-24 Thread Bart van der Linden
You can also set the layout in the 404 script. This could be a save layout with no calls to the url-viewhelper or other helpers that rely on RouteMatch. First line of your 404-script: ?php $this-layout()-setTemplate('layout/error'); ? -- View this message in context:

[fw-general] Get ext/intl on Windows 7 up and running

2012-10-24 Thread Ralf Eggert
Hi, I know this is not really the right place for this question, but I am frustrated. To use Zend\I18n on a Windows 7 machine I need to geht ext/intl to work. I spent a couple of hours but did not manage to solve this. I used PHP 5.3.18. I used the thread safe and non thread safe version. I used

Re: [fw-general] Get ext/intl on Windows 7 up and running

2012-10-24 Thread Marco Pivetta
Heya, I have 5.3.14 on the windows box and it works just fine. I don't trust the box anyway, but I just copied the files from http://downloads.php.net/pierre/ Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 24 October 2012 16:04, Ralf Eggert r.egg...@travello.de

Re: [fw-general] Get ext/intl on Windows 7 up and running

2012-10-24 Thread Ralf Eggert
Hi Marco, I have 5.3.14 on the windows box and it works just fine. I don't trust the box anyway, but I just copied the files from http://downloads.php.net/pierre/ Thanks for your reply. But which of these many files are you talking about? Regards, Ralf -- List: fw-general@lists.zend.com

Re: [fw-general] Get ext/intl on Windows 7 up and running

2012-10-24 Thread Marco Pivetta
Oh, snap, wait... I have PHP 5.3.14 TS (`php --info | grep Thread` tells you that). Looks like there's no compiled intl on that list. Try downloading the zip from http://windows.php.net/download/ . Each zip file has a `php_int.dll` file in the `ext/` dir. Marco Pivetta

Re: [fw-general] Get ext/intl on Windows 7 up and running

2012-10-24 Thread Ralf Eggert
Hi Marco, well, the problem is not the missing php_intl.dll file. It was always there whatever I installed. No I skipped the installer and used the zip packages as you suggested. And guess what? It almost worked out of the box. I don't understand it since the php.ini looks almost the same. So

Re: [fw-general] Get ext/intl on Windows 7 up and running

2012-10-24 Thread Marco Pivetta
There's another solution, but it comes from the usual why Windows debate ;) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On 24 October 2012 16:58, Ralf Eggert r.egg...@travello.de wrote: Hi Marco, well, the problem is not the missing php_intl.dll file. It was

Re: [fw-general] Get ext/intl on Windows 7 up and running

2012-10-24 Thread Ralf Eggert
Hi Marco, well, I am working on Ubuntu since years. But while working on my book I at least want to test all the stuff on Windows for the users who are need to / want to develop on Windows. Regards, Ralf -- List: fw-general@lists.zend.com Info: http://framework.zend.com/archives Unsubscribe:

Re: [fw-general] [ZF2] Set default encoding to ISO in Zend Framework 2

2012-10-24 Thread Artur Bodera
On Tue, Oct 23, 2012 at 3:36 PM, Christian Ebert ebert.ch...@gmail.comwrote: Hi Artur, ** ** sorry for my previous reply. This was stupid. Latin1 of course cannot handle utf-8 characters beyond ASCI. But it should work if we restrict the input provided by users to the characters which

AW: [fw-general] [ZF2] Set default encoding to ISO in Zend Framework 2

2012-10-24 Thread Christian Ebert
Hi Artur, especially the 2nd one looks interesting. Thanks