473,385 Members | 1,536 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

login problem

I have written a login code. It works fine in my localhost xampp but
when i upload my files on the web hosting server, i can login but when
i click on the other link within the page, it logs out. What could be
the problem? is it something to do with web hosting?
Jan 28 '08 #1
10 1289
white lightning wrote:
I have written a login code. It works fine in my localhost xampp but
when i upload my files on the web hosting server, i can login but when
i click on the other link within the page, it logs out. What could be
the problem? is it something to do with web hosting?
Probably not. But without seeing the code you're using, it's impossible
to tell.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jan 28 '08 #2
On Mon, 28 Jan 2008 14:18:01 -0800, white lightning wrote:
I have written a login code. It works fine in my localhost xampp but
when i upload my files on the web hosting server, i can login but when i
click on the other link within the page, it logs out. What could be the
problem? is it something to do with web hosting?
My Magic 8 Ball says: The webserver isn't handling sessions they way you
expect it to... but that's a wild guess based on almost no information.

--
I told you this was going to happen.

Jan 28 '08 #3
Thanks for replies... Do I need to provide more info?
Please let me know what I need to provide

thanks!!



On Jan 29, 9:43 am, Ivan Marsh <anno...@you.nowwrote:
On Mon, 28 Jan 2008 14:18:01 -0800, white lightning wrote:
I have written a login code. It works fine in my localhost xampp but
when i upload my files on the web hosting server, i can login but when i
click on the other link within the page, it logs out. What could be the
problem? is it something to do with web hosting?

My Magic 8 Ball says: The webserver isn't handling sessions they way you
expect it to... but that's a wild guess based on almost no information.

--
I told you this was going to happen.
Jan 28 '08 #4
>
On Jan 29, 9:43 am, Ivan Marsh <anno...@you.nowwrote:
On Mon, 28 Jan 2008 14:18:01 -0800, white lightning wrote:
I have written a login code. It works fine in my localhost xampp but
when i upload my files on the web hosting server, i can login but when i
click on the other link within the page, it logs out. What could be the
problem? is it something to do with web hosting?
My Magic 8 Ball says: The webserver isn't handling sessions they way you
expect it to... but that's a wild guess based on almost no information.

I just checked the phpinfo for session on my localhost and web
hosting. This is what i got:

localhost:
Session Support enabled
Registered save handlers files user sqlite
Registered serializer handlers php php_binary wddx

web hosting:
Session Support enabled
Registered save handlers files user mm
Is this causing the problem?

thanks!!


>
--
I told you this was going to happen.
Jan 28 '08 #5
On Jan 28, 10:53 pm, white lightning <crescent...@yahoo.comwrote:
On Jan 29, 9:43 am, Ivan Marsh <anno...@you.nowwrote:
On Mon, 28 Jan 2008 14:18:01 -0800, white lightning wrote:
I have written a login code. It works fine in my localhost xampp but
when i upload my files on the web hosting server, i can login but when i
click on the other link within the page, it logs out. What could be the
problem? is it something to do with web hosting?
My Magic 8 Ball says: The webserver isn't handling sessions they way you
expect it to... but that's a wild guess based on almost no information.

I just checked the phpinfo for session on my localhost and web
hosting. This is what i got:

localhost:
Session Support enabled
Registered save handlers files user sqlite
Registered serializer handlers php php_binary wddx

web hosting:
Session Support enabled
Registered save handlers files user mm

Is this causing the problem?

thanks!!
--
I told you this was going to happen.
Are you using php sessions at all? If you're using plain cookies, the
issue might be wrong cookie-domain / cookie-path.

--
Kailash Nadh | http://kailashnadh.name
Jan 29 '08 #6
white lightning wrote:
>On Jan 29, 9:43 am, Ivan Marsh <anno...@you.nowwrote:
>>On Mon, 28 Jan 2008 14:18:01 -0800, white lightning wrote:
I have written a login code. It works fine in my localhost xampp but
when i upload my files on the web hosting server, i can login but when i
click on the other link within the page, it logs out. What could be the
problem? is it something to do with web hosting?
My Magic 8 Ball says: The webserver isn't handling sessions they way you
expect it to... but that's a wild guess based on almost no information.


I just checked the phpinfo for session on my localhost and web
hosting. This is what i got:

localhost:
Session Support enabled
Registered save handlers files user sqlite
Registered serializer handlers php php_binary wddx

web hosting:
Session Support enabled
Registered save handlers files user mm
Is this causing the problem?

thanks!!


>>--
I told you this was going to happen.

Who knows? As Ivan said - show us the code.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jan 29 '08 #7
On Jan 30, 12:35 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
>
Do you have session_start() at the top of every page - before ANY output?
Yes i have session_start() at the top of every page.
Jan 30 '08 #8
On Jan 30, 1:19 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
OK, what do you have in $_SESSION when it fails?

echo "<pre>\n";
print_r($_SESSION);
echo "</pre>\n";
when it fails, i get an empty array: Array(). Obviously, it has logged
out and has removed all the session values.
Do you have full error reporting and display_errors enabled on the
failing server?
on the failing server, display_errors is on and error_reporting is set
to 2039
What are thePHPversions on the two systems?
localhost: PHP Version 5.2.1
Failing server: PHP Version 4.4.7

Jan 30 '08 #9
white lightning wrote:
On Jan 30, 1:19 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
>OK, what do you have in $_SESSION when it fails?

echo "<pre>\n";
print_r($_SESSION);
echo "</pre>\n";

when it fails, i get an empty array: Array(). Obviously, it has logged
out and has removed all the session values.
Not so obvious to me. All it shows is that you have an empty session
array. There could be plenty of reasons - bad session id, for instance.
Or the server not storing the session information properly, or any of
about 100 other reasons.

So, in your login code, set another variable in the session which you
don't clear. is the $_SESSION array still empty?

>Do you have full error reporting and display_errors enabled on the
failing server?

on the failing server, display_errors is on and error_reporting is set
to 2039
Which means E_NOTICE is disabled. You should have it enabled, also.
Any messages then?
>What are thePHPversions on the two systems?

localhost: PHP Version 5.2.1
Failing server: PHP Version 4.4.7

That should be OK - except that PHP 4.x is now past end of lifetime.
Your hosting company should have upgraded to 5.x months ago. That part
bothers me. If they haven't upgraded their PHP, is there something else
they're not doing correctly?

Maybe that's an unfounded worry, but I don't know. Two types of admins
bother me - those who upgrade immediately after something comes out, to
maintain "the latest and greatest", and those who don't upgrade until
they have to replace the hardware.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jan 30 '08 #10
white lightning wrote:
yes it is a .php file... the <formtags go inside my php code like
shown below. The below code appears on every page.
But you STILL haven't done what I asked several posts ago - to set
something in the session when someone logs on and NOT clear it when they
log off.

Additionally - ensure that error reporting is set to E_ALL and display
errors is enabled on the failing system.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Feb 2 '08 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Sniffer-Dog | last post by:
Hi I just wondered if anyone can spot anything wrong with the following? I have now added the session_start(); as the first command in the code to all the pages needing it. When I click on a...
5
by: Simon | last post by:
Hi, I have a Login.php page that logs the user in and out. I has two forms within the page, (depending on what we are trying to do), either one to log in or out. The form calls itself using a...
1
by: John Davis | last post by:
I put a little login (username and password textfields) in a web page, and once the user able to login, I want the username and password textfields will disappear, and replace with text " has...
0
by: Mike | last post by:
I can not figure out what is going on here. I hope somebody can please help!!! I've got an intranet ASP3 application running on a Win2k server. This application requires a login, so the user...
1
by: Wayne Smith | last post by:
Applies to: Microsoft FrontPage 2000, Microsoft Access 2000, IIS 5.0 Operating System: Microsoft Windows 2000 Professional I am trying to protect a portion of a web site by allowing users to...
2
by: Tom Loach | last post by:
Our system administrator set up an NT server group in order to allow our users to login to our application via https to our sql server. The group appears as a User in SQL Server when you look at...
2
by: Rujuta Gandhi | last post by:
Hi All, I am facing a very crucial problem. Im developing a web application using .net studio 2005(beta). I want my Login.aspx page to be secured(https) for encrypted login information...
1
by: xcelmind | last post by:
Hello Dev. Guru, I want to at this time introduce myself. I am Stanley Ojadovwa by name. I’m a freelance and a newbie in web application development. I’m currently using ASP as my application...
4
by: RN1 | last post by:
I am working on WinXP Pro SP3, .NET 2.0 & SQL Server 2005 (Windows Authentication). When I run a ASPX page that connects to SQL Server, the following error gets generated: Login failed for user...
10
by: DavidPr | last post by:
When I logout as one user and log in under a different user, it opens with the last user's information. User 1 - Unsername: Davey Jones User 2 - Unsername: David Smith I log out from Davey...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.