I am trying to make a php script run to make the first test on the browser but it doesn't work. When I try to open the link it shows me the following:
<?php phpinfo(); ?>
Currently I have PHP 7.1.3 installed and Apache 2.4.25 in a Amazon VM with AMI. And the file phpinfo.php contains the same showed above by the browser.
Below some commands to confirm.
php -v PHP 7.1.3 (cli) (built: Mar 26 2017 15:36:12) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
httpd -v Server version: Apache/2.4.25 (Amazon) Server built: Jan 19 2017 16:55:49
In the file http.conf I took the following actions:
Updated a section:
`<IfModule dir_module>`
`DirectoryIndex /index.php index.php index.html`
`</IfModule>`
Inserted some lines:
`<FilesMatch \.php$>`
` SetHandler application/x-httpd-php`
`</FilesMatch>`
`<FilesMatch \.phps$>`
` SetHandler application/x-httpd-php-source`
`</FilesMatch>`
`AddType application/x-httpd-php-source .phps`
I would appreciate some help on this. Please let me know if I can provide any other information that might help on solving this issue.
Thanks in advance