Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

blank page on my php

Options
  • 24-10-2011 6:58pm
    #1
    Registered Users Posts: 210 ✭✭


    Hi

    i have a page i done in dreamweaver right and it works fine on the testing server but when i upload it live its a blank page on my web page any ideas to why?

    i done a form with the dreamweaver ext called security assist from "webassist"

    this is the php code it done for me so i say works fine untill i up load it my host said its
    PHP v5.2.14 is used on the server

    [PHP]

    <?php
    @session_start();
    ?>
    <?php require_once('Connections/any.php');?>
    <?php require_once("webassist/form_validations/wavt_scripts_php.php"); ?>
    <?php require_once("webassist/form_validations/wavt_validatedform_php.php"); ?>
    <?php require_once( "webassist/security_assist/helper_php.php" ); ?>
    <?php
    if ((isset($_POST["LogIn_submit"])&&(!isset($_POST["Log_In_group_Remember_my_information"])) && $_POST["LogIn_submit"] != "")) {
    setcookie("RememberMePWD", "", time()+(60*60*24*30), "/", "", 0);
    }
    ?>
    <?php
    if ((isset($_POST["LogIn_submit"])&&(!isset($_POST["Log_In_group_Remember_my_information"])) && $_POST["LogIn_submit"] != "")) {
    setcookie("RememberMeUN", "", time()+(60*60*24*30), "/", "", 0);
    }
    ?>
    <?php
    if ((isset($_POST["LogIn_submit"])&&(isset($_POST["Log_In_group_Remember_my_information"])) && $_POST["Log_In_group_Remember_my_information"] != "")) {
    setcookie("RememberMePWD", "".((isset($_POST["Log_In_group_Password"]))?$_POST["Log_In_group_Password"]:"") ."", time()+(60*60*24*30), "/", "", 0);
    }
    ?>
    <?php
    if ((isset($_POST["LogIn_submit"])&&(isset($_POST["Log_In_group_Remember_my_information"])) && $_POST["Log_In_group_Remember_my_information"] != "")) {
    setcookie("RememberMeUN", "".((isset($_POST["Log_In_group_Email"]))?$_POST["Log_In_group_Email"]:"") ."", time()+(60*60*24*30), "/", "", 0);
    }
    ?>
    <?php
    if ((isset($_POST["LogIn_submit"])&&(!isset($_POST["Log_In_group_Log_me_in_automatically"])) && $_POST["LogIn_submit"] != "")) {
    setcookie("AutoLoginPWD", "", time()+(60*60*24*30), "/", "", 0);
    }
    ?>
    <?php
    if ((isset($_POST["LogIn_submit"])&&(!isset($_POST["Log_In_group_Log_me_in_automatically"])) && $_POST["LogIn_submit"] != "")) {
    setcookie("AutoLoginUN", "", time()+(60*60*24*30), "/", "", 0);
    }
    ?>
    <?php
    if ((isset($_POST["LogIn_submit"])&&(isset($_POST["Log_In_group_Log_me_in_automatically"])) && $_POST["Log_In_group_Log_me_in_automatically"] != "")) {
    setcookie("AutoLoginPWD", "".((isset($_POST["Log_In_group_Password"]))?$_POST["Log_In_group_Password"]:"") ."", time()+(60*60*24*30), "/", "", 0);
    }
    ?>
    <?php
    if ((isset($_POST["LogIn_submit"])&&(isset($_POST["Log_In_group_Log_me_in_automatically"])) && $_POST["Log_In_group_Log_me_in_automatically"] != "")) {
    setcookie("AutoLoginUN", "".((isset($_POST["Log_In_group_Email"]))?$_POST["Log_In_group_Email"]:"") ."", time()+(60*60*24*30), "/", "", 0);
    }
    ?>
    <?php
    if($_SERVER["REQUEST_METHOD"] == "POST"){
    $WA_Auth_Parameter = array(
    "connection" => $any,
    "database" => $database_any,
    "tableName" => "users",
    "columns" => explode($WA_Auth_Separator,"UserEmail".$WA_Auth_Separator."UserPassword"),
    "columnValues" => explode($WA_Auth_Separator,"".((isset($_POST["Log_In_group_Email"]))?$_POST["Log_In_group_Email"]:"") ."".$WA_Auth_Separator."".((isset($_POST["Log_In_group_Password"]))?$_POST["Log_In_group_Password"]:"") .""),
    "columnTypes" => explode($WA_Auth_Separator,"text".$WA_Auth_Separator."text"),
    "sessionColumns" => explode($WA_Auth_Separator,"UserID"),
    "sessionNames" => explode($WA_Auth_Separator,"SecurityAssist_UserID"),
    "successRedirect" => "login.php?loggedIn=1",
    "failRedirect" => "login.php?failedLogin=1",
    "gotoPreviousURL" => TRUE,
    "keepQueryString" => TRUE
    );

    WA_AuthenticateUser($WA_Auth_Parameter);
    }
    ?>
    <?php
    if((((isset($_SESSION["SecurityAssist_UserID"]) && $_SESSION["SecurityAssist_UserID"] != "")?"LoggedIn":"") == "")&&(((isset($_COOKIE["AutoLoginUN"]))?$_COOKIE["AutoLoginUN"]:"") != "")&&(((isset($_COOKIE["AutoLoginPWD"]))?$_COOKIE["AutoLoginPWD"]:"") != "")){
    $WA_Auth_Parameter = array(
    "connection" => $any,
    "database" => $database_any,
    "tableName" => "users",
    "columns" => explode($WA_Auth_Separator,"UserEmail".$WA_Auth_Separator."UserPassword"),
    "columnValues" => explode($WA_Auth_Separator,"".((isset($_COOKIE["AutoLoginUN"]))?$_COOKIE["AutoLoginUN"]:"") ."".$WA_Auth_Separator."".((isset($_COOKIE["AutoLoginPWD"]))?$_COOKIE["AutoLoginPWD"]:"") .""),
    "columnTypes" => explode($WA_Auth_Separator,"text".$WA_Auth_Separator."text"),
    "sessionColumns" => explode($WA_Auth_Separator,"UserID"),
    "sessionNames" => explode($WA_Auth_Separator,"SecurityAssist_UserID"),
    "successRedirect" => "",
    "failRedirect" => "",
    "gotoPreviousURL" => TRUE,
    "keepQueryString" => TRUE
    );

    WA_AuthenticateUser($WA_Auth_Parameter);
    }
    ?>
    <?php
    if (isset($_POST["LogIn_submit"])) {
    $WAFV_Redirect = "".(htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)) ."?invalid=true";
    $_SESSION = "";
    if ($WAFV_Redirect == "") {
    $WAFV_Redirect = $_SERVER["PHP_SELF"];
    }
    $WAFV_Errors = "";
    $WAFV_Errors .= WAValidateEM((isset($_POST["Log_In_group_Email"])?$_POST["Log_In_group_Email"]:"") . "",true,1);
    $WAFV_Errors .= WAValidateRQ((isset($_POST["Log_In_group_Password"])?$_POST["Log_In_group_Password"]:"") . "",true,2);
    $WAFV_Errors .= WAValidateEL((isset($_POST["Log_In_group_Password"])?$_POST["Log_In_group_Password"]:"") . "",6,500,true,3);

    if ($WAFV_Errors != "") {
    PostResult($WAFV_Redirect,$WAFV_Errors,"login");
    }
    }
    ?>


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
    <html xmlns="http://www.w3.org/1999/xhtml"&gt;
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <link href="main.css" rel="stylesheet" type="text/css" />
    <script src="webassist/progress_bar/jquery-blockui-formprocessing.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css">
    <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <script src="webassist/forms/wa_servervalidation.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryValidationPassword.css" rel="stylesheet" type="text/css">
    <script src="SpryAssets/SpryValidationPassword.js" type="text/javascript"></script>
    <link href="webassist/forms/fd_basic_default.css" rel="stylesheet" type="text/css">


    </head>

    <body>


    <div id="wrap">

    <div id="head">
    <img src="images/head.jpg" width="920" height="150" />
    </div>
    <div id="nav">

    <a href="index.html">Home</a>
    <a href="design.html">Design</a>
    <a href="#">about</a>
    <a href="registration.php">Reg</a>
    <a href="members.php">Members</a>
    <a href="#">Contact</a>
    <a href="login.php">login</a>

    </div>

    <div id="body">


    <div id="log_in">


    <?php if(WA_Auth_RulePasses("Validated form")){ // Begin Show Region ?>
    <p>Invalid username or password</p>
    <?php } // End Show Region ?>
    <?php if(WA_Auth_RulePasses("Log in success")){ // Begin Show Region ?>
    <p>You have been logged in</p>
    <?php } // End Show Region ?>
    <?php if(WA_Auth_RulePasses("Failed log in")){ // Begin Show Region ?>
    <p>Invalid username or password</p>
    <?php } // End Show Region ?>
    <?php if(WA_Auth_RulePasses("Emailed password")){ // Begin Show Region ?>
    <p>Password information emailed, please check your inbox</p>
    <?php } // End Show Region ?>
    <?php if(WA_Auth_RulePasses("Successful update")){ // Begin Show Region ?>
    <p>Registration completed successfully, please log in to access the site</p>
    <?php } // End Show Region ?>
    <div id="LogInContainer" class="WAATK">
    <div id="LogIn_Basic_Default_ProgressWrapper">
    <form class="Basic_Default" id="LogIn_Basic_Default" name="LogIn_Basic_Default" method="post" action="<?php echo (htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)); ?>">
    <!--
    WebAssist CSS Form Builder - Form v1
    CC: Log In
    CP: Default
    TC: Basic
    TP: Default
    -->
    <fieldset class="Basic_Default" id="Log_In">
    <legend class="groupHeader">Log In</legend>
    <span class="fieldsetDescription"> Required * </span>
    <div class="lineGroup">
    <label for="Log_In_group_Email" class="sublabel" > Email:<span class="requiredIndicator"> *</span></label>
    <div class="errorGroup"> <span id="Log_In_group_Email_Spry">
    <input id="Log_In_group_Email" name="Log_In_group_Email" type="text" value="<?php echo ((isset($_COOKIE["RememberMeUN"]))?$_COOKIE["RememberMeUN"]:""); ?>" class="formTextfield_Medium" tabindex="1" onBlur="hideServerError('Log_In_group_Email_ServerError');">
    <?php
    if (ValidatedField('login','login')) {
    if ((strpos((",".ValidatedField("login","login").","), "," . "1" . ",") !== false || "1" == "")) {
    if (!(false)) {
    ?>
    <span class="serverInvalidState" id="Log_In_group_Email_ServerError">Please enter a value.</span>
    <?php //WAFV_Conditional login.php login(1:)
    }
    }
    }?>
    <span class="textfieldInvalidFormatMsg">Invalid format.</span><span class="textfieldMinCharsMsg">Minimum number of characters not met.</span><span class="textfieldMaxCharsMsg">Exceeded maximum number of characters.</span><span class="textfieldRequiredMsg">Please enter a value.</span> </span> </div>
    </div>
    <div class="lineGroup">
    <label for="Log_In_group_Password" class="sublabel" > Password:<span class="requiredIndicator"> *</span></label>
    <div class="errorGroup"> <span id="Log_In_group_Password_Spry">
    <input id="Log_In_group_Password" name="Log_In_group_Password" type="password" value="<?php echo ((isset($_GET["failedLogin"]) || isset($_GET["invalid"]))?"":((isset($_COOKIE["RememberMePWD"]))?$_COOKIE["RememberMePWD"]:"")); ?>" class="formPasswordfield_Medium" tabindex="2" onBlur="hideServerError('Log_In_group_Password_ServerError');">
    <?php
    if (ValidatedField('login','login')) {
    if ((strpos((",".ValidatedField("login","login").","), "," . "2" . ",") !== false || "2" == "") || (strpos((",".ValidatedField("login","login").","), "," . "3" . ",") !== false || "3" == "")) {
    if (!(false)) {
    ?>
    <span class="serverInvalidState" id="Log_In_group_Password_ServerError">Please enter a value.</span>
    <?php //WAFV_Conditional login.php login(2,3:)
    }
    }
    }?>
    <span class="passwordInvalidStrengthMsg">The password doesn't meet the specified strength. Your field must contain: a minimum of 6 and a maximum of 500 characters, a minimum of 3 and a maximum of 500 alphabet characters, and a minimum of 2 and a maximum of 500 numbers.</span><span class="passwordMinCharsMsg">Minimum number of characters not met.</span><span class="passwordMaxCharsMsg">Exceeded maximum number of characters.</span><span class="passwordRequiredMsg">Please enter a value.</span> </span> </div>
    </div>
    <div class="lineGroup">
    <div class="errorGroup"> <span>
    <label class="checklabel" for="Log_In_group_Remember_my_information">
    <input type="checkbox" name="Log_In_group_Remember_my_information" id="Log_In_group_Remember_my_information" value="1" class="formCheckboxField_Standard"<?php if (!(strcmp(((isset($_COOKIE["RememberMeUN"]))?1:0),1))) {echo "checked=\"checked\"";} ?> tabindex="3">
     Remember my information</label>
    </span> </div>
    </div>
    <div class="lineGroup">
    <div class="errorGroup"> <span>
    <label class="checklabel" for="Log_In_group_Log_me_in_automatically">
    <input type="checkbox" name="Log_In_group_Log_me_in_automatically" id="Log_In_group_Log_me_in_automatically" value="1" class="formCheckboxField_Standard"<?php if (!(strcmp(((isset($_COOKIE["AutoLoginUN"]))?1:0),1))) {echo "checked=\"checked\"";} ?> tabindex="4">
     Log me in automatically</label>
    </span> </div>
    </div>
    <div><a href="forgotpassword.php">for gotting password</a></div>
    <p class="buttonFieldGroup">
    <input class="formButton" name="LogIn_submit" type="submit" id="LogIn_submit" value="Log In" onClick="clearAllServerErrors('LogIn_Basic_Default')" tabindex="4">
    </p>
    <p class="buttonFieldGroup">  </p>
    </fieldset>
    </form>
    </div>
    <div id="LogIn_Basic_Default_ProgressMessageWrapper" class="blockUIOverlay" style="display:none;">
    <script type="text/javascript">
    WADFP_SetProgressToForm('LogIn_Basic_Default', 'LogIn_Basic_Default_ProgressMessageWrapper', WADFP_Theme_Options);
    </script>
    <div id="LogIn_Basic_Default_ProgressMessage" >
    <p style="margin:10px; padding:5px;" ><img src="webassist/progress_bar/images/slate-largespin.gif" alt="" title="" style="vertical-align:middle;" />  Please wait</p>
    </div>
    </div>
    </div>
    <script type="text/javascript">
    <!--
    var Log_In_group_Email_Spry = new Spry.Widget.ValidationTextField("Log_In_group_Email_Spry", "email", { minChars:6, maxChars:500 , validateOn:["blur"]});
    var Log_In_group_Password_Spry = new Spry.Widget.ValidationPassword("Log_In_group_Password_Spry", { minAlphaChars:3, maxAlphaChars:500, minNumbers:2, maxNumbers:500, minSpecialChars:0, maxSpecialChars:0, minChars:6, maxChars:500, isRequired:true , validateOn:["blur"]});
    //-->
    </script>





    </div>


    </div>

    <div id="foot"></div>

    </div>

    </body>
    </html>

    [/PHP]


Comments

  • Registered Users Posts: 3,140 ✭✭✭ocallagh


    Put [PHP]ini_set("display_errors", 1); [/PHP] at top of script


  • Registered Users Posts: 9,579 ✭✭✭Webmonkey


    You ignore the errors of session_start with the @. This is probably where the problem is.

    Judging from what you've pasted there, you have a space/line break before the first opening <?php tag. If this is the case in your PHP file, the HTTP headers will already have been sent so any cookie information won't be set. You cannot call session_start before HTTP headers are sent. So remove that space or any HTML before your first <?php tag.


  • Registered Users Posts: 210 ✭✭pjwhite99


    ocallagh wrote: »
    Put [PHP]ini_set("display_errors", 1); [/PHP] at top of script


    i get this now


    Warning: mysql_pconnect() URL="http://www.irelandwebdesign.biz/function.mysql-pconnect"]function.mysql-pconnect[/URL: Access denied for user 'root'@'localhost' (using password: YES) in /home/ire/public_html/Connections/any.php on line 9

    Fatal error: Access denied for user 'root'@'localhost' (using password: YES) in /home/ire/public_html/Connections/any.php on line 9




  • Registered Users Posts: 9,579 ✭✭✭Webmonkey


    pjwhite99 wrote: »
    i get this now


    Warning: mysql_pconnect() URL="http://www.irelandwebdesign.biz/function.mysql-pconnect"]function.mysql-pconnect[/URL: Access denied for user 'root'@'localhost' (using password: YES) in /home/ire/public_html/Connections/any.php on line 9

    Fatal error: Access denied for user 'root'@'localhost' (using password: YES) in /home/ire/public_html/Connections/any.php on line 9


    The error is fairly evident of what's wrong. You are using the wrong username/password combination or your MySQL server is denying access which would be strange if it's on localhost.


  • Closed Accounts Posts: 845 ✭✭✭yupyup7up


    as said above, you are probably using the wrong login credentials for the database. Check that the credentials you set are correct.


  • Advertisement
  • Registered Users Posts: 210 ✭✭pjwhite99


    yes thats it i 4got to change over the user and pass fron my testing sql

    thanks


  • Registered Users Posts: 3,140 ✭✭✭ocallagh


    Also, be careful using mysql_pconnect - unless you have a very good reason for it, you should just use mysql_connect.

    Persistent connections can cause strange things to happen


Advertisement