SitePoint Sponsor

User Tag List

Results 1 to 13 of 13

Thread: Blank pages

  1. #1
    SitePoint Guru mmarif4u's Avatar
    Join Date
    Dec 2006
    Location
    /dev/swat
    Posts
    619
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Blank pages

    Hi,

    I have some files i make these by testing it on my pc,its working fine.
    But when i upload these to live server and want to run it,it just give me blank pages, while when i try to run a html page using a php extension that was ok but surprising about main index.php and other main .php files.

    Before i upload a lot of files after editing or new one no problem that time but now not working.

    How can i solve this.

    Thanks.

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Put this at the top of the file to turn on error reporting:
    PHP Code:
    error_reporting(E_ALL); 

  3. #3
    SitePoint Guru mmarif4u's Avatar
    Join Date
    Dec 2006
    Location
    /dev/swat
    Posts
    619
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No luck with that.

    This is the index.php:
    PHP Code:
    <?php
    require_once('common.php');
    error_reporting(E_ALL);
    $_SESSION['loggedin']='T'
    $validate=rand(100000000,999999999);
    $validate1=md5($validate);
    $_SESSION['passkey']=$validate1;
    $package=array('1001','1006','1007');
    $package[0]="include/images/subscribe now.gif";
    //$package[1]="include/images/subscribe now.gif";
    //$package[2]="include/images/subscribe now.gif";
    $_SESSION['1001']=$package[0];
    //$_SESSION['1006']=$package[1];
    //$_SESSION['1007']=$package[2];
    $pack1001=encrypt_str(1001);
    //$pack1006=encrypt_str(1007);
    //$pack1007=encrypt_str(1006);



    echo "<table align=\"center\" >";
    echo 
    "<tr>";
    echo 
    "<td align=\"center\" ><img src=\"include/images/logo1.jpg\" ></img></td>";

    echo 
    "</tr>";
    echo 
    "<tr>";
    echo 
    "<td align=\"center\" ><img src=\"include/images/home.gif\" ></img></td>";

    echo 
    "</tr>";
    echo 
    "</table>";
    echo 
    "<table width=\"25%\" align=\"center\">";
    echo 
    "<tr>";
    //echo "<td width=\"44.5%\">&nbsp;</td>";
    echo "<td  width=\"25%\" align=\"center\"><a href=\"user.php?package=$pack1001&passkey=$validate1\"><img src=\"{$_SESSION['1001']}\" border=\"0\"></img></a></td>";
    //echo "<td  width=\"9.8%\"><a href=\"user.php?package=$pack1006&passkey=$validate1\"><img src=\"{$_SESSION['1006']}\" border=\"0\"></img></a></td>";
    //echo "<td  width=\"9.8%\"><a href=\"user.php?package=$pack1007&passkey=$validate1\"><img src=\"{$_SESSION['1007']}\" border=\"0\"></img></a></td>";
    echo "</tr>";
    echo 
    "</table>";
    ?>
    <html><head><title>&raquo; Subscribe Now</title></head>
    <body >
    </body>
    </html>
    Its working fine on my pc but on the server still blank.

  4. #4
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    The problem may be in common.php, which is above where you turned up error reporting.

  5. #5
    SitePoint Guru mmarif4u's Avatar
    Join Date
    Dec 2006
    Location
    /dev/swat
    Posts
    619
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I cant get this: (where you turned up error reporting.)

    common.php:

    PHP Code:
    <?php
    require_once ('include/session.php');
    require_once (
    'include/db.php');
    require_once (
    'include/functions.php');
    require_once (
    'include/error.php');
    ?>

  6. #6
    SitePoint Guru mmarif4u's Avatar
    Join Date
    Dec 2006
    Location
    /dev/swat
    Posts
    619
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Any help guys ?

  7. #7
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I meant to put the error_reporting statement before the include so that you catch any notices/warnings being thrown in all those files...

    It's between 2:30AM and 5:30AM for most of the site's users right now, be patient

  8. #8
    SitePoint Guru mmarif4u's Avatar
    Join Date
    Dec 2006
    Location
    /dev/swat
    Posts
    619
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The surprising thing is that it cannot throw any error while other pages r working fine. But i upload just, that files are creating problems.

    Not sure why?

  9. #9
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Probably because of configuration differences between your PC and your server.

  10. #10
    SitePoint Guru mmarif4u's Avatar
    Join Date
    Dec 2006
    Location
    /dev/swat
    Posts
    619
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yeh may be this can,ok i will take a look to both.
    thanks

  11. #11
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Your live server may have display_errors turned off (which is VERY advisable)
    Try and do this before you include any files, your include paths may be incorrect:
    PHP Code:
    <?php
    //before you do anything
    ini_set('display_errors' ) ;
    error_reporting(E_ALL) ;

    //now do includes
    ?>
    Turn it OFF when you have discovered what is causing the errors, and before going Live.

  12. #12
    SitePoint Guru mmarif4u's Avatar
    Join Date
    Dec 2006
    Location
    /dev/swat
    Posts
    619
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for ur reply,
    I will try ur code 1st and check the errors.

    And will back to u.

  13. #13
    SitePoint Guru mmarif4u's Avatar
    Join Date
    Dec 2006
    Location
    /dev/swat
    Posts
    619
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Dan and cups , yeh that was the problem, Now it show th errors.

    And i fix it.

    Thanks for ur time.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •