Copy link to clipboard
Copied
I have a site that is written in CF and running on Windows server.
The question I have is, if I wanted to run it on Linux would the code literally port over or is there a chance I will run into problems?
Maybe issues with case sensitivity which does not generally effect me in Windows so I did not pay a lot of attention to it
Thanks
Mark
Copy link to clipboard
Copied
Hello ACS,
Thank your for your post. The behavior of CF is exactly the same on Windows, as in Linux. We don't think you would face any issues, while moving from Windows to Linux. Please check the Support Matrix for CF 10 http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/products/coldfusion/pdfs/cf10/coldfusi... before moving over.
Please make sure, that you take a snapshot/backup of your complete server, before you migrate.
Regards,
Anit Kumar
Copy link to clipboard
Copied
Will the fact that I did not pay attention to case in the windows version cause any issues?
Thanks
Mark
Copy link to clipboard
Copied
Hello Mark,
No ColdFusion functions/code are case sensitive. The behavior of the code remains the same, irrespective of the Operating System.
Regards,
Anit Kumar
Copy link to clipboard
Copied
Excellent, thanks!
I did find a document on a search that said there were issues with things like the naming of files, that application.cfm had to be Application.cfm , is that no longer an issue?
All my file names are lower case.
Copy link to clipboard
Copied
Although Windows is case-insensitive, you must always start the Application.cfc filename with an uppercase A. Both application.cfc and Application.cfc are reserved words.
If your application runs on a UNIX platform, which is case-sensitive, spell Application.cfc, Application.cfm, and OnRequestEnd.cfm with capital letters.
Hope this answers your query.
Regards,
Anit Kumar
Copy link to clipboard
Copied
ok, so there would be some issues, as I always use application.cfm not Application.cfm , are there any other small issues?
Thanks
Mark
Copy link to clipboard
Copied
We are migrating from Windows to Linux (Ubuntu) and there is a massive issue with component names and paths in wrong case. The case in code is whatever each programmer happened to write in. On windows no problem, on Unix -> errors all over the place.
Is there a configurative way to fix this?
Any other good ideas how to fix this? The codebase is 20 years old and there is a lot of code.
Thanks
k
Copy link to clipboard
Copied
Keimo (and to Mark, asking before you in this thread, from 6 years before): there's no easy way around the case-sensitivity of file names and paths in Linux, if by which you mean some switch in CF that makes it case-insensitive.
Someone may propose that a urlrewrite feature of your web server could make all requests coming in be entirely lower case, but that's not your real problem. As you say, you are talking about component names.
But here's some good news. CF has long provided a BIT of a workaround here, in that with cfinvoke, cfobject, and createobject, when invoking a CFC on linux, it will first lowercase the filename, trying to find one that matches that. If it does not find it, then it will search for the exact case. (That order seems backward, but it's what is documented for all 3 of those. Also, the docs don't clarify if this applies to the folder as WELL as the path. I'd love to hear if anyone confirms that. I'm pressed for time to try that right now.)
And so if you would at least ensure that ALL YOUR CFC filenames (and I suspect folders) were lowercase, then you would at least not have to change your CODE. That's a bit easier to work with.
There's even a helpful tip of how to at least do the lowercasing of files in a folder in an automated fashion here:
https://stackoverflow.com/a/10522960/90802
That said, if you DO do that, then if any such files ARE requested via the web, you WOULD want to implement a url rewrite to lowercase them, because otherwise Apache WOULD fail to find them if the newly renamed case didn't match what was coming in.
You may, like the person there, want to push back on that idea at first. But perhaps you will, like he did, ultimately realize it's the seeming best workaround.
Let us know how it goes.
Copy link to clipboard
Copied
Charlie, thank you for your ideas. We'll continue our investigation. Also thank you for confirming that there is no "magic switch" in Coldfusion for the case issue.
Copy link to clipboard
Copied
I decided to stick with Windows, so not an issue for me anymore.
Mark