- 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.
推薦閱讀
- Mastering Concurrency Programming with Java 8
- 復(fù)雜軟件設(shè)計之道:領(lǐng)域驅(qū)動設(shè)計全面解析與實戰(zhàn)
- 編程的修煉
- 大學(xué)計算機基礎(chǔ)實驗教程
- Mastering Rust
- Building a Quadcopter with Arduino
- SharePoint Development with the SharePoint Framework
- JavaCAPS基礎(chǔ)、應(yīng)用與案例
- AIRIOT物聯(lián)網(wǎng)平臺開發(fā)框架應(yīng)用與實戰(zhàn)
- Python機器學(xué)習(xí)算法: 原理、實現(xiàn)與案例
- Kivy Cookbook
- 深度實踐KVM:核心技術(shù)、管理運維、性能優(yōu)化與項目實施
- Java EE項目應(yīng)用開發(fā)
- Visual Basic語言程序設(shè)計上機指導(dǎo)與練習(xí)(第3版)
- Visual FoxPro程序設(shè)計實驗教程