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



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 wrote:

> 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 can be handled with latin1.
> 
>
>
>
Take a look at:
https://github.com/zendframework/zf2/pull/2105
https://github.com/zendframework/zf2/pull/2399

It might be what you're looking for.


-- 
  __
 /.)\   +48 695 600 936
 \(./   abod...@gmail.com


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: fw-general-unsubscr...@lists.zend.com




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  wrote:

> 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 whoever has the same issue: do not use the windows installer for PHP
> never ever!
>
> Thanks and regards,
>
> Ralf
>
> --
> List: fw-general@lists.zend.com
> Info: http://framework.zend.com/archives
> Unsubscribe: fw-general-unsubscr...@lists.zend.com
>
>
>


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 whoever has the same issue: do not use the windows installer for PHP
never ever!

Thanks and regards,

Ralf

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@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

http://twitter.com/Ocramius

http://ocramius.github.com/



On 24 October 2012 16:14, Ralf Eggert  wrote:

> 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
> Info: http://framework.zend.com/archives
> Unsubscribe: fw-general-unsubscr...@lists.zend.com
>
>
>


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
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




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  wrote:

> 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 the
> installer. Installed PHP as an Apache module and as CGI. I configured
> php.ini. I copied the php_int.dll and the icu*46.dll all over the place.
> I digged my way through the error logs. Nothing worked. Nothing.
>
> Maybe someone is working on Windows 7 with PHP 5.3.18 and Apache 2.2 and
> got the ext/intl to be loaded properly and could give me a hint, a link
> or anything to keep me from getting more and more frustrated...
>
> Thanks,
>
> Ralf
>
> --
> List: fw-general@lists.zend.com
> Info: http://framework.zend.com/archives
> Unsubscribe: fw-general-unsubscr...@lists.zend.com
>
>
>


[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 the
installer. Installed PHP as an Apache module and as CGI. I configured
php.ini. I copied the php_int.dll and the icu*46.dll all over the place.
I digged my way through the error logs. Nothing worked. Nothing.

Maybe someone is working on Windows 7 with PHP 5.3.18 and Apache 2.2 and
got the ext/intl to be loaded properly and could give me a hint, a link
or anything to keep me from getting more and more frustrated...

Thanks,

Ralf

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.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:
layout()->setTemplate('layout/error'); ?>




--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/ZF2-Disable-layout-for-404-error-page-tp4657694p4657765.html
Sent from the Zend Framework mailing list archive at Nabble.com.

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




[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.

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




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';

$appConfig = array_merge_recursive($appConfig,$localAppConfig);

}

 



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

2012-10-24 Thread Marco Pivetta
Yes, the `.local` file would contain `http://twitter.com/Ocramius

http://ocramius.github.com/



On 24 October 2012 10:57, Matus Zeman  wrote:

> 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  >wrote:
>
> > 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 'config/application.config.local.php';
> > if(is_array($localAppConfig)){
> > $appConfig =
> > array_merge_recursive($appConfig,$localAppConfig);
> > }
> > }
> >
> > // Run the application!
> > Zend\Mvc\Application::init($appConfig)->run();
> >
> >
> > --
> > List: fw-general@lists.zend.com
> > Info: http://framework.zend.com/archives
> > Unsubscribe: fw-general-unsubscr...@lists.zend.com
> >
> >
> >
>


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 wrote:

> 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 'config/application.config.local.php';
> if(is_array($localAppConfig)){
> $appConfig =
> array_merge_recursive($appConfig,$localAppConfig);
> }
> }
>
> // Run the application!
> Zend\Mvc\Application::init($appConfig)->run();
>
>
> --
> List: fw-general@lists.zend.com
> Info: http://framework.zend.com/archives
> Unsubscribe: fw-general-unsubscr...@lists.zend.com
>
>
>


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

http://twitter.com/Ocramius

http://ocramius.github.com/



On 24 October 2012 10:45, Christian Ebert  wrote:

> 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 'config/application.config.local.php';
> if(is_array($localAppConfig)){
> $appConfig =
> array_merge_recursive($appConfig,$localAppConfig);
> }
> }
>
> // Run the application!
> Zend\Mvc\Application::init($appConfig)->run();
>
>
> --
> List: fw-general@lists.zend.com
> Info: http://framework.zend.com/archives
> Unsubscribe: fw-general-unsubscr...@lists.zend.com
>
>
>


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 'config/application.config.local.php';
if(is_array($localAppConfig)){
$appConfig =
array_merge_recursive($appConfig,$localAppConfig);
}
}

// Run the application!
Zend\Mvc\Application::init($appConfig)->run();


-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com




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')) {
$localConfig = include 'config/application.local.php';
$configuration = array_merge_recursive($configuration, $localConfig);
}

Matus

On Wed, Oct 24, 2012 at 9:26 AM, Christian Ebert wrote:

> 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
> (development) environment only? I already tried to add them in local.php,
> but that does obviously not work. Is there any dedicated mechanism to
> provide them more or less automatically similar to global.php/local.php
> logic with the config settings? I came up with the following solution in
> index.php but would love to see a more elegant solution:
>
>
>
> $appConfig = require 'config/application.config.php';
>
>
>
> if(file_exists('config/autoload/local.php')){
>
> $localAppConfig = require 'config/autoload/local.php';
>
> if(is_array($localAppConfig) AND
> array_key_exists('modules',$localAppConfig)){
>
>// specific modules for development
> environment are loaded before general available modules are loaded
>
> $appConfig['modules'] =
> array_merge($localAppConfig['modules'],$appConfig['modules']);
>
> }
>
> }
>
>
>
> // Run the application!
>
> Zend\Mvc\Application::init($appConfig)->run();
>
>
>
> Best Regards
>
> Christian
>
>


[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
(development) environment only? I already tried to add them in local.php,
but that does obviously not work. Is there any dedicated mechanism to
provide them more or less automatically similar to global.php/local.php
logic with the config settings? I came up with the following solution in
index.php but would love to see a more elegant solution:

 

$appConfig = require 'config/application.config.php';

 

if(file_exists('config/autoload/local.php')){

$localAppConfig = require 'config/autoload/local.php';

if(is_array($localAppConfig) AND
array_key_exists('modules',$localAppConfig)){

   // specific modules for development
environment are loaded before general available modules are loaded

$appConfig['modules'] =
array_merge($localAppConfig['modules'],$appConfig['modules']);

}

}

 

// Run the application!

Zend\Mvc\Application::init($appConfig)->run();

 

Best Regards

Christian