How to Install XAMPP on MacOS Ventura and configure path for PHP
HTML-код
- Опубликовано: 4 окт 2024
- XAMPP is a free and open-source cross-platform web server solution stack package developed by Apache Friends, consisting mainly of the Apache HTTP Server, MariaDB database, and interpreters for scripts written in the PHP and Perl programming languages. XAMPP stands for Cross-Platform (X), Apache (A), MariaDB (M), PHP (P) and Perl (P). It is a simple, lightweight Apache distribution that makes it extremely easy for developers to create a local web server for testing and deployment purposes.
One of the main advantages of XAMPP is that it is easy to install and use. It includes all of the necessary components to run a web server, such as Apache, MariaDB, PHP, and Perl, in a single package. This allows developers to easily set up a local web server environment on their own computer, without the need to install and configure each component separately.
XAMPP is popular among developers because it allows them to test their code on a local server before deploying it to a live web server. This can be especially useful for testing new features or making changes to an existing website without affecting the live version.
In addition to its use as a local web server, XAMPP can also be used to host websites on a network. This makes it a useful tool for small businesses or organizations that need to host their own websites but do not have the resources or expertise to set up and maintain a separate web server.
Overall, XAMPP is a powerful and easy-to-use tool for developers and website administrators, and it has become a popular choice for setting up local web server environments and hosting websites.
XAMPP Path Setup
Step 1:
First we will have to identify whether our Mac has bash shell or Z shell
Open the terminal and look in the title for the term bash or zsh
Step 2:
Check if shell profile file exists
Cat ~/.bash_profile
or
~/.zshrc
depending upon the outcome at step one
If you get any error of file doesn’t exist, you can create one by following command
nano ~/.bash_profile
or
nano ~/.zshrc
Step 3:
To use the XAMPP PHP and other binaries found in /Applications/XAMPP/bin/ by default this is the correct entry for ~/.bash_profile or ~/.zshrc depending upon shell installed on your system
export XAMPP_HOME=/Applications/XAMPP
export PATH=${XAMPP_HOME}/bin:${PATH}
export PATH
Load the changes with this (won't be needed next time you open a shell session):
source ~/.bash_profile
Or
source ~/.zshrc
Confirm:
$ which php
/Applications/XAMPP/bin/php
Hello everyone, welcome to our channel. Please feel free to drop your suggestion/advice/queries in the comments below.
Thanks for this video! All good now on Silicon Ventura. 🎉
Excellent video and tutorial in text. Thanks a lot!
Glad it was helpful!
Worked like a charm! Tnx!
Thank you, this was very helpful!
You're welcome!
Thanks so much! Life saver!
Good video thanks
Xampp on mac does not have intl extension , how do you manage to install it? Its mandatory for most framework
thankyou for help ...
how to connect mongodb with php in mac OS
any video?
Thanx
thanks
Thanks for everything. Excellent video. 🫶🏽
would this affect my apache web server from starting? as this isn't starting now
Did your machine have a separate installation of Apache as well
when I click on the start to run the database, it takes me a while and it does not start. what is the problem, please?
same
Can you share the screenshot of the error log
after writing "which php" terminas says "zsh: command not found: php"
I seems that the path was not correctly. If the installation completed successfully, please use commands mentioned in the video description to set the path or trying reinstalling.
Please let me know if know if you have any further issue.
danke
how to insert the following in Cat ~/.zhrc
export XAMPP_HOME=/Applications/XAMPP
export PATH=${XAMPP_HOME}/bin:${PATH}
export PATH
Hi ,
when i write this command nano ~/.zshrc this appear and i don't know where the problem
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/0xnrous/opt/anaconda3/bin/conda' 'shell.zsh' 'hook' 2>$
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/Users/0xnrous/opt/anaconda3/etc/profile.d/conda.sh" ]; then
. "/Users/0xnrous/opt/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/Users/0xnrous/opt/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
#
Thank you, this was very helpful!