1

I have a basic code in PHP (Test.php):

<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
echo ("Hello world!");
error_reporting(E_ALL);
?>

It is called by an HTML file:

<DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="HTML/Adventures/mystyle.css">
</head>
<body>
  <form action="Test.php">    
    <center><h1>LOGIN SCREEN</h1></center>
    <input type="submit">
  </form>  
</body>
</html>
  1. When I run it directly through localhost, I get "Hello World"
  2. When I run the HTML through IE browser, I get "Hello World"
  3. But, when I run the HTML through FireFox, I get a blank screen. Can you please direct me to a setting that I can either embed into my code or into the Apache conf file that will correct this. I don't want Firefox user to be excluded from my site..
3
  • Could you give us some context about which PHP server you're using? Commented Jun 27, 2020 at 5:32
  • I downloaded Xampp. It is running PHP 7.4.7
    – Ann
    Commented Jun 27, 2020 at 7:41
  • You might find this interesting. If I add <br> in between Hello and World, IE knows what to do. Firefox starts spitting out the code after that command; even though it is within the " 's.
    – Ann
    Commented Jun 27, 2020 at 8:16

1 Answer 1

1

If a script outputs in one browser and doesn't then it is definitely HTML or Browser side issue of non compatibility because script doesn't bothers which browser you are using. So just take PHP out of the equation here and focus on HTML and Browser.

Also check Test.php directly in Firefox. Because the previous page has nothing to do with this.

That way you remove different angles and close in onto the real issue.

Most probably it is browser issue.

Click on Inspect Element and check errors that browser outputs (if any)

7
  • I'm afraid you will need to be more specific. "Inspect Element"? I believe you are referring to Inspector Under Tools in Firefox. I need direction. I did run it and no errors were listed.
    – Ann
    Commented Jun 27, 2020 at 7:46
  • I think it is an HTML on Firefox issue. I ran it as localhost on both browsers. Both IE and FireFox came back with "Hello World!" The only time it doesn't return anything is when the HTML in Firefox is used to run the PHP.
    – Ann
    Commented Jun 27, 2020 at 7:53
  • Why don't you rename your HTML file to .php Commented Jun 27, 2020 at 15:22
  • Well it did run that way. I'm a little afraid to change my entire website to php just to make it run on Firefox.
    – Ann
    Commented Jun 27, 2020 at 22:55
  • 1
    Oh my ..... that works. It was the capitalization. Thank you so much for the help.
    – Ann
    Commented Jun 29, 2020 at 5:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.