Hi all,
The url for the tiny web app I have hosted for free is http://thestoryofmh370.x10host.com
If a visitor is a registered user, the visitor can log in and modify the site contents. The login script is very basic:
<form action="<?php print HTTP . 'includes/login_post.php'; ?>" method="POST">
So it is pretty clear that the form will be processed at the file "login_post.php". This file, in turn, will validate the text inputs. If the login is successful, the browser is redirected to the index.php page without trouble. If login is unsuccessful, the browser is still redirected to the index.php page except that error messages are displayed near the text input fields ("Incorrect username/password", "Username cannot be blank", etc.).
For the first few days after I started operating the app, I was able to login/logout and make modifications (it's a dynamic site with MySQL databases) as needed.
This was a period perhaps between 13 October 2015 to 27 October 2015, which is just over 2 weeks.
Right around after that period, I suddenly encountered a blank page every time I logged in. The "login_post.php" wasn't redirecting me back to the index.php page anymore. I have complete control over the app, so I can use multiple registered usernames on it. All the usernames were not logging in, or even at least redirecting to the index.php page to reflect any login errors.
It was working before without any problems and then it wasn't.
Just this afternoon, I looked at the advice in x10hosting's Help Center, where one of the "Popular Questions" is tagged "My website is showing a blank page." The advice given was pretty sensible, which is to change the "display_errors" directive in the PHP Settings to "on" and to change the "error_reporting" directive to the appropriate "E_ALL" or "~E_"-whatever setting is appropriate. I do the same thing on my own local test server so I have a sufficient understanding of how it works. Doing so would logically display on my browser whatever PHP error may have been thrown during the POST request and response of the form processing.
What actually happened when I tested logging in after changing the PHP settings was somewhat of a surprise. Everything suddenly worked the way it was supposed to, without any PHP errors being displayed. I can login again, I can login with intentional errors to test the form error reporting, and I can again make changes to the app contents.
I'm pretty sure that changing the PHP settings wasn't significant. I have the same files in my development server, and reproducing those steps won't do squat.
Can anyone helpfully explain to me what may have happened? And now that I can use the app normally, would it mean that I may experience the white pages again?
By the way, I've restored the PHP settings to their defaults, since my web app is so simple and tiny that I wouldn't really need to alter any existing PHP directives.
Any help would be greatly appreciated. Thank you and I hope to hear from any gracious member.
The url for the tiny web app I have hosted for free is http://thestoryofmh370.x10host.com
If a visitor is a registered user, the visitor can log in and modify the site contents. The login script is very basic:
<form action="<?php print HTTP . 'includes/login_post.php'; ?>" method="POST">
<ul>
<li>
<li>
</ul><label for="username">Username</label>
<input type="text" name="username" id="username" autocomplete="off" value="" />
<?php
</li><input type="text" name="username" id="username" autocomplete="off" value="" />
<?php
if(Session::exists('username')){
?>echo '<p class="error">' . Session::flash('username') . '</p>';
}<li>
<label for="password">Password</label>
<input type="password" name="password" id="password" autocomplete="off" value="" />
<?php
</li><input type="password" name="password" id="password" autocomplete="off" value="" />
<?php
if(Session::exists('password')){
?>echo '<p class="error">' . Session::flash('password') . '</p>';
}<ul>
</form><li id="desc_inline">
</ul><input type="checkbox" name="remember" id="remember" />
<p class="remember">Remember me</p>
<input type="hidden" name="token" value="<?php echo Token::generate(); ?>" />
<input type="submit" value="Log In" />
</li><p class="remember">Remember me</p>
<input type="hidden" name="token" value="<?php echo Token::generate(); ?>" />
<input type="submit" value="Log In" />
So it is pretty clear that the form will be processed at the file "login_post.php". This file, in turn, will validate the text inputs. If the login is successful, the browser is redirected to the index.php page without trouble. If login is unsuccessful, the browser is still redirected to the index.php page except that error messages are displayed near the text input fields ("Incorrect username/password", "Username cannot be blank", etc.).
For the first few days after I started operating the app, I was able to login/logout and make modifications (it's a dynamic site with MySQL databases) as needed.
This was a period perhaps between 13 October 2015 to 27 October 2015, which is just over 2 weeks.
Right around after that period, I suddenly encountered a blank page every time I logged in. The "login_post.php" wasn't redirecting me back to the index.php page anymore. I have complete control over the app, so I can use multiple registered usernames on it. All the usernames were not logging in, or even at least redirecting to the index.php page to reflect any login errors.
It was working before without any problems and then it wasn't.
Just this afternoon, I looked at the advice in x10hosting's Help Center, where one of the "Popular Questions" is tagged "My website is showing a blank page." The advice given was pretty sensible, which is to change the "display_errors" directive in the PHP Settings to "on" and to change the "error_reporting" directive to the appropriate "E_ALL" or "~E_"-whatever setting is appropriate. I do the same thing on my own local test server so I have a sufficient understanding of how it works. Doing so would logically display on my browser whatever PHP error may have been thrown during the POST request and response of the form processing.
What actually happened when I tested logging in after changing the PHP settings was somewhat of a surprise. Everything suddenly worked the way it was supposed to, without any PHP errors being displayed. I can login again, I can login with intentional errors to test the form error reporting, and I can again make changes to the app contents.
I'm pretty sure that changing the PHP settings wasn't significant. I have the same files in my development server, and reproducing those steps won't do squat.
Can anyone helpfully explain to me what may have happened? And now that I can use the app normally, would it mean that I may experience the white pages again?
By the way, I've restored the PHP settings to their defaults, since my web app is so simple and tiny that I wouldn't really need to alter any existing PHP directives.
Any help would be greatly appreciated. Thank you and I hope to hear from any gracious member.