Hi All;

Please help!

I am on the verge of hanging myself. I successfully installed Drupal a couple of days ago and happily began to configure it and experiment and of course upload a bunch of content.

The intended use is for an on-line Policies Manual and it seems that the BOOK module should work quite nicely for my purposes. However last night when I was going through some of the configurations I managed to somehow get locked out. I do get the Username, Password, Login block however it always takes me to a Page Not Found Message.

I was messing with a couple of different user names and wondered if I hadn’t done a second login for the same user that might cause the grief. As well I was trying to include a custom html 403 error file that I parked in the Drupal root directory in a file named “err”. Other than this, I can’t think of anything that might contribute to the problem. I don’t think that there was anything particularly foolish.

I found nothing very helpful on the support forum, so I chalked it up to bad luck and a fluke and vowed to take another run at it.

So this evening I did another installation of Drupal. Oops! The same thing happened. Again I was messing with a number of different settings and attempting to add the 403 and 404 custom error html files. By the way I upgraded to 6.4 on the new install while I was at it. Absolutely no duplicate user login this time either.

This time I created a “Super user” and gave all permissions and can’t get in with that either.

Could anyone shed some light on what I may be doing to keep me from sleeping?

I really like what I see as terrific functionality for the application that I am working through, but I am obviously very frustrated. I know that there is a certain learning curve for this, and I am prepared to invest the time, but so far it is one step forward and one step back.

I may be in over my head here as I am not a programmer and have very limited experience with databases.

Please help me to figure out what I may be doing wrong, or to work around this so that I can login.

Ray

Comments

gpk’s picture

People usually set up a node/page on the Drupal site for use as the 404 page, and another for the 403, if they want this functionality, but I guess there's no reason why you couldn't point Drupal to static pages sitting in your main Drupal folder. The only benefit I can see though is that the server will love you for serving a static HTML page ... the downside being that you won't automatically get your home page link from the logo, plus primary links if you have them.

Can you tell if you are actually getting logged in or not? (if you have phpMyAdmin with your hosting account it's very easy to work this out by looking in the table called {watchdog}.) What happens if you try and log in at the page /user ???

gpk
----
www.alexoria.co.uk

raycou’s picture

Thanks for the response.

And I was just kidding about hanging myself. Didn’t even loose any sleep, but I sure am frustrated, so your advice is most welcome.

It seems to me that the login fails since when the “page not found” page appears, there is no sidebar, just the header with logo and title. That’s all.

As you can tell, I am not very accomplished at this, but it is interesting and fun. For some reason, I am leaning towards the theory that the 403 page has something to do with this problem.

Because of the nature of the proposed content of the site, I need to have it set up so that “anonymous” visitors will not be able to view any content. That is about the only other clue that I can think of. As mentioned earlier, I set up a “super user” and gave that login all permissions.

The site is hosted on SiteGround that has the cPanel with phpAdmin function. I have never used it, and took a quick look at it. It isn’t too obvious to me from the interface as to find the table called {watchdog}. Unfortunately I have some other commitments for a couple of hours, but when I can I will try to figure out how to use it.

And, not wanting to throw in the towel as yet, I may just set up another Drupal installation. By the 3rd time I should be getting fairly speedy at it. Next time the 403 and 404 pages will go in a node. And I will say a little prayer!

Cheers,

Ray

raycou’s picture

I found the phpMyAdmin watchdog table. Each time that I try to login it increments another "page not found" etc. as I look at the Browse page, so the answer is that I am still on the outside hoping for a miracle.

Ray

gpk’s picture

Can you post the URL of your site? Maybe the login form is being submitted to the wrong URL -> not found error.

From what you say there aren't any "New session opened..." messages so it looks like the page not found is occurring before you get logged in.

gpk
----
www.alexoria.co.uk

raycou’s picture

Thanks for staying with me on this. It is very much appreciated.

The URL for the second (last) site is http://ptliving.net/int/

The first one is http://ptliving.net/pp/

As for the phpMyAdmin watchdog table, I can see what appears to me to be earlier successful logins, so I am presuming that the “page not found” (most recent attempts) comment in the table is suggesting that I am still on the outside.

Cheers,

Ray

raycou’s picture

I’m thinking out loud here, but wondering if I was able to access either the php code or the table in MySQL where I pointed the 404 errors to the folder in the root directory, and directed it back to wherever it lives by default, that might resolve the issue.

I did delete the “err” folder and files to see if that might get me in. Only wishful thinking.

As I mentioned earlier I can easily set up another instance of Drupal, however I would really like to know what dumb move I am making that causes this condition so that I don’t ever, ever, ever, do it again.

Is there a file that I could copy over or some other method to reset the system?

Regards,

Ray

gpk’s picture

The problem is caused by attempting to use a page outside the Drupal site as your 403 page.

The login block includes the following:

  <h2>User login</h2>

  <div class="content"><form action="/int/403_error.htm?destination=node"  accept-charset="UTF-8" method="post" id="user-login-form">
...

This is because when an anonymous user attempts to visit the home page (or any page) they get an access denied error. The login block is set to show on all pages including on 403 error. The 403_error.htm file does not exist, so Drupal tries to handle the request, but it doesn't corresond to a Drupal path either. Therefore you get a default error page (Drupal is clever enough at this point not to give you a 404).

However when the form is submitted to the 403_error.html page, Drupal tries to handle it but as you have found ends up at a 404 error. The login block doesn't display on the 404 page hence the form submission absolutely cannot be handled.

Solution: log in at http://ptliving.net/int/user and then clear the setting for the 403 error page. You can point it to a page on the site if you want.

gpk
----
www.alexoria.co.uk

raycou’s picture

Thanks, now that I know what caused this, I can move ahead with a lot more confidence. BIG RELIEF!!!

However, being somewhat dense, I am still not sure how to set up a custom ‘Access Denied” page.

In the Error Reporting set up page, it presents the first part of the path as http://ptliving.net/int/ , so my simplistic logic suggested that I could simply create a folder and put my custom html pages in it. Hence the “err/403_error.htm” that went into the box.

You have clearly demonstrated that this doesn’t fly. When I cleared the box I now get the message:
Access denied
Sorry, unrecognized username or password. Have you forgotten your password?
You are not authorized to access this page.

So I am still confused as to where I can park these custom html pages and invoke them.

I haven’t been playing very much outside the use of the “Book” functionality, so perhaps I have blinders on with respect to nodes, etc. So if it isn’t a parent or child situation, I am left scratching my head. I will get there eventually though.

I apologize if I seem really, really, really dense about this.

Regards,

Ray

gpk’s picture

>confused as to where I can park these custom html pages and invoke them
You can't have an independent, separate HTML page as the 403 page. Unfortunately the descriptive text on the Error reporting page doesn't make this clear (there is a bug report open for this #122442: Error Reporting's default descriptive text is incomplete.).

What you can do is to create an ordinary page on your site at node/add/page, set the input format to Full HTML and then include any custom HTML/layout you want (then specify the path to that page to be your Default 403 (access denied) page). However it will be presented in the same way as other pages on the site according to the active theme, i.e. with header section, sidebars/blocks, and any footer. If you want a completely different look/feel to the 403 page then that can be done via themeing. It is actually possible to use a static .htm page (though I can't really see any benefit in that) but it would require a slight tweak to the login form [hence for most users this is not an option].

gpk
----
www.alexoria.co.uk

raycou’s picture

Thanks gpk;

Sorry to be tardy with my gratitude. I was off on a business trip for a few days and had no opportunity to follow up on this.

I thought at a custom 403 page would be a nice touch, however it seems to me that the only way that it would be presented would be is the visitor was already logged in.

I did some snooping around on the forum and discovered a few threads that addressed this. It seems that the CustomError module might be a solution. I’m still confused but you have been a huge help.

Cheers,

Ray