I am new to Windows and I am trying to figure out what user Apache is running on. In Linux I had a simple command ps aux | grep apache
. How do I find that ou
By default the Apache services are registered to run as the system user (the LocalSystem account).
The section "Running Apache as a Service" in the help documentation below might help you configure Apache the way that you want to.
http://httpd.apache.org/docs/2.0/platform/windows.html
You can include a line of code in your PHP script:
echo exec('whoami');
In Powershell you can interrogate the registry for the user context the service is running under:
(Get-ItemProperty HKLM:\system\CurrentControlSet\Services\Apache2.4).ObjectName