473,378 Members | 1,510 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,378 software developers and data experts.

Login problems

Hello

I have created login pages but am having problems when I test them for
my site.

When I type all the registration info in it accepts it no problem.
When I try and sign in though and then try and access the restricted
pages it takes me back to the login page.

The local root folder for the site is:
C:\dw_dynapps\newland\

The remote folder and testing server for the site is:
C:\remote\newland\

The URL is:
http://localhost/newland/
I am wondering whether it is something wrong with my .htaccess file?
And whether it is in the right location?

I get a tad confused testing locally because I never know where to put
things and what the site root is?

I have put the .htaccess file in the same folder as
C:\dw_dynapps\newland\ so it is also uploaded to the testing folder of
C:\remote\newland\

Is this the right place? If my site is upload to the remote folder
would that then mean that the site root with just be the C drive, and
that's where it should be located?

In case it is already in the right place, and it might be something
wrong in the actual file, this is what I have inside the file:

php_flag register_globals off
php_value session.save_path C:\home\user\siteroot\sess\users
php_value session.cookie_time 3600
php_value session.gc_maxlifetime 3600
php_value include_path .:C:\home\user\siteroot\sess
php_value auto_prepend C:\home\user\siteroot\sess\path_file.php

Again, I'm not sure if I have the paths correct because I'm not sure
when testing locally.

Cheers for any help

John


Win XP Pro / DW 7.0.1
Running locally: Apache 2.0.49 / PHP 4.3.7 / MySQL 4.0.20a
Jul 17 '05 #1
2 1710
Hi John,

3 remarks that hopefully can help you:

1) Study the difference between a directory on your harddisk and a directory
served by a webserver.
It is very strange that you tell us where which actual directory you use.
The webserver is responsible to serve a certain directory (and its
subdirectories) but can serve them to the client under a completely
different name. That is not uncommon.

If you say your URL to your remote server is http://localhost/newland I
expect you are making a mistake. Unless configured very strangely,
localhost always point the machine you type localhost in. (127.0.0.1)

2) .htaccess file.
Such a file contains AuthName, AuthUserFile, AuthGroupFile.
Did you set that up correctly on the servermachine?
More to-the-point: Do the files named in .htaccess exists on that machine?
And do the values in those file make sense?
Only copying the .htaccess file is not enough!

3) This is just a hint: It you accidentely put wrong hyperlinks (like
http://localhost/etc) into your app, or wrong form-action values, you may
go from your remote server to your local server, maybe without noticing it.
In that case your cookies will be invalid because your browser considers
them to be different domains. (luckily)

Hope that help.

Good luck.
Regards,
Erwin Moller
Hello

I have created login pages but am having problems when I test them for
my site.

When I type all the registration info in it accepts it no problem.
When I try and sign in though and then try and access the restricted
pages it takes me back to the login page.

The local root folder for the site is:
C:\dw_dynapps\newland\

The remote folder and testing server for the site is:
C:\remote\newland\

The URL is:
http://localhost/newland/
I am wondering whether it is something wrong with my .htaccess file?
And whether it is in the right location?

I get a tad confused testing locally because I never know where to put
things and what the site root is?

I have put the .htaccess file in the same folder as
C:\dw_dynapps\newland\ so it is also uploaded to the testing folder of
C:\remote\newland\

Is this the right place? If my site is upload to the remote folder
would that then mean that the site root with just be the C drive, and
that's where it should be located?

In case it is already in the right place, and it might be something
wrong in the actual file, this is what I have inside the file:

php_flag register_globals off
php_value session.save_path C:\home\user\siteroot\sess\users
php_value session.cookie_time 3600
php_value session.gc_maxlifetime 3600
php_value include_path .:C:\home\user\siteroot\sess
php_value auto_prepend C:\home\user\siteroot\sess\path_file.php

Again, I'm not sure if I have the paths correct because I'm not sure
when testing locally.

Cheers for any help

John


Win XP Pro / DW 7.0.1
Running locally: Apache 2.0.49 / PHP 4.3.7 / MySQL 4.0.20a


Jul 17 '05 #2
On Mon, 26 Jul 2004 10:04:27 +0200, A strange species called Erwin
Moller <si******************************************@spam yourself.com>
wrote:
Hi John,

3 remarks that hopefully can help you:

1) Study the difference between a directory on your harddisk and a directory
served by a webserver. It is very strange that you tell us where which actual directory you use.
The webserver is responsible to serve a certain directory (and its
subdirectories) but can serve them to the client under a completely
different name. That is not uncommon.

If you say your URL to your remote server is http://localhost/newland I
expect you are making a mistake. Unless configured very strangely,
localhost always point the machine you type localhost in. (127.0.0.1)
I am just working through my book on Dreamweaver and PHP by Jeffrey
Bardzell, and this is the URL that was specified to use as localhost
is where Apache serves the pages to from it's root folder.
2) .htaccess file.
Such a file contains AuthName, AuthUserFile, AuthGroupFile.
What I read in the manual at php.net suggested the following for the
..htaccess file:

php_flag register_globals off
php_value session.save_path /home/user/siteroot/sess/users
php_value session.gc_maxlifetime xxx
php_value include_path .:/home/user/siteroot.com/sess
php_value auto_prepend /home/user/siteroot.com/sess/path_file.php

It didn't say any of the things you mentioned above.
Did you set that up correctly on the servermachine?
I don't have a clue what AuthName, etc are. I just want to get
sessions working without register_globals being on.
More to-the-point: Do the files named in .htaccess exists on that machine?
I dont know. Like I said I don't understand the paths, I am just a
newbie, and no one has said that I would need to create any additional
files. I've just been told to use a .htaccess file. If this is going
to cause so much problems I'm not sure if it is really worth it. Is
there an easier way to get sessions to work without globals being
switched on?
And do the values in those file make sense?
Only copying the .htaccess file is not enough!
Okay. I think this .htaccess file is more trouble than its worth. In
previous replies to my posts in this group nobody said I would need to
create anything other than a .htaccess file. I didn't know I would
need to create lots of additional files in different locations. I was
told a .htaccess file in the folder above where I keep the webfiles
will sort everything out for sessions.
3) This is just a hint: It you accidentely put wrong hyperlinks (like
http://localhost/etc) into your app, or wrong form-action values, you may
go from your remote server to your local server, maybe without noticing it.


I am just following this book in the top right corner at
allectomedia.com "Dreamweaver MX 2004 with ASP, ColdFusion, and PHP:
Training From the Source" By Jeffrey Bardzell

This is the correct URL for the site, running locally with apache, php
and mysql on Windows XP.

All I want to do is to get sessions to work locally without turning
register_globals on as everyone has advised not to.

John
Jul 17 '05 #3

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

Similar topics

4
by: XP | last post by:
I am having problems with the blow page. I have a login page where I enter the userid and password. This then connects to this page. If I enter the userid and password correctly, it prints...
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...
0
by: Ed Ploy | last post by:
Would anyone care to point me to a good site or group for troubleshooting user .Net / Passport login problems? I've turned up a lot of development info (such as this group), but little on...
9
by: buran | last post by:
Dear ASP.NET Programmers, How can I post data to an ASP.NET login page and pass authentication? The login page uses forms authentication, users must supply usernames and password and have to...
0
by: Steve Commisso | last post by:
I'm trying to create a forked login where users of certain roles will be redirected to specific pages. The easy way to do this would be to do the redirecting in the Page_Load() of the default...
2
by: Gary Coutts | last post by:
Hi, I am have problems redirecting from a login page. The login page is simple, with just 2 textboxes and one button. On the button click the routine below is called: I am using: Visual...
1
by: Jakob Lithner | last post by:
When I started a new ASP project I was eager to use the login facilities offered in Framework 2.0/VS 2005. I wanted: - A custom principal that could hold my integer UserID from the database -...
9
by: Ben | last post by:
Hello, I'll bet this has been asked a million times but I can't seem to find a thread that gives the clear example I need. This PC has MySQL and IIS configured and running. The MySQL database is...
0
by: kang jia | last post by:
hi i have small problems occurred in my login function, which i use Django to build, in my template which is login.html, the code is like the following: <html> <head>...
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: 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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.