Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

DW8 Restricting Access using PHP

New Here ,
Jun 18, 2007 Jun 18, 2007
I'm sure there is a simple explanation for what is happening, but I have no idea what that would be. I have set up one site with an admin section and had some problems with restricting access to the pages, but somehow I got it to work (that was several months ago). I'm having a similar issue with a new site that has a very similar admin section. If I try to log in to the index.php page which has been restricted it kicks me over to the login page, I login in and then I can see the index.php page. But if I try to access a page one more level down, it won't let me and just keeps returning me to the loginfailed page. I'm using the same web hosting company so I don't think that's the problem. It acts as though it's not connecting to the database, but I checked the connections and they seem to be working fine. Any suggestions would be appreciated. By the way, I'm using PHP and MySQL and the username and password are stored in a database. I'm only trying to restrict the pages by username and password.
TOPICS
Server side applications
302
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 21, 2007 Jun 21, 2007
you might check to see if session_start(); is on your restricted pages as php needs this to keep the sesion alive
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 21, 2007 Jun 21, 2007
LATEST
Thank you for the advice and I double checked and the pages do have session_start(); I'm putting the code in via the Server Behaviors --> User Authentication --> Restrict Access to Page. It works on the pages that are at the same level as the login page and one level below that. However, if I go in another level then it won't work. I'm not sure if that has anything to do with it, but it's a pattern.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines