- CouchDB and PHP Web Development Beginner’s Guide
- Tim Juravich
- 174字
- 2021-08-13 18:22:50
Time for action — making sure that Apache can connect to PHP
In order to create a web application, Apache needs to be able to run the PHP code. So, we are going to check that Apache can access PHP.
- Use Finder to navigate to the following folder:
/etc/apache2
. - Open the file named
httpd.conf
in your text editor. - Look through the file, and find the following line (it should be around line
116):
#LoadModule php5_module libexec/apache2/libphp5.so
- Remove the hash (#) symbol that is in front of this string to uncomment this line of the
config
file. It's possible that your configuration file may already have this uncommented. If it does, then you don't have to change anything. Regardless, the end result should look as follows:LoadModule php5_module libexec/apache2/libphp5.so
- Open Terminal.
- Restart Apache by running the following command:
sudo apachectl restart
What just happened?
We opened Apache's main configuration file, httpd.conf
, and uncommented a line so that Apache can load PHP. We then restarted the Apache server, so that the updated configuration would take effect.
推薦閱讀
- Git Version Control Cookbook
- Java Web基礎與實例教程(第2版·微課版)
- 精通搜索分析
- Learning SQLite for iOS
- Learning Laravel 4 Application Development
- 你必須知道的204個Visual C++開發問題
- Kinect for Windows SDK Programming Guide
- Clean Code in C#
- Arduino Wearable Projects
- QlikView Unlocked
- Docker:容器與容器云(第2版)
- Isomorphic Go
- Swift 2 Design Patterns
- Internet of Things with Arduino Cookbook
- Java EE框架開發技術與案例教程