sphere wrote: ↑Mon Aug 26, 2019 6:18 pm
rabit wrote: ↑Mon Aug 26, 2019 3:23 pm
I can imagine that you are slowly but surely going cracy,
It must work, but yes a bit, nevertheless, it's not build for nothing.
You believe in it and have years spend. Maybe if it works and we fix this then maybe we can start building
Bugs can happen everywhere. Livecode itself has also some long standing bugs and we have to be patient else we should become better programmers and build software with C++ or whatever more difficult language.
The thing is that your server environment behaves quite different.
But with your friendly support we can find the required adjustments.
sphere wrote: ↑Mon Aug 26, 2019 6:18 pm
sUristring is index.lc\blog
sUriString should be “blog”
OK, let’s analyse this issue step by step. Following my assumptions.
According to your infos the value of $_SERVER["PATH_TRANSLATED"] is
C:\Portable\xampp\htdocs\lc\index.lc\blog
So, the value of the local variable sURIstring right after:
Code: Select all
if tUri is "PATH_TRANSLATED" then
put $_SERVER["PATH_TRANSLATED"] into sUriString
of the additional code in function _rigFetchUriString of URI.ivecodescript must be
C:\Portable\xampp\htdocs\lc\index.lc\blog
right? After the next 3 lines the backslashes in sUriString are replaced
with slashes, so the value is
C:/Portable/xampp/htdocs/lc/index.lc/blog
right? Then after line:
Code: Select all
put char offset("index" & gRigA["EXT"], sUriString) to -1 of sUriString into sUriString
the value of sUriString must be
index.lc/blog
right? After the next line:
Code: Select all
put "/" & item 2 to -1 of sUriString into sUriString
the value is
/blog
should be blog, but it doesn’t matter in this case. Anyway you should replace
this line with:
Code: Select all
put item 2 to -1 of sUriString into sUriString
After line:
Code: Select all
put rigUriAdjusted(sUriString) into sUriString
the value of sUriString is still
blog
Exact this value is used in handler _rigExplodeSegments of URI.livecodescript
which checks for disallowed characters in URI segments (in this case in “blog”)
using the _rigFilterUri() function. This function yields the “The URI you submitted has
disallowed characters.” error, in case a segment includes disallowed characters.
And this is the error you see because according to your info the value of sUriString
in your tests is “index.lc\blog” which of course includes disallowed characters.
But provided that my considerations are right how can sUriString be “index.lc\blog”?
How can sUriString include a backslash although backslashes are replaced?
Are you really sure that gConfig["uriProtocol"] in config.lc is set to "PATH_TRANSLATED”?