Jump to content

Xampp version 7.4.10 weirdness

Recommended Posts

Since coming back from a recess in developing web applications, I installed Xampp 7.4.10 and I'm getting weird displays in my coding

It is actually showing the php tag and statements. I tried to configure the error_reporting line in php.ini thinking it was that, but to no avail

I made a screenshot to show what I'm actually getting

This should be only displaying the result of the echo statement, not what is inside the file


Link to post
Share on other sites

php is a server-side scripting language. if you are not making a http(s) request to a web server for the .php file, the php language engine isn't being invoked. when you directly enter the URL of the .php file in question in your browser's address bar, do you get the expected output? 

  • Like 1
Link to post
Share on other sites
2 hours ago, requinix said:

It has nothing to do with the IDE.

Okay, AJAX, then:


 I'm using http://localhost/my_file.html, and the IDE I'm using is Microsoft Visual Code, the thing it injects code into the script for live server. If I don't use Live server, like I type it manually, it works. So, if it's not the IDE, then it must be something else causing the problem

Link to post
Share on other sites
9 hours ago, requinix said:

1. Live Server? Didn't you say you were using XAMPP?
2. Unless configured otherwise, .html extensions do not run PHP code. Use a .php extension.

In VS code there is an extension called live server, which I'm using for development. It seems it's only good for HTML and CSS development

Link to post
Share on other sites
  • 2 weeks later...

Apparently, I have found a way to run php projects without manually typing the url in the address bar

I've install a php server extension and there is a blue button on the top right hand corner. It can only run one project at a time, so if you want to run a different project, you'll have to restart VS Code

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.