CSS-Regex Posted December 26, 2020 Share Posted December 26, 2020 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 Quote Link to comment https://forums.phpfreaks.com/topic/311929-xampp-version-7410-weirdness/ Share on other sites More sharing options...
mac_gyver Posted December 26, 2020 Share Posted December 26, 2020 what URL to the file through the web server are you using? it should be something like - http://localhost/your_file.php Quote Link to comment https://forums.phpfreaks.com/topic/311929-xampp-version-7410-weirdness/#findComment-1583423 Share on other sites More sharing options...
CSS-Regex Posted December 26, 2020 Author Share Posted December 26, 2020 I am using ajax to get results, it shouldn't be showing the <?php echo'' just "Processing......" Quote Link to comment https://forums.phpfreaks.com/topic/311929-xampp-version-7410-weirdness/#findComment-1583426 Share on other sites More sharing options...
mac_gyver Posted December 26, 2020 Share Posted December 26, 2020 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? 1 Quote Link to comment https://forums.phpfreaks.com/topic/311929-xampp-version-7410-weirdness/#findComment-1583427 Share on other sites More sharing options...
CSS-Regex Posted December 26, 2020 Author Share Posted December 26, 2020 I didn't see that one coming, maybe it's something to do with the IDE that I'm using Quote Link to comment https://forums.phpfreaks.com/topic/311929-xampp-version-7410-weirdness/#findComment-1583428 Share on other sites More sharing options...
requinix Posted December 26, 2020 Share Posted December 26, 2020 It has nothing to do with the IDE. Okay, AJAX, then: 4 hours ago, mac_gyver said: what AJAX URL to the file through the web server are you using? it should be something like - http://localhost/your_file.php Quote Link to comment https://forums.phpfreaks.com/topic/311929-xampp-version-7410-weirdness/#findComment-1583435 Share on other sites More sharing options...
CSS-Regex Posted December 27, 2020 Author Share Posted December 27, 2020 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 Quote Link to comment https://forums.phpfreaks.com/topic/311929-xampp-version-7410-weirdness/#findComment-1583436 Share on other sites More sharing options...
requinix Posted December 27, 2020 Share Posted December 27, 2020 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. Quote Link to comment https://forums.phpfreaks.com/topic/311929-xampp-version-7410-weirdness/#findComment-1583437 Share on other sites More sharing options...
CSS-Regex Posted December 27, 2020 Author Share Posted December 27, 2020 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 Quote Link to comment https://forums.phpfreaks.com/topic/311929-xampp-version-7410-weirdness/#findComment-1583440 Share on other sites More sharing options...
CSS-Regex Posted December 27, 2020 Author Share Posted December 27, 2020 Is there anyway I can put this thread as solved? Quote Link to comment https://forums.phpfreaks.com/topic/311929-xampp-version-7410-weirdness/#findComment-1583441 Share on other sites More sharing options...
requinix Posted December 27, 2020 Share Posted December 27, 2020 Not in this forum. The PHP Coding Help forum supports it as a sort of trial run-type thing, but we've had that running for so long we might as well apply it to the other forums too... Quote Link to comment https://forums.phpfreaks.com/topic/311929-xampp-version-7410-weirdness/#findComment-1583473 Share on other sites More sharing options...
CSS-Regex Posted January 4, 2021 Author Share Posted January 4, 2021 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 Quote Link to comment https://forums.phpfreaks.com/topic/311929-xampp-version-7410-weirdness/#findComment-1583658 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.