How to determine the installed ColdFusion bitness - coldfusion

How can I determine if the installed ColdFusion server is 32 or 64 bit?
I would love to see an answer that solves my problem both from being logged in on the server and programmatically from CFML code.

Ok, not quite as straight-forward as I thought, but the information is there.
Programmatic Access
In all three CFML engines, you can programmatically access the JVM information via the server scope with Server.Os.Arch. This contains a value such as amd64 for 64-bit, and i386 or x86 for 32-bit systems.
On Railo (but not ACF/OBD) there is also Server.Os.ArchModel which simply contains 64 or 32 as appropriate.
For all three engines you can get this 64/32 value with: createObject('java','java.lang.System').getProperty("sun.arch.data.model")
Server Admin
In CF administrator, if you go to "Server Settings" > "Settings Summary" you can find the "Java VM Name" which contains Java HotSpot(TM) 64-Bit Server VM (or equiv for 32 bit).
In OpenBD administrator, select "Server" > "System Info" and the third option contains "Operating System", which includes amd64 on a 64-bit system, along with a link to "JVM properties", where you can find "java.vm.name" and "sun.arch.data.model" containing values for architecture name and bitness.
In Railo administrator, the "Overview" page (when you login) has an "Info" section which includes fields for both OS and JVM, each with either 64bit or 32bit after the version info.

Related

Virtual box not working - Macbook Pro 2020 M1, MacOS-Big Sur

I am trying to boot up a saved am using Macbook pro with M1 chip.
I tried the steps given at this answer. But was not able to boot up the VM. Can someone confirm this problem or already found out a solution to it?
I got the error "The virtual machine 'Ubuntu 20.04 64bit 1' has terminated unexpectedly during startup with exit code 1 (0x1)." below:
Had the same issue on Mac OS Big Sur 11.4 when I was trying to add my Ubuntu instance (on Intel tho), nothing suggested here and other topics helped.
Turned out you have to give access (Full Disc Access) to Virtual Box in Settings. Go to Settings -> Security & Privacy -> Privacy -> Full Disc Access -> plus sign (unlock it if needed) -> choose Virtual Box Application -> Open.
After that I was able to choose my Ubuntu image in Finder.
<New user, reputation too low to comment on David's post!>
As per David Leitko's answer, VirtualBox is an x86 (more specifically, AMD64/x86_64) virtualization hypervisor. However, it appears from various discussions I've seen on this topic that many users don't really understand what this really means.
So, it means not only that VirtualBox only runs on x86 CPUs, but also that it requires all the other elements of the x86 platform. These include system memory, various bus controllers (PCI, USB), hard disk controllers, sound cards, graphics, BIOS/UEFI, etc. None of these take the same form on the Apple Silicon platform - i.e. they don't use any of the standards built up in the PC ecosystem over the last 40 years.
So, not only will VirtualBox not work on Apple Silicon, it will never work on Apple Silicon. There will never be any way to run a VirtualBox image that ran on an Intel Mac on an Apple Silicon Mac. Ever.
The canonical discussion thread on the VirtualBox forums that covers this in more detail is here.
VirtualBox is an x86 virtualization hypervisor. It only runs on an x86 platform. See https://www.virtualbox.org
While Rosetta 2 will run many x86 apps very well on an M1 Mac, virtualization products are not supported per this Apple document
I just had the exact same problem after updating my VirtualBox app on MacOS Big Sur. What worked for me was to go to System Preferences - Security & Privacy - General, and then click the Allow button to allow extensions by Oracle (first click the lock symbol in the lower left of the screen and enter your password).
Actually, during installation I got this pop-up window telling me to do this, but I wasn't quite sure what exactly it wanted me to do. Only after getting this error I took the trouble of looking closer, ahem...
Hope this will fix your problem too!

VirtualBox - Kernel requires an x86-64 cpu but only detected an i686 cpu

Intel i5-2410M CPU running at 2.30 GHz running a Windows 7 64-bit operating system.
I have VirtualBox 4.13 installed.
I am trying to run ubuntu-14.04-desktop-amd64.iso but I get an error
this kernel requires an x86-64 cpu but only detected an i686 cpu
I even enabled the Intel Virtualization in the BIOS settings and then tried to use the image again but I still get the same error.
Is there any other reason why I can't use the image?
My best guess is that you somehow configured the VM for 32 bit execution instead of 64.
Can you share the XML machine configuration file (usually in your home directory - something like C:\Users\Goyuix - in a folder called VirtualBox VMs. There should be a folder for the Ubuntu VM you are creating with a file vm-name.vbox. You should be able to find an XML tag called Machine that holds that definition. Here is the relevant tag from one of my config files:
<Machine
uuid="{5c71850d-9ead-4b1f-b8b2-9f147f3a70ac}"
name="Ubuntu"
OSType="Linux26_64"
snapshotFolder="Snapshots"
lastStateChange="2014-07-19T23:16:57Z">
Pay special note to the third attribute OSType how it has a _64 at the end. I would suggest when creating a VM for Ubuntu 14.04 64-bit to use a VM type = Linux and Version = Ubuntu (64 bit).
The issue is your virtualization is disabled from BIOS setting.
I came across same issue but enabling Virtualization from BIOS worked. I am working on Windows 10. Initiallty you can disable windows Hyper option from control panel->Program and Features->Turn windows features on or off->un-select Hyper-V. save this settingsNow go to BIOS setting-> select Advance option->Here you can see virtualization option just enable this option and reboot your machine saving your settings.Delete any VirtualBox which is present earlier that caused issue. Now click on New option of your VirtualBox you can see option to install 64-bit operating systems.

linux development on windows

We develop C++ code primarily on a headless linux x64 server with VI. We are provided with windows desktops and I was wondering how others in similar situation work? Do you just use windows to remote into linux box or is there a way to develop on windows.
Two solutions that come to my mind are:
Run a linux VM on windows desktop.
Cygwin. (not sure about it).
Any others?
There is a VIM port for windows. As an everyday user I can say that the experience is seamless, except for using windows path separators.
There are other options to consider:
MSYS supplies you with a set of GNU tools compiled natively for windows, including a shell, ssh/scp
MinGW gets you a Windows port of gcc.
UnxUtilx is another set of GNU tool ports, but with no recent activity.
As others have mentioned, putty gets you ssh/scp, purpose-built for windows.
The only C++ app I currently develop is Qt based and cross platform so I tend to develop in Windows using Visual Studio and then test on linux. For testing on linux I mostly use putty, vi and make but if I need to use a debugger I use nemiver and xming with putty exporting the x session to the PC for xming to render.
Do you just use windows to remote into linux box or is there a way to develop on windows. -- yes mostly I do that.
winscp is a tool that lets you do your text-editing locally in your editor of choice, whether it be emacs for windows or gedit or notepad, and save remotely.
When I worked in an environment like that, I installed Cygwin/X and putty on my windows box. You use putty to connect to the Linux box with the Connection --> SSH --> X11 --> "Enable X11 forwarding" turned on. You
Install Cygwin including Cygwin/X http://x.cygwin.com/ — download the installer, make sure the xinit package is selected in the things to install, and hit go!
Install PuTTY http://www.chiark.greenend.org.uk/~sgtatham/putty/ and enable X forwarding in your session settings. PuTTY will automagically set your DISPLAY environment variable correctly.
Start your X server on Windows (Start -> Programs -> Cygwin/X -> XWin Server ) — you may want to copy this to your Startup group so it runs whenever you log in.
Use PuTTY to connect to your *nix box and fire up an X Windows program — remember to "amp it off" http://www.catb.org/jargon/html/A/amp-off.html.
You can use whatever X programs are available on the Linux machine seamlessly on your local client desktop. You can do it with Eclipse or gvim or kate.
Another thing I've had good luck with is using Samba on the Linux box to share my source tree, and then mapping a drive in Windows to that share, using native Windows tools to edit it.

How to add redmonnt.dll using AddMonitor() under Windows 7 64 bit

I'm trying to register redmon monitor on Windows 7 64 bit. Here is an example of code I use:
MONITOR_INFO_2 info;
info.pName = "RedmonMonitor";
info.pEnvironment = "Windows x64";
info.pDLLName = "redmonnt.dll";
SetPrivilege("SeLoadDriverPrivilege",TRUE);
AddMonitor(NULL, 2, (LPBYTE)&info);
It works perfectly on WinXP with "Windows NT x86" environment specified. On Windows 7 AddMonitor() returns FALSE, GetLastError() returns 0.
At the moment of calling redmonnt.dll already copied to "C:\Windows\system32" (also it automatically appears at "C:\Windows\SysWOW64").
Also I experimented with Wow64DisableWow64FsRedirection() as suggested here, didn't help.
I tried "Windows NT x86" and "Windows x64" environment values.
Using thoughts from here regarding privileges tried to launch program as administrator, didn't help.
redmonnt.dll taken from redmon17 package from the official site.
SetPrivilege() taken from msdn examples with small modifications.
Would be grateful for any ideas on how to make this work.
Thank you.
Which version of redmonnt.dll you use? Is it 64-bit DLL or 32-bit version from the official site? The DLL will be loaded by spoolsv.exe which is 64-bit application on the 64-bit operation system. So you have to use 64-bit version of the DLL.

How to connect GraphEdit to my app's graph

I am trying to figure out how to get GraphEdit to show me my running graph from my app. I running windows 7 64bit.
In the directshow sdk samples they have a spot for registering with the rot. I read on M$'s site that I needed to register the droppage.dll(cant recall the exact name right now). So I did that, but still no dice.
Any idea's?
Remember that on a 64-bit machine, you will need to use the 64-bit graphedt and 64-bit proppage.dll for your 64-bit app (and 32-bit graphedt/proppage for a 32-bit app). And if you are in admin mode with VS, you will need to be in admin mode for graphedt.