Copy link to clipboard
Copied
hi there
Running CF 9.0.1 un Windows based Apache 2.2.21. Apache and CF are runnign from C: something, Webroot is W:\ something.
CF is running in its own User Account and it HAS the right to access the UNC resource.
Apache has an alias like this
Alias /assets/ "//nas-3/temporary/assets/"
And we use this in CF code
frel = "/assets/000037/meintestpic.jpg";
fabs = ExpandPath (frel);
fabs is then
W:\WWW........\htdocs\assets\000037\meintestpic.jpg
Instead of the UNC path (//nas-3/temporary/assets/000037/meintestpic.jpg)
What do I have to do to get this working? Can't I rely on ExpandPath using such an setup?
Thanks for any pointers ... if this cannot be solved I have to rewrite a lot of code .. ;-(
Thank you.
Martin
Copy link to clipboard
Copied
Remove the trailing slashes.
Alias /assets "//nas-3/temporary/assets"
jason
Copy link to clipboard
Copied
It did not solve the issue. But I found it.
I sketch what I've done .. maybe others can use that info too.
Reason: For traditional reasons, we use Apache Configs for Aliases ... no mapping within CF itself because up to CF9 those mappings are global. Howerver, for UNC mappings, this seems to be the bad way.
Up to today, I had no idea how Apache and CF talk to each other on paths. Obvioulsy, CF ask Apache for a path resolution, but Apache as a System Service, was not able to verify the accessibility of the UNC path. Therefore, it or CF figured that they use the webroot of this vhost.
When I ran Apache as Administrator, it could access the UNC and therefore Apache and/or CF returned the correctly expanded path. Of course, we don't run Apache with more rights than the System Service. Resetting Apache to that also returned the wrong UNC expansion.
So, we now go with Mappings in CF itself. Since CF 10 allows for Per App Mappings, this is no longer a problem.
Martin
Copy link to clipboard
Copied
Well, still no solution under CF10 ... what works in CF 9.0.1 does not work in CF10 ... CF10 still resolves the UNC to a false path. it's anoying ... ok, customer's CF10 runs on WinServer 2k8 R2 ... my CF 9.0.1 on Win2k3
So not yet solved.