When php is not working

<?php
phpinfo();
? > does not work, it is a sign that php is not working.

http://www.standpower.com/php_environment2.html AddType application/x-httpd-php .php

Learn from this site and add this line of text to resolve the issue. It seems I can't read the php program without this description.

*Before you do that, be sure to install php first, of course, with the following command! php install -> AddType php -> restart apache (sudo service httpd restart)

 sudo yum install php

After that, the time zone must be set to Tokyo, or the following error will occur.

Warning: date(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for 'UTC/0.0/no DST' instead in /***\*/***\*/***/***

In such a case, set it in php.ini.

[Date]
; ...
; ...
date.timezone = Asia/Tokyo

If you want to manipulate the DOM, you need to add an add-on for it as follows.

sudo yum install php-xml