473,651 Members | 3,090 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\n ewland\

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

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\n ewland\ so it is also uploaded to the testing folder of
C:\remote\newla nd\

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_global s off
php_value session.save_pa th C:\home\user\si teroot\sess\use rs
php_value session.cookie_ time 3600
php_value session.gc_maxl ifetime 3600
php_value include_path .:C:\home\user\ siteroot\sess
php_value auto_prepend C:\home\user\si teroot\sess\pat h_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 1720
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\n ewland\

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

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\n ewland\ so it is also uploaded to the testing folder of
C:\remote\newla nd\

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_global s off
php_value session.save_pa th C:\home\user\si teroot\sess\use rs
php_value session.cookie_ time 3600
php_value session.gc_maxl ifetime 3600
php_value include_path .:C:\home\user\ siteroot\sess
php_value auto_prepend C:\home\user\si teroot\sess\pat h_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************ *************** *************** @spamyourself.c om>
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_global s off
php_value session.save_pa th /home/user/siteroot/sess/users
php_value session.gc_maxl ifetime 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_global s 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.co m "Dreamweave r 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_global s 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
3431
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 successfully logged into system. If I enter the wrong information all I get is an erro page HTTP status 502 etc. Can anyone help? <?php
1
5492
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 register a username and password & then login with those details, but so far I am having only marginal success. I am far from an expert on ASP programming, indeed the code I am using comes from "Sams Teach Yourself E-Commerce Programming with ASP" but it...
0
1369
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 subscriber and authentication problems. Specifically, I'm a service tech who has a customer having troubles logging in to her Hotmail account from her particular machine. Other machines login to her account fine, including the machines on my workbench....
9
3583
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 click on a submit button. I want to automate this process by supplying values with HttpWebRequest and then download a file on the site. I think that I cannot invoke the submit button. Pleeeasee help, thanks in advance
0
1287
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 page after login, but I'd like to skip this step and just have the Login control go ahead and do it. So my plan is this: override the OnLoggedIn() method of the Login control with my own custom method that changes the DestinationPageUrl property...
2
1989
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 Studio 2003 Version 7.1.3008 Framework 1.1 Version 1.1.4322 SP1 Windows XP Pro Version 2002 SP2
1
4988
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 - An easy way to classify different pages as either Admin, Member or Public, where login is necessary for Admin and Member but not for Public. My idea was to put the pages in different directories to easily keep my order. - An easy menu system that...
9
3582
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 "myDB" with a table "myUsers" with fields "Username" and "Password". I also have the MySQL ODBC driver loaded with a DSN "dsnMySQL" setup. First question is can someone direct me to a site or provide a sample code for a login page that...
0
1318
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> <title>Login</title>
10
4808
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 Jones, then login as David Smith the Welcome message below will show "Welcome Davey". And it will be Davey's information that is accessible - not David Smith's. So something is amiss but I don't know what. (BTW, this login script is based on the...
0
8361
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8278
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8701
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8466
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8584
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6158
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4144
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2701
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1588
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.