madson_gr
-
Posts
6 -
Joined
-
Last visited
Posts posted by madson_gr
-
-
and did you add the two error_reporting/display_errors setting lines to the profile.php page?
yes.. same 500 (internal server) error
-
the most likely causes of the problem with the code is that your file(s) are outputting something to the browser before the session_start() statement (your localhost development system may have a setting turned on that allows the code to work under this condition) or that sessions are not configured correctly on the server.
please post the first few lines of your code showing where and how you added the two lines that i suggested.
I tried all files below.that make my register system:
register.php -> register_success.php (include connection, functions and redirect user to log_register.php) ->
log_register.php (same code of login.php but redirect user to complete his profile through process_login_completereg.php ):
process_login_completereg.php:
<?php ini_set("display_errors", "1"); error_reporting(-1); include_once 'db_connect.php'; include_once 'functions.php'; sec_session_start(); if (isset($_POST['email'], $_POST['p'])) { $email = $_POST['email']; $password = $_POST['p']; // The hashed password. if (login($email, $password, $mysqli) == true) { // Login com sucesso header('Location: ../profile.php'); } else { // Falha de login header('Location: ../index.php?error=1'); } } else { echo 'Invalid Request'; } ?>
after this the user is redirected to profile.php to complete his informations. This is the part where I get the message that "You don't have permission....", asking me to login (again).
-
if you were previously getting the - Você não está autorizado a acessar essa página, favor fazer o login. message from your code, but now you are getting a http 500 error after adding the two error_reporting/display_error lines, that would indicate that you messed up the php source code somehow and it's likely producing a php syntax error. review where and how you added those two lines of code to make sure the php syntax is not broken.
I did like you said...right after the first <?php ...
Tried after connection too and I get the same error...
The weird is that I´m not having any problems in my localhost (wamp server).
My php version is 5.5 and godaddy´s version is 5.4...
Is there any conflict?
-
you are likely having an error with the session_start(). for debugging purposes, add the following two lines of code immediately after the first opening <?php tag in your main files, i.e. the files that are being requested via a url, and see what sort of php errors there may be -
ini_set("display_errors", "1"); error_reporting(-1);
I agree...
I just get a 500 (internal server) error page...could not see session errors....Any idea of what changes I could write?
-
Hi,I have a login/register system based on this tutorial: http://pt.wikihow.com/Criar-um-Script-de-Login-Seguro-em-PHP-e-MySQLIn my localhost everything works fine. When I uploaded it to godaddy servers, I can register the new user but I cannot login into the users' pages. It looks like password or salt does not match, or after compare login data, it´s telling me the message: You don´t have permission to see this page, please login.Do you have any idea of what might be? Godaddy support told me they cannot help. They just fix their own services.Thanks in advance.
Localhost x Godaddy servers error
in PHP Coding Help
Posted
when I type a code to return me the username at the top to confirm what user is logged in, I get no user/username
this is profile.php
functions.php