How can you install php in git bash? Is there a sudo cmd for it? Just some background, I am running sudo ./file name
and it requires PHP.
EDIT: I didn’t put this in #code-help because it isn’t code.
How can you install php in git bash? Is there a sudo cmd for it? Just some background, I am running sudo ./file name
and it requires PHP.
EDIT: I didn’t put this in #code-help because it isn’t code.
Windows and git-scm.com git bash, I assume?
Side note: things like git bash are just shells, they aren’t the actual environment things run in
Yup! I am running Git Bash as administrator on my Windows PC
Thank you but that won’t work because I am using bash, not CMD Prompt.
Then why not just use command prompt? Windows comes with command prompt by default.
Because I have to do sudo
and that doesn’t work there.
Try using cygwin and not using sudo
(sudo
is just a way to run commands as root, and cygwin can be installed without root, so root isn’t needed to install programs in cygwin)
Yeah but there has to be a way to get PHP in Git Bash
Have you tried out sudo apt-get install php
?
Also I think you should be at least using WSL because that’s more designed for linux things than git bash lol
git bash is literally just bash on windows computers, but with git autocomplete and things like that.
Why would windows have apt-get? And are running Linux, but with windows?
try this
winget install ApacheFriends.Xampp.8.2
Testing this right now! Fingers crossed that it works ! Do I need to add it to the directory thing on my PC?
Search for ‘environment variables for your account’ in the start menu, enter and add ;C:\xampp\php
to the Path
variable. Then you should be able to use php
commands
Ok so I figured it out yesterday. The steps are:
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.