cannot view php application in the browser

Hi

i have some database application made in php and mysql ,before they were fine all these application are in my network..
some of these application need a user name and password to get in and others no
the one with user name and password are not working blank page is displayed even if the password is correct but the one they don't need password are working fine
Regards
A.S
asaidiAsked:
Who is Participating?
 
shobinsunConnect With a Mentor Commented:
Hi,

The default PHP /tmp/ directory used for saving sessions is disabled on  servers due to  the security issues associated with a excessively large number of sites using the same directory for sessions.

you will be required to change the session save path from /tmp to your home directory. Your home directory is the absolute server path to your hosting space on the servers. You must create a /tmp directory on your home folder via FTP.

The below code should be added to your file before the session_start () function:
ini_set("session.save_handler", "files");
session_save_path ($_SERVER['DOCUMENT_ROOT']."/tmp/");


Hope this will help you some kind.

Regards
0
 
akashjCommented:
I think without the code, its going to be difficult to diagnose/fix
0
 
shobinsunCommented:
Hi.

Please give the code.
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
asaidiAuthor Commented:
Hi

please find the two files for login system
the first is main_login.php
and the second is check_login.php
check-login.txt
main-login.txt
0
 
asaidiAuthor Commented:
Hi
any solution..

the problem i found that the application that i made without user name and password works but the one with user name and password they don't work and i have the right user name and password it is like the value i put in user name and password are not working
0
 
shobinsunCommented:
Hi,

With your code, I can login successfully with 'wiesia/euro'  and  'admin/0sasufichni7'.

Then what is your problem actually?
0
 
asaidiAuthor Commented:
Hi
my problem is when i login with right user name and password  i have an empty page ,and when i put a wrong username and password i have message wrong username or password
i conclusion i cannot get the main page (menu)
i dont know if it is a problem with browsers ( i tried with firefox and ie7)
0
 
shobinsunCommented:
Hi,

You cannot login with 'wiesia/euro'  or   'admin/0sasufichni7' with this?
0
 
asaidiAuthor Commented:
i can login they are right login user and password but the problem the main menu is empty it is like the variables are not registered for the next page (index.php) and it was working perfect
0
 
shobinsunCommented:
Hi,

I think you didnt use the "session_start();" in the starting of index.php
0
 
asaidiAuthor Commented:
Hi
that is my start page in index.php
<?php
session_start();
if(!session_is_registered(user)){
header("location:main_login.php");
exit();
}
0
 
shobinsunCommented:
Ok,

Check that:

session_start();
$myusername = $_SESSION["user"] ;

$mypassword = $_SESSION["password"];
echo "<br>US:",$myusername;
echo "<br>PWD:",$mypassword;
0
 
asaidiAuthor Commented:
Hi

in which script is it in index.php or check_login.php
0
 
shobinsunCommented:
hi,

in index.php
0
 
asaidiAuthor Commented:
hi
nothing happened..
0
 
asaidiAuthor Commented:
Hi

when i copied all the files from the server and past them in my own pc in www location and
run
http://localhost/aslkk/index.php it is working
and i can see us and pwd means the session is registered but from the server no
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.