Copy link to clipboard
Copied
I am building a dev machine and recently installed CF2023 in Developer mode (Windows 11 Pro).
Everything was working correctly - I could login to CF, added some sites to IIS, was able to access those sites locally and from a test machine.
So, I then proceeded to set the alias for the CF_SCRIPTS folder (and added server mapping and MySQL datasources).
I am now unable to login to the CF Admin (trying to login locally on the Win 11 Pro machine). I can see the CF Admin login page, but the ID is prefilled (admin) and nothing happens after entering the correct password and clicking Login.
The Coldfusion-out.log file indicates:
Error [main] - Unable to install ajax package: java.lang.Exception: Script folder C:\ColdFusion2023\cfusion\wwwroot\[MY-SCRIPT-FOLDER-NAME] not found. Ajax package has been downloaded at C:/ColdFusion2023/bundles/ajax-2023.0.05.330608.zip. If you have created a mapping of cf_scripts folder, you can copy the contents of the downloaded zip into CF_SCRIPTS/scrips/ajax folder
I copied the contents of ajax-2023.0.0.5.330608.zip to C:\ColdFusion2023\cfusion\wwwroot\cf_scripts\scripts\ajax with the same results.
Is cfusion\wwwroot\cf_scripts supposed to be renamed to cfusion\wwwroot\[MY-SCRIPT-FOLDER-NAME] ?
I was under the understanding that the CF_SCRIPTS alias was only set in the CF Admin console and the actual folder name on the disk does not change.
My CF2021 installaton on a third party host matches my expectation - the alias is set in the CF Admin console but the folder name on the drive is still CF_SCRIPTS.
Thanks
I had expected you would do the following:
Copy link to clipboard
Copied
You say, "...I then proceeded to set the alias for the CF_SCRIPTS folder (and added server mapping and MySQL datasources).".
However, when I read that, it is unclear to me what you actually did.
Could you please explain what you actually did, for example, in steps.
Copy link to clipboard
Copied
I run into the issue when changing the "Default ScriptSrc Directory" in the CF Admin.from the default. Do I need to move/create a system/OS alias for C:\ColdFusion2023\cfusion\wwwroot\cf_scripts\scripts, too?
Thanks
Copy link to clipboard
Copied
@rainmakr As @BKBK mentioned, please let us know where you made the change.. CF Admin can be impacted if you changed "" which I mentioned in my screenshot below, then you can recover it from neo-runtime.xml
1. First go to \ColdFusion2023\cfusion\lib
2. Take the backup of "neo-runtime.xml" and then open the file
3. Search for "CFFormScriptSrc" and add this string value "/cf_scripts/scripts/"
4. Save the changes and restart ColdFusion.
If you are planning to move the cf_script folder from ColdFusion directory and trying to create an Alias for the same, please let us know.
Copy link to clipboard
Copied
Yes, that resolved my issue with not being able to login.
I must be missing an alias, but don't recall setting an alias when I setup my CF2021 instance (this is CF2023).
I run into the issue when changing the "Default ScriptSrc Directory" in the CF Admin. I run into the login issue when I change it from the default. Do I need to move or create a system/OS alias for C:\ColdFusion2023\cfusion\wwwroot\cf_scripts\scripts, too?
Copy link to clipboard
Copied
I had expected you would do the following:
Copy link to clipboard
Copied
Thank you!
Sorry for the delay in responding. Yes, I was not setting new directory correctly in the Admin panel.
Follow-up question - The issue above was for CF2023. My CF2021 server has the Default ScriptSrc Directory set to [MyScriptDir] but the actual Scripts folder still lives in C:\ColdFusion2021\cfusion\wwwroot\cf_scripts\scripts. Everything seems to work correctly in CF2021 - no login errors and no website errors.
Is this expected behavior for cf2021 and a difference between cf2021 and cf2023, or do I potentially have something misconfigured in cf2021?
Thanks!
Copy link to clipboard
Copied
I don't think changing the default ScriptSrc directory value also changes the physical location of the installed files. I think it changed the attribute CF puts in your code. You have to make sure that your web server exposes the new physical location corresponding to the new attribute value so the browser can reach them.
Copy link to clipboard
Copied
Could it be that the CF2021 installation is using a mapping of some sort? One way to find out: run the following on a CFM page
<cfset scriptsDirPath=expandPath('\MyScriptDir')>
<cfif directoryExists(scriptsDirPath)>
<cfoutput>
<p>The scripts directory is #scriptsDirPath#.<p>
</cfoutput>
<cfelse>
<cfoutput>
<p>The scripts directory #scriptsDirPath# does not exist.<p>
</cfoutput>
</cfif>
Copy link to clipboard
Copied
In CF2021 I have set the Default ScriptSrc Directory to [MyScriptDir]
I ran your sample script above, using [MyScriptDir]
And I get what I expected (but might not be ideal):
C:\ColdFusion2021\cfusion\wwwroot\cf_scripts\scripts
HackMyCF does not report any issues (and I know it would report an issue if the Default ScriptSrc Directory in the Admin interface had not be changed).
Thanks for the help!