Menu

php shows blanc page

Help
flish
2005-02-06
2013-04-15
  • flish

    flish - 2005-02-06

    Im very new at this
    I have used IIS and asp and now im moving to apache and php

    everything worked fine but my test page
    <html>
    <body>

    <?php
    $txt="Hello World";
    echo $txt;
    ?>

    </body>
    </html>

    only shows a blanc page when in browser
    what do i have to do?

     
    • Nobody/Anonymous

      I want to know this as well!!!!

      Obviously there is some sort of setting that is missing...

      Any ideas?

       
    • Nobody/Anonymous

      make sure you save the file as .php

       
    • Nobody/Anonymous

      I have the same issue and the file extention is php.

       
    • Nobody/Anonymous

      blank pages normally are errors in the php code.
      You should take look at the php error log if it says something:
        WebServ\logs\php\error.log

       
    • Nobody/Anonymous

      it says nothing there, and if you take a look at the source code of that page (Ctrl+U in FF) it says exactly what you wrote in.... Is there some kind of a problem with the php engine then?

       
    • Nobody/Anonymous

      If you want the error message to show in the output insted of only getting written on the log file you should alter the php.ini file.

      Find the line: display_errors = off and change to display_errors = on

      Use this only for developer sites. Getting access to error messages can be a way in for a hacker.

       
    • Nobody/Anonymous

      The other reason this can happen is if you are using short tags ("<?") instead of "<?php" - this is a configurable option in the php.ini file.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.