Enable PHP on Apache for Mac OS Yosemite & Mavericks

Check tutorial of How to Enable PHP in Apache for Mac OS X Yosemite & Mavericks

So after a lot of requests from our users here is a guide about How to Enable PHP in Apache for Mac OS X Yosemite & Mavericks.

OS X Mavericks comes with PHP 5.4.30, and OS X Mountain Lion comes with PHP 5.3.13 pre-installed, but when you start the built-in Apache server you will notice that PHP is not enabled by default. Changing this is easy, and if you’re a web developer and want to get PHP running on your local Mac with OS X 10.8 or later, you can get it up and running in no time.

Launch Terminal and enter the following command, use the administrator password when prompted:

sudo nano /etc/apache2/httpd.conf

Now press Control + W to use the search feature from nano, and type “php”

Find the following line and delete the comment (#) from the beginning:

LoadModule php5_module libexec / apache2 / libphp5.so

Enable PHP5 in OS X

Now press Control + O to save the changes, followed by Control + X to exit nano.

Back at the command prompt, you want to restart the Apache server to load the php module. You can do this with the following command, or you can toggle the power switch in the third-party WebSharing panel:

sudo apachectl restart

Apache will reboot quickly and PHP will be enabled.

You can verify this by throwing a php file into the ~ / Sites / directory and loading localhost / ~ user / file.php into a web browser, or use phpinfo () to check the existing php configuration by doing the following in any file with a php extension:

Save that file in the user ~ / Sites / folder and load it in a web browser.

If you want to make changes to the PHP configuration, use the following command to make a copy of the default php.ini file:

cp /private/etc/php.ini.default /private/etc/php.ini

If necessary, make adjustments to the copied php.ini file in / etc / or / private / etc /, keeping the original .default file intact. As usual, any major changes to php.ini must be followed by a fresh Apache restart to take effect.

How to Enable PHP in Apache for Mac OS X Yosemite & Mavericks Guide is free?

Starting from: Free
This guide is a free model
Free Trial: May be included, please check on the official site, we mentioned above.
The How to Enable PHP in Apache for Mac OS X Yosemite & Mavericks tutorial price is Free or Freemium. This means you can truly enjoy the How to Enable PHP in Apache for Mac OS X Yosemite & Mavericks guide.

The How to Enable PHP in Apache for Mac OS X Yosemite & Mavericks guide gives you an easy-to-use and efficient management and How to Enable PHP in Apache for Mac OS X Yosemite & Mavericks allows you to focus on the most important things. It’s friendly guide to use maybe you will love it and How to Enable PHP in Apache for Mac OS X Yosemite & Mavericks tutorial can be used on Linux, Windows or android devices.

How to Enable PHP in Apache for Mac OS X Yosemite & Mavericks: benefits

  • The How to Enable PHP in Apache for Mac OS X Yosemite & Mavericks tutorial is free .
  • Helps many users follow up with interest in a timely manner.
  • The price of the How to Enable PHP in Apache for Mac OS X Yosemite & Mavericks guide is free.

How to Enable PHP in Apache for Mac OS X Yosemite & Mavericks: FAQ

Tutorial Summary: How to Enable PHP in Apache for Mac OS X Yosemite & Mavericks

In this guide, we told you about How to Enable PHP in Apache for Mac OS X Yosemite & Mavericks; please read all steps so that you understand How to Enable PHP in Apache for Mac OS X Yosemite & Mavericks in case if you need any assistance from us, then contact us.

How this tutorial helping you?

So in this guide, we discuss the How to Enable PHP in Apache for Mac OS X Yosemite & Mavericks, which undoubtedly helps you.

What is actual time in which this method complete?

The time to complete the How to Enable PHP in Apache for Mac OS X Yosemite & Mavericks tutorial is 10+ minutes.

What are the supported Device?

Apple

What are the supported Operating system?

mac OS


How to Enable PHP in Apache for Mac OS X Yosemite & Mavericks Tutorial: final note

For our visitors: If you have any queries regards the How to Enable PHP in Apache for Mac OS X Yosemite & Mavericks, then please ask us through the comment section below or directly contact us.
Education: This guide or tutorial is just for educational purposes.
Misinformation: If you want to correct any misinformation about the guide “How to Enable PHP in Apache for Mac OS X Yosemite & Mavericks”, then kindly contact us.
Want to add an alternate method: If anyone wants to add the more methods to the guide How to Enable PHP in Apache for Mac OS X Yosemite & Mavericks, then kindly contact us.
Our Contact: Kindly use our contact page regards any help. You may also use our social and accounts by following the Whatsapp, Facebook, and Twitter for your questions. We always love to help you. We answer your questions within 24-48 hours (Weekend off).
Channel: If you want the latest software updates and discussion about any software in your pocket, then here is our Telegram channel.

Compsmag
Logo