Page 1 of 2

Issue with Admin Module after 1.3 -> 1.4.1 upgrade

Posted: Tue Feb 10, 2009 6:26 pm
by PeteHelgren
It seemed like the upgrade from 1.3 to 1.4.1 went smoothly. The blog displays and I can log into the admin module. However, every link I click on in the admin module takes me to the admin login screen again. It is almost like the authentication is failing and yet I CAN log in, I just can't navigate to any links.

Suggestions?

Thanks!

Re: Issue with Admin Module after 1.3 -> 1.4.1 upgrade

Posted: Tue Feb 10, 2009 9:09 pm
by Don Chambers
Sounds like a cookie issue... I think I ran into this myself before. Clear your browser cookies. You could also try logging out, then log in, and before trying any of the other admin links, shift-reload the admin page. Then try one of the admin links.

Re: Issue with Admin Module after 1.3 -> 1.4.1 upgrade

Posted: Tue Feb 10, 2009 11:31 pm
by PeteHelgren
Don,

Thanks! That jogged my memory a bit because I thought I had seen this before. Unfortunately it didn't work this time around. I went to a PC that had never logged into the admin module before, cleared the cookies, and then logged in. No joy. Every link takes be back to the login page.

Re: Issue with Admin Module after 1.3 -> 1.4.1 upgrade

Posted: Wed Feb 11, 2009 1:02 am
by Don Chambers
Sure seems like a session or cookie issue, and I'm just not that familiar with the inner workings of that.... and I just saw another forum user encountering the same problem here: http://board.s9y.org/viewtopic.php?f=3&t=14772

Hopefully someone more experienced in these matters will provide input.

Re: Issue with Admin Module after 1.3 -> 1.4.1 upgrade

Posted: Wed Feb 11, 2009 10:14 am
by garvinhicking
Hi!

How exactly did you upgrade? If it's not cookies, the only reason would be misconfigured paths or problematic PHP sessions. This in turn could only happen when you REINSTALLED serendipity instead of UPGRADING it.

Regards,
Garvin

Re: Issue with Admin Module after 1.3 -> 1.4.1 upgrade

Posted: Wed Feb 11, 2009 7:32 pm
by PeteHelgren
I followed the instructions on upgrading found here: http://www.s9y.org/37.html which were very straightforward and I encountered no errors. This is the third time I have upgraded Serendipity and outside of the cookie issues I had one time before, each upgrade has gone smoothly.

I backed up the site before I proceeded and then I copied all the files in their respective folders to my existing site. I reworked some small changes I had made to a few files back into the new files but that was about it.

So where would I look for misconfigured paths or problematic PHP sessions (the most likely issues). I have bounced the PHP instance with no change.

I am not sure how to reinstall serendipity. The only thing I did was to follow the upgrade instructions.

Re: Issue with Admin Module after 1.3 -> 1.4.1 upgrade

Posted: Thu Feb 12, 2009 11:10 am
by garvinhicking
Hi!

Okay, in this case your upgrade should've went fine. Which files did you modify after that?

When you create a info.php script with <?php phpinfo(); ?> and check the session.save_path value (or all session.* values) what do they contain?

The paths can be checked in the s9y configuration (can you access that? If not, you must have a look with a tool liek phpMyAdmin in the table serendipity_config and look for variables serendipityPath, serendipityBaseURL and serendipityHTTPPath).

HTH,
Garvin

Re: Issue with Admin Module after 1.3 -> 1.4.1 upgrade

Posted: Tue Feb 17, 2009 1:18 am
by PeteHelgren
Thanks Garvin,

I can't see anything wrong with the table entries. I had to open up the table directly because the only page I can see after I sign in as admin is main page with the links. Every link I take is taking me back to the log in page.

I am mystified. Everything looks OK to me. Is there logging that I can turn on to see what is failing?

I'll run some file compares and see what I changed but as I recall the changes were trivial. I'll also get an info page with the session variables displayed.

Pete

Re: Issue with Admin Module after 1.3 -> 1.4.1 upgrade

Posted: Tue Mar 03, 2009 7:11 pm
by PeteHelgren
I went ahead and backed up the database and then dropped it and deleted the serendipity folder on the server and then recreated the DB and unzipped the serendipity file onto the server and reran the install.

I had two problems: None of the templates were properly displaying so I made a change to the serendipityHTTPPath (it had an extra folder reference in it e.g /petesworkshop/petesblog/serendipity/ vs just /petesblog/serendipity/) and I had to change the to baseURL reference to http://www.petesworkshop.com/petesblog/serendipity/ from the internal address that it picked up http://127.0.0.1:8000/petesworkshop/pet ... rendipity/ that was all that I changed.

The templates then rendered correctly but when I log into the admin page and select any option it still forces me to log in again and never takes me to the requested page.

Not sure where to go next. Even a re-installation of serendipity failed to fix the issue. Ideas? Maybe an Apache issue?

Re: Issue with Admin Module after 1.3 -> 1.4.1 upgrade

Posted: Tue Mar 03, 2009 9:56 pm
by PeteHelgren
This might be an Apache configuration issue so perhaps someone can point me the right direction. Here is what I have so far:

The browser URL is:
http://www.petesworkshop.com/petesblog/serendipity/

In the serendipity_config table I have the following:

serendipityPath = /www/zendcore/htdocs/petesworkshop/petesblog/serendipity/
serendipityHTTPPath = /petesblog/serendipity/
baseURL = http://www.petesworkshop.com/petesblog/serendipity/

Everything else is the default from the installation.

In Apache I have the following (relevant entries):
DocumentRoot /www/zendcore/htdocs/petesworkshop
ProxyPass / http://127.0.0.1:8000/petesworkshop/
ProxyPassReverse / http://127.0.0.1:8000/petesworkshop/
<Directory />
Order Deny,allow
Deny From all
</Directory>

<Directory /www/zendcore/htdocs/petesworkshop>
Order Allow,Deny
Allow From all
</Directory>

When I access the admin page and then choose a link within the admin page I see the following in the apache log:

[Tue Mar 03 13:29:29 2009] [error] [client 127.0.0.1] File does not exist: /www/zendcore/htdocs/petesworkshop/petesblog/serendipity/petesblog, referer: http://www.petesworkshop.com/petesblog/ ... figuration

What I am seeing is that "petesblog" is appended at the end of the file being accessed which makes it wrong. It should be:
/www/zendcore/htdocs/petesworkshop/petesblog/serendipity
Instead of:
/www/zendcore/htdocs/petesworkshop/petesblog/serendipity/petesblog

I *think* this is an Apache issue but I am not sure. Any suggestions?

As an FYI there are other pages served under the http://www.petesworkshop.com domain which is why the DocumentRoot is /www/zendcore/htdocs/petesworkshop

The blog is at the http://www.petesworkshop.com/petesblog/serendipity URL

Thanks!

Re: Issue with Admin Module after 1.3 -> 1.4.1 upgrade

Posted: Wed Mar 04, 2009 1:22 pm
by garvinhicking
Hi!

Hm, sadly I know nothing of that Proxy* options. Are those required? Can you try without?

The error log entry could IMHO happen when the HTML document of the referring page uses a link like "serendipity/" instead of "/petesblog/serendipity"; you could check that easily with the Firebug extension for Firefox, go see the Net tab and see which files are requested.

If you could add an author for me to try to login (by inserting it into the serendipity_authors table, use a md5 encoded password) I could try a few things as for the login problems. Also, what about the PHP session.* variables?

Regards,
Garvin

Re: Issue with Admin Module after 1.3 -> 1.4.1 upgrade

Posted: Tue Mar 17, 2009 11:16 pm
by PeteHelgren
Made a little progress over the last couple of days and I am down to one final thing.

First, I wonder if Serendipity began to implement canonical URL's recently? Some of the problems I was experiencing appear to have something to do with the Apache proxypass directive and canonical naming. Not completely sure about it but I added the directive 'ProxyPreserveHost On' to the httpd.conf file and the blog will display and I can navigate throughout the site. However I STILL cannot access the admin options without being returned to the signon page.

Investigating further, I discovered that I can sign in using IE but not Firefox. I have deleted any cookies associated with the site. I cleared the cache, deleted files in the temp folder and basically wiped everything I can think of but I still cannot log in using Firefox. I even tried this at several machines that had NEVER accessed the admin page, and it still refuses to navigate the pages in the admin area.

Knowing that, can you think of anything that might be causing this ? It is very strange and appears to be due to something in Firefox.

Re: Issue with Admin Module after 1.3 -> 1.4.1 upgrade

Posted: Wed Mar 18, 2009 10:37 am
by garvinhicking
Hi!

No, s9y really has no canonical URL mechanisms. That is only included inside an event plugin (serendipity_event_linktoolbar)...

Does your IE maybe use a specific proxy that is not configured in Firefox?

Regards,
Garvin

Re: Issue with Admin Module after 1.3 -> 1.4.1 upgrade

Posted: Wed Mar 18, 2009 4:30 pm
by PeteHelgren
No. I don't think the web browser proxy is the issue. Last night I had some Microsoft updates that needed to be applied and resulted in a reboot of the server. This morning both IE and Firefox don't work. I can login but as soon as I take an option, I am bounced out again.

What is the mechanism in the code that does this? That is, when I click on a link, under what conditions am I redirected to the login page and where does that code reside? Perhaps by examining the code I can get a sense of what might be causing the failure.

FWIW I installed WordPress and it has the same problem in FF but works OK in IE, even this morning. So I wish I could just understand what the issue is. I think it goes beyond just a Serendipity issue since WP and Serendipity both have login issues in FF. It's just weird.

Thanks

Re: Issue with Admin Module after 1.3 -> 1.4.1 upgrade

Posted: Wed Mar 18, 2009 5:04 pm
by garvinhicking
Hi!

Usually, this happens if the wrong or none PHPSESSID Cookie variable is submitted from your client to the server, so taht the server cannot restore your previous session data, and starts a new one. Since you are not authorizeed in a fresh session, you do not have a login, and thus you land on the login page.

For serendipity, this code is in:

* serendipity_admin.php, $is_logged_in

* serendipity_config.inc.php, at the begginning for session_start()

* include/functions_config.inc.php starting in serendipity_login()

You should check a tool like LiveHTTPHeaders for FF, this allows you to see which PHPSESSID cookie is sent to you, and which one you send back.

HTH,
Garvin