If you develop PHP applications, you definitely need a test server. If you do not have a server on the website, you have several options on Mac OS to set up a local server. Either you take the internal route, i.e. you use internal Apache and install PHP and MySQL support, or take the path of least resistance and download MAMP.
Mamp is a simple application that allows you to set up a test environment in minutes. You download it <a href="https://cdn.shopify.com/s/files/1/1932/8043/files/200721_ODSTOUPENI_BEZ_UDANI_DUVODU__EN.pdf?v=1595428404" data-gt-href-en="https://en.notsofunnyany.com/">here</a>. You can choose from 2 versions. One is free and also lacks some features of the paid version, but it is enough for normal testing. For example, the number of virtual guests is limited in the free version. It is a fact that it is not quite. I haven't tried it, but I think that the limitation only applies to the graphics tool, which is minimal in the free version, but if you want more virtual guests, it should be possible to get around it via the classic path of configuration files.
Once downloaded, all you have to do is drag and drop the directory into your preferred folder. Either to global Applications or Applications in your home folder. It is also advisable to change the initial password for the MySQL server. Here's how to do it.
Open a terminal. Press CMD+space to bring up SpotLight and type "terminal" without the quotes and once the appropriate application is found, press Enter. In the terminal, type:
/Applications/MAMP/Library/bin/mysqladmin -u root -p password
Where
/Applications/MAMP/bin/phpMyAdmin/config.inc.php
Where on line 86 we can enter our new password in quotes.
And then the file:
/Applications/MAMP/bin/mamp/index.php
In this file, we will overwrite the password on line 5.
Now we can start MAMP itself. And then configure it. Click on “Preferences…”.
On the first tab, you can set things like which page should be launched at startup, whether the server should start when MAMP is started and end when MAMP is closed, etc. For us, the second tab is more interesting.
On it, you can set the ports on which MySQL and Apache should run. I chose 80 and 3306 from the image, i.e. basic ports (just click on "Set default PHP and MySQL ports"). If you do the same, OS X will ask for the administrator password after starting MAMP. It is for one simple reason and that is safety. Mac OS won't let you run, without a password, anything on ports lower than 1024.
On the next tab, select the PHP version.
On the last tab, we choose where our PHP pages will be stored. So for example:
~/Documents/PHP/Pages/
Where will we place our PHP application.
Now just to test if MAMP is running. Both lights are green, so we click on "Open start page” and an information page about the server will open, from which we can access, for example, information about the server, i.e. what is running on it, and especially phpMyAdmin, with which we are able to model databases. The own pages then run on:
http://localhost
I hope you found the tutorial useful and that it introduced you to a simple way to set up a PHP and MySQL test environment on a Mac.
Unfortunately, I have to say for me that he wasn't. http://localhost is an unacceptable address for me, I need to start virtualhosts together with a functional .htaccess. Next, configure a 1:1 server with hosting, which I can do. For the first two things, can you please expand the instructions? For now, I have a php server on Linux in the office, it would make my work much easier.
MAMP supports fixed IP address or the same web address as personal websharing, in my case it is necessary http://81.201.57.184 or http://osxfil.pilsfree.net
So in that case you have 2 options. If you want a graphical zigzag, buy the pro version. If you know how to configure Apache, mysql and php via configuration files, you can configure and set up your own environment in Mac OS. Mac OS basically has Apache as its WWW server. I also want to write about it in the future, anyway, I am primarily concerned with small developers who want a test server for their applications and are not technically proficient enough to configure their own Apache, MySQL, PHP. There used to be something similar under Windows, I don't remember what it was called.
Anyway, from the beginning of the article, I am starting from one thing. In other words, the address book with Mamp is just a "jail" for your own Apache instance with configuration files. But if you have knowledge of configuration files, in my opinion this can be achieved with Mamp lite, /Mamp/conf/apache/httpd.conf is what you need. This theory of mine is further supported by the fact that Mamp lite and Mamp pro have the same installation image. Anyway, if I had to configure via files, I would send the file to native Apache in Mac OS and add PHP/MySQL to it.
Thanks for the info, I'd rather go to something else too. The problem is that each triad has a different file structure, each has a different set of modules, so I thought it would be enough to drag conf and vhost from the server and the rest individually. I'll try, thanks.
What about using MAMP PRO? It handles independent editing of all .htaccess, creation of virtualhosts (including alias names, security settings, configuration of php modules and postfix configuration), or you can direct domains to your localhost via DDNS.
Is that what you're asking, or did I misunderstand the question?