Mac OS X Open php____php

Source: Internet
Author: User
Tags php language
Start terminal sudo-s Enter password vi/etc/apache2/httpd.conf press I or O to enter edit status, find #LoadModule php5_module libexec/apache2/libphp5.so, remove # Annotation Character. Save and Exit VI:: WQ
Build PHP configuration file: Cp/etc/php.ini.default/etc/php.ini
OK, we can run the Web program in the PHP language running Mac OS x. To test, sudo apachectl start (or open Web Sharing in preferences) VI http:///Library/WebServer/Document/info.php plus a <?php phpinfo ();? &G T : Wq
Http://localhost/info.php take a look at your results. ++++++++++++++++++++++++++++++++++++ forgot to say, apache.conf the default permission is 444, need to change to 755, otherwise cannot edit. Chmod-r 755/etc/apache2/httpd.conf changes after the change back, Chmod-r 444/etc/apache2/httpd.conf
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.