close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Error when creating Security pages for admin back-end

Thread began 7/29/2013 4:58 pm by Freddy | Last modified 8/01/2013 7:24 am by Jason Byrnes | 4779 views | 7 replies |

Freddy

Error when creating Security pages for admin back-end

Hi,

I was trying to create the user login pages for the Admin back-end of my client's website with Security Assist.
It created the pages, however, when trying to manage the security of these pages, it modifies the test.php file with the following code right above the code to call the database connection:

<?php require_once( "../webassist/security_assist/helper_php.php" ); ?>
<?php
if (!WA_Auth_RulePasses("Logged in to pcms2_users")){
WA_Auth_RestrictAccess("index.php");
}
?>

This is when I encounter the problem because when attempting to go to the login page (renamed "index.php") it gives me a "This webpage has a redirect loop" page

What I was trying to achieve is redirect the user back go the login page (called index.php) when trying to access selected pages in the back-end, when they are Not logged in.

Attached files in question. Also, under link below:
http://zozayacreative.com/TLM/admin


Help please!

Sign in to reply to this post

Jason ByrnesWebAssist

on the index page, you have the logged in access rule applied at line 85 - 89:


php:
<?php

if (WA_Auth_RulePasses("Logged in to pcms2_users")){
    
WA_Auth_RestrictAccess("");
}
?>




this is preventing access to the page.

Sign in to reply to this post

Freddy

Hi Jason,

Thanks for your quick response.
However, I just tried taking out that php code from line 85 - 89, and it still does not go to the page.

Any idea as to where else the source of the problem might be?

Sign in to reply to this post

Jason ByrnesWebAssist

I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

Freddy

Hi Jason,

Please see details in private below

Sign in to reply to this post

Jason ByrnesWebAssist

you had added the access restriction code to the connection file Connections/test.php:

<?php require_once( "../webassist/security_assist/helper_php.php" ); ?>
<?php
if (!WA_Auth_RulePasses("Logged in to pcms2_users")){
WA_Auth_RestrictAccess("index.php");
}
?>

that was causing the access to the admin/index page to fail.

Sign in to reply to this post

Freddy

Hey Jason,

That was weird... I noticed the interface added that piece of code when it generated the pages.

However, when i take that piece of PHP code from the test.php page, I run into a couple other issues.:

For some reason, the login page loads up with the error messages already showing, before ever typing any info in the fields.

Also, when I try loading the registration.php page, it gives me the following error:

"Fatal error: Call to undefined function WA_Auth_RulePasses() in /home/content/23/9114623/html/TLM/admin/registration.php on line 81"

I looked in this file on line 81, but don't know really what I am supposed to edit in order for it to work.

attached the files

Sign in to reply to this post

Jason ByrnesWebAssist

after the security assist wizard creates the pages, it opens the access pages manager window for you to apply access restriction to the pages in your site.

the only way the access rule would have been applied to the connection file is if you selected the connection file in the access pages manager.

for the registration page, it is missing the following code at line 1:

php:
<?php require_once( "../webassist/security_assist/helper_php.php" ); ?>




the login page is showing validation errors because some of the spry assets files are missing from the server, for example:
http://www.zozayacreative.com/TLM/SpryAssets/SpryValidationPassword.js

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...