Discussion:
Router routes.ini Linux/Windows/Mac differences
monk.e.boy
2011-07-28 10:43:58 UTC
Permalink
Hi,

We have a routes.ini file that looks like:

routes.abc.route = "tell-me-more/blog/:post_slug"
routes.abc.defaults.post_slug = ""
routes.abc.defaults.module = "default"
routes.abc.defaults.controller = "tellMeMore" ; <<--- LOOK
routes.abc.defaults.action = "blog"

This WORKS on WinXP and Mac but NOT on Linux (PHP 5.2) [[cat /proc/version
==
Linux version 2.6.18-164.11.1.el5 (mockbuild-t2f/um9L7dgfKqtzwNuTU2D2FQJk+8+***@public.gmane.org) (gcc
version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Wed Jan 20 07:39:04 EST
2010]]

routes.abc.route = "tell-me-more/blog/:post_slug"
routes.abc.defaults.post_slug = ""
routes.abc.defaults.module = "default"
routes.abc.defaults.controller = "tell-me-more" ; <<--- LOOK
routes.abc.defaults.action = "blog"

This works on all systems. Curious?!

Cheers,

monk.e.boy

--
View this message in context: http://zend-framework-community.634137.n4.nabble.com/Router-routes-ini-Linux-Windows-Mac-differences-tp3701008p3701008.html
Sent from the Zend Framework mailing list archive at Nabble.com.
--
List: fw-general-***@public.gmane.org
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscribe-***@public.gmane.org
Matthew Weier O'Phinney
2011-07-28 15:12:08 UTC
Permalink
Post by monk.e.boy
routes.abc.route = "tell-me-more/blog/:post_slug"
routes.abc.defaults.post_slug = ""
routes.abc.defaults.module = "default"
routes.abc.defaults.controller = "tellMeMore" ; <<--- LOOK
routes.abc.defaults.action = "blog"
This WORKS on WinXP and Mac but NOT on Linux (PHP 5.2) [[cat /proc/version
==
version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Wed Jan 20 07:39:04 EST
2010]]
routes.abc.route = "tell-me-more/blog/:post_slug"
routes.abc.defaults.post_slug = ""
routes.abc.defaults.module = "default"
routes.abc.defaults.controller = "tell-me-more" ; <<--- LOOK
routes.abc.defaults.action = "blog"
This works on all systems. Curious?!
This is actually documented. Controller and action _names_ for purposes
of the request and view scripts should not be camelCased or MixedCase --
they should use word separators ('-' or '.'). When done that way, we can
easily normalize the name, and then transform it to camelCase or
MixedCase when resolving class and method names.

So, 'tell-me-more' or 'tell.me.more' as a controller name will resolve
to class TellMeMoreController; as an action name, it would resolve to
tellMeMoreAction().
--
Matthew Weier O'Phinney
Project Lead | matthew-C1q0ot2/***@public.gmane.org
Zend Framework | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc
--
List: fw-general-***@public.gmane.org
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscribe-***@public.gmane.org
Loading...