0

I am working on a website with colleagues and I put the files in their own folder in the /webapps/ directory of my tomcat8 installation. However, when I open the page in Chrome, all I see is the raw source code. It renders properly in Firefox.

Any ideas?

I can't post the page source, nor can I post a link to pastebin. but it is just a .php file with html inside, and it renders properly in Firefox.

wfgeo
  • 2,716
  • 4
  • 30
  • 51
  • Can you perhaps post another source code (declare a variable and echo it) that isn't private if it doesn't work in chrome? – RAZERZ Nov 13 '17 at 19:07
  • Makes no sense. PHP is interpreted by the server (Tomcat here), not the browser. So the browser you use should not make a difference. Do a view source on both browsers, there might be something in the produced HTML that Chrome does not like. You can turn on dev mode on Chrome (F12) and look at the console messages. There is no way Tomcat will output the raw PHP code, unless Tomcat was not configured to handle PHP code (which it is not by default, Tomcat is J2EE app server). PHP usually runs directly on the web server. – Nic3500 Nov 13 '17 at 19:37
  • If you need it, how to get PHP on Tomcat https://stackoverflow.com/questions/779246/run-a-php-app-using-tomcat. Probably other sources, this is just form a quick searhc. – Nic3500 Nov 13 '17 at 19:38

0 Answers0