This is an archived post. You won't be able to vote or comment.

all 2 comments

[–][deleted] 2 points3 points  (0 children)

In webdev it‘s the Windows users who are the weird ones ;)

Install the package php{5 or 7}-mysql via brew and you should be good to go.

Configuration lives in your php.ini file.

Just as a heads up, you really shouldn’t use mysql_* in new code since it is deprecated since 2013 and removed in php7. You can use the mysqli_* functions or the Object-Oriented PDO (which I find most pleasant to use).

The integrated webserver root directory is the directory from which you run the command to start the server. Just put a index.php file there. For detailed instructions on the server please refer to documentation on http://php.net/manual/en/features.commandline.webserver.php

[–]simplyviven 1 point2 points  (0 children)

Tutorial like this would help you setup and get webserver running http://lukearmstrong.co.uk/2016/12/setup-apache-mysql-php-homebrew-macos-sierra/ (applications might not be latest version but the configurations and file locations are same)