![]() ![]() Change the username with your OS X shortname account.Īpache, by default, run on port 80. Run the following command lines consecutively to create a user-level configuration file. Let’s change the DocumentRoot to that folder:ġ. But all my existing web projects reside in /Users/username/Sites. The default Apache DocumentRoot, where we should put our website documents, is located at /Library/WebServer/Documents. ![]() You can type the following command in Terminal to start Apache server.Īccess in the Browser to verify that the Apache server is working. Sudo cp /private/etc/ /private/etc/php.ini This command copies the and rename it to php.ini. Go to Terminal and run the following command line. ![]() PHP configurations such as Increasing Memory Limit, File Upload Allowance, and Set the Maximum Upload File Size are done through php.ini file, which also is disabled by default. See the following screenshot for more detail: LoadModule php5_module libexec/apache2/libphp5.so Uncomment the following line by removing the hash sign #. Type the following command to open nf in Sublime Text.Ģ. We have to enable it in order to use and execute PHP scripts in Apache server:ġ. The PHP module, however, is disabled by default. You can check the PHP version that is installed in Terminal with the following command: In addition, this also ensures that subl is registered and working.Īs mentioned, PHP has already been installed in OS X. It will return the Usage and the list of Arguments that can be used with subl, as you can see from the screenshot below. Ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" ~/bin/subl Create a symlink of Sublime Text subl binary in the ~/bin folder with this command: Recommended Reading : Beginner’s Guide To WordPress Multisite With MAMP Step 1: Enable Sublime Text Command Lineįirst, since I’m using Sublime Text, I would like to enable the Sublime Text command line so I will be able to open files and folders through Terminal, and edit them within Sublime Text. In this post, we will show you how to configure PHP, Apache, and MySQL in OS X without MAMP. You simply put the application in the Application folder, launch the app, and hit the Start Server button and off you go.īut, OS X has actually been shipped with PHP, and Apache built in so why not use them to develop and run websites locally instead of using third-party apps like MAMP or the likes? That way, we will occupy less space for apps, and we will also learn a few things in the process of getting them to work. Using MAMP is probably the easiest way to have PHP, Apache, and MySQL up and running in OS X. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |