Testing the PHP installation
At this point, we need to test our website with PHP. This can be done by writing a simple PHP script page. If PHP is installed correctly, it will return information about its environment and configuration.
- Go to the next folder, where it's the root document:
cd /var/www/html
- Create a file called
phpinfo.php
.We use the word
nano
so that we can get into the file of the system with the privileges and execute the following command:sudo nano phpinfo.php
- After creating the file, as given in the following screenshot, press CTRL-X, and then save the file:
- In your browser, enter the IP address of your Raspberry Pi, for example,
http://192.168.1.105/phpinfo.php
, and you should see the following screen: