I want to run PHP (5.2.5) on WAMP as the administrator user on Windows 8. Currently when I run exec("whoami") it returns "nt authority/system". I want it to run as the Administrator (or more precisely "aaron-desk/administrator") so that I have the correct permissions to run a command line program (TileMill).
I have tried running WAMP as the administrator, but PHP still runs exec() under the system username.
I have also tried setting up services.msc to run the wampapache and wampmysqld services as Administrator (instead of Local System), but when I do this they fail to run. There is a login error. I have an empty Administrator password but it does not work for these services when I apply it in services.msc.
I am running Windows 8 Pro as the administrator.
This gives instructions how to do it in French. You download and install setacl. And then run:
setacl -on "wampapache" -ot srv -ace "n:Username;p:start_stop,read" -actn ace
setacl -on "wampmysqld" -ot srv -ace "n:Username;p:start_stop,read" -actn ace
WampServer forum
Related
i have a server that have 2 hard drive, i have install cpanel on home directory and some of website are in home2
also my server is cent os 7.9
now my issue is when install for example ffmpeg on server, site on home can use it in php shell_exec but site in home2 can't use and get error command not found
i add user of site in home 2 to wheel group and if i connect using ssh ,it work with ffmpeg command but if i try using shell_exec or cpanel terminal it's return command not found error
what is the problem? can any one help?
I am very new to using XAMPP. I have configured in my settings for XAMPP to start automatically during windows start up.
Normally in my shell in XAMPP, i do this command always
cd users/documents/myapp
users/documents/myapp: php artisan serve
Is there a way that i can make my XAMPP run this command anytime its auto starts on my computer?
PS: Apologies for my bad english and i am newbie to XAMPP and server side stuff
After reinstalling macOS, I started setup my dev environment based on Laracasts "Setup a mac dev machine from scratch". At the previous time when I installed php/valet/composer etc, everything was fine, but now the terminal (in every new session) always asks password when I type valet.
I added the composer path to .zshrc
export PATH=$HOME/bin:/usr/local/bin:$HOME/.composer/vendor/bin:$PATH
In order to get this going you can run the following command:
$ valet trust
This will let you enter the password once, and remember it.
Using the trust command, you indicate that the current machine can be trusted for development, and Valet will stop asking for the password.
Your macOS native apache might be running, try stopping it
sudo apachectl stop
running sudo valet start fixed it for me.
So my environment is Windows server 2008 R2 with php 5.3 and 5.5 installed. I have set fastcgi.impersonate =1 in php.ini, and added the IIS_IUSRS to the Administrator group (that is not permanent, it was just a temporary action to try and eliminate problems).
If I run:
exec('dir',$output)
$output shows what I would expect. However, if I run
exec('shutdown -s -f', $output)
I get nothing from $output, and the machine does not shut down.
No errors/warnings are reported either.
I have tried putting that same command in a .bat file and running
exec('shutdown.bat',$output);
but it produces the same results as running the shutdown command via command line.
If I run the shutdown.bat file by double clicking it, or if I type the shutdown command in a cmd window, the machine will shut down. So I know that command is good. Obviously there is a higher permissions issue that I am missing, but I have no idea what it is.
So, I found out through much trial and tribulation that (at least in server 2008 r2 w/IIS7 ) executing the shutdown command from fast_cgi or php is not possible. I only had to install apache and execute the shutdown command under it, and the command worked perfectly.
I need to install xampp as a normal user and run PHP server with a non-default port.
I have changed the 'Listen 80' in ~/lampp/etc/httpd.conf to another port.
But when i start it using ~/lampp/lampp start, it complains
You need to start XAMPP as root!
Is there any way to run this without root login ?
You need to install xampp as root, but you can run as normal user.
Here is the step by step guides for the same.
http://forums.bizhat.com/linux-freebsd-opensource/41058-how-install-xampp-ubuntu-linux-running-normal-user.html