I was seeing some very strange routing behavior yesterday, when i
tried to upload an update of my cake application to my production
server.
I went trough the regular "mod_rewrite" and "index.php" dance, but
couldn't find out what was wrong since the old version of my
application is still working, with the exact same values.
The old version of my application uses Cake 1.1.x.x, and the new one
uses version 1.2.x.x.

I think i tracked the problem down to the server variables.
On my production server i get two variables called:
ORIG_PATH_TRANSLATED and ORIG_SCRIPT_NAME.
I tried to google these variables, but didn't find much information.
Someone seemed to believe that it has something to do with mod_rewrite
and phpsuexec, but i don't know. I don't own the production server, so
i can't do much about it anyway.

The ORIG_PATH_TRANSLATED variable seems to hold the same info as
PHP_SELF does on my development server, while PHP_SELF on the
production server holds the whole URL from the address bar.

After some googling i realised that cakephp sets the basedir in the
dispatcher class, and i tried to change from:    $base =
dirname(env('PHP_SELF')); to $base =
dirname(env('ORIG_PATH_TRANSLATED'));
 in dispatcer.php.

At first glance, this seems to make my application work on the
production server, but I haven't tested it very thoroughly yet.
I will, put my page trough some more tests, and see if it still works.
I don't like to change the cakelibs, so I'm thinking about filing a
bug report on this, but I'm wondering if I'm the only one with these
server variables?

Anyone who knows something about this?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to