I have an AWS EC2 instance running the Bitnami Tomcat stack. When I try to run php from the server, they download. When I try to run it from my computer to test it, the code shows in the browser. In both scenarios, what could the problem be?
Asked
Active
Viewed 31 times
0
-
Have you wrapped the code in `` tags? – Apr 15 '17 at 20:13
-
@DanielJames As I understand, I can write html, insert some php, and change the file name to `.php` to have it run properly – p26528 Apr 15 '17 at 20:23
-
In the first scenario, the webserver probably isn't configured properly. In the second: do you have a webserver e.g. Apache, installed on your computer? – Jamhead Apr 15 '17 at 20:26
-
@Juned No, I do not have Apache on my computer. How would I configure the web server? The documentation of the Tomcat stack says it comes configured. – p26528 Apr 15 '17 at 20:35
-
Tomcat is for running Java applications: http://stackoverflow.com/questions/20634598/php-on-tomcat-8 – Jamhead Apr 15 '17 at 20:40
-
@Juned `Bitnami Apache Tomcat Stack ships with the following software versions: PHP 5.6.30` – p26528 Apr 15 '17 at 20:46