PHP not working in 2019.3 Ultimate

When I try to load a .php file in a webapp on a tomcat server localhost, the browser displays the text of the .php script rather than running the script.

The webapp itself loads fine and links to other .html pages in the app work fine. But when I click on the link to the .php file, all I get is the file text. 

I created the project as a jee project.  I have installed the php plugin.

I have tried various debugging steps as per your help pages. At one point you suggest testing the .php installation by creating a file test.php and "Save the file on the Web server, in the folder the PHP engine looks at". I honestly don't know what that means. I have no idea which folder the PHP engine looks at nor how to determine that. 

What about JavaBridge? Should I be using that?

Thanks.

Doug 

5 comments
Comment actions Permalink

Looks like PHP engine isn't installed or not running on your Web server.

> I have no idea which folder the PHP engine looks at nor how to determine that. 

Unfortunately this is not something we can assist with. Is there a person who can help you configure your web server?

0
Comment actions Permalink

The advice that you cannot help me with comes from your website:

https://www.jetbrains.com/help/idea/installing-components-separately.html#checkInstallation

Someone must have known what they meant when they created your webpage.  

0
Comment actions Permalink

Sorry, I wasn't clear enough. "the folder the PHP engine looks at" is environment specific - we cannot know what web server software a user is running and what web server customizations are applied.

You were saying it's tomcat: what OS are you running on that web server? Did tomcat come with some Apache distribution like xampp or wamp? Are you able to check what tomcat version are you running?

You can check out tomcat configuration docs to figure out where is the Document Base (also known as the Context Root): https://tomcat.apache.org/tomcat-8.0-doc/config/context.html

0
Comment actions Permalink

Thanks very much. This pointed me in the right direction. I was able to verify that my installation of php is not working. Now I need to solve that problem!

I appreciate the quick response. 

Thanks. 

1
Comment actions Permalink

i installed php plugin and Booom, it detect html files in php.

note that i installed  emmet

https://plugins.jetbrains.com/plugin/6610-php

0

Please sign in to leave a comment.