upgrade .13 -> .15; invalid session

Need help upgrading your Joomla! website or converting to Joomla!?

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
mebuzzme
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Oct 24, 2006 8:17 pm

Re: upgrade .13 -> .15; invalid session

Postby mebuzzme » Thu Jun 05, 2008 4:54 am

I updated my php.ini to point the session path to a new session folder that I created on my root. Worked for me after trying everything else here. 4 hours gone down the tube.

mknz
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Tue May 01, 2007 9:38 pm

Re: upgrade .13 -> .15; invalid session

Postby mknz » Thu Jun 26, 2008 4:12 am

sysser wrote:I found the some problem.
Migrated from 1.0.13 to 1.0.15.
Server handled directly not by an ISP.
If I use Firefox to access as admin it works perfectly.
If I use IE to access as admin I will get "Invalid Session".

Into session.save_path directory with Firefox I can see just one sess_xxxxxxxxxxx file. With IE there are two files and one it is empty.

I tried all solution without results. With IE doesn't work, with Firefox it works fine !!!

Please provide me a feedback.

If you need more informations please do not hesitate to contact me.



I tried them all...multiple times...all to no avail.
Then Firefox...duh!
Worked for me!
Now I can get back to work...thanks dude!

daantje
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Fri Jul 28, 2006 8:46 pm
Location: oostende
Contact:

Re: upgrade .13 -> .15; invalid session

Postby daantje » Sat Jun 28, 2008 9:29 pm

I found a solution that worked for me. Go to your php.ini file (mostly it's somewhere in /etc). Make sure you have "session.auto_start = 0" (by default this value = 1).

User avatar
farmerdon
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 110
Joined: Thu Oct 18, 2007 10:35 pm
Location: Cork
Contact:

Re: upgrade .13 -> .15; invalid session

Postby farmerdon » Mon Jun 30, 2008 12:40 pm

I also had an invalid session. Here's how I fixed it:

Step 1. Create a new folder called tmp at root (same level as /public_html)

Step 2. Create a text file (using notepad or a text editor) with the following code:
session.save_path /(root directory)/tmp
Note: you will find your root directory at: /public_html in the configuration.php file on line 6 $mosConfig_absolute_path =.....

Step 3. Save as php.ini on your desktop

Step 4. Using your ftp program, transfer the php.ini file that you have just created into your new folder which you called tmp.

That worked for me.

Note: (you can download a very useful program for editing joomla files at http://www.pspad.com )
You can view my website at: http://www.corkboatclub.com

ruthnis
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Sun Dec 03, 2006 11:07 am

Re: upgrade .13 -> .15; invalid session

Postby ruthnis » Sat Jul 19, 2008 6:10 am

Something different worked for me, it was very strange.

I moved my application from one server to another. I had to fix the configuration.php file to adapt it to the new server.

I uploaded the configuration file and started getting strange messages about headers already been sent to the system.

I could not get into the administration panel, it was always sending me back to the login screen.

The solution in the end was to enter the configuration panel of the server where I opened the configuration.php file. I don't know why, but the first three characters where garbage. These characters appeared before the <?php bytes in the script.

When I got rid of them and saved the new configuration.php from the control panel environment, everything worked fine.

Hope this will help somebody because I've been working on this issue for at least 3 days.

User avatar
meadwench
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 110
Joined: Mon Nov 21, 2005 3:10 pm
Contact:

Re: upgrade .13 -> .15; invalid session

Postby meadwench » Thu Jul 24, 2008 6:10 am

Working on a user site running 1.0.1.5 in a Windows server 2003 running IIS environment, and had no issues until last week. Oddly, no changes made, but got the error.

I tried all the php.ini changes, no luck. What helped me was the addition of:
session_save_path('/absolute/path to/session');
to the end of my configuration.php file, and voila, it let me right in.

kcools
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sun Aug 03, 2008 11:23 pm

Re: upgrade .13 -> .15; invalid session

Postby kcools » Sun Aug 03, 2008 11:50 pm

This kept me busy for quite some time.
Tried al the fixes mentioned earlyer, none of them solved my problem when i moved my joomla 1.0.15 site from windows 2000 (IIS5) to W2k3 Server (IIS6).
What solved my problem was leaving the session.cookie domain empty in php.ini
session.cookie_domain =

After this change i was able to login in the adminpanel again.

Hope this helps someone.

Greetings,
Kees.

willing
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Mon Aug 04, 2008 10:25 pm

Re: upgrade .13 -> .15; invalid session

Postby willing » Sun Aug 10, 2008 6:29 pm

Hey sirs,

Invalid Session

What worked for me was to edit the configuration.php file with with site editor and change this from default
$mosConfig_admin_expired = '1';

to

$mosConfig_admin_expired = '0';

Hope it works for you guys as a simple solution

cheers
ryan

kirikee
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Sun Aug 27, 2006 5:26 am

Re: upgrade .13 -> .15; invalid session

Postby kirikee » Mon Aug 25, 2008 2:54 pm

I have also the same problem in 15. could not access the administrator. it says the same msg invalid session. i have done several things but could not find the solution.
Something is better than Nothing

User avatar
gsbe
Joomla! Guru
Joomla! Guru
Posts: 871
Joined: Wed Aug 17, 2005 10:13 pm
Location: Lexington, VA
Contact:

Re: upgrade .13 -> .15; invalid session

Postby gsbe » Thu Aug 28, 2008 11:17 pm

This solved my problem with ipowerweb host. Thanks, sfetter.

FYI - none of the other changes in this thread relating to changing the configuration.php file solved it.


sfetter wrote:Just realized from reading your reply that I skipped a step in my description. I've been struggling with this problem too long. :'(

As I understand it (and remember, I'm a newbie!!!) PHP needs some place to store the session data. The default place to do this in in the /tmp folder of your service provider.

If you want to store the session info somewhere else (like within your own installation) you need to create a directory to put it in. I called mine "sessions" which seems to be a fairly common thing to call it, judging from the various threads about this. CHMOD the directory you created to 755 so it's writeable.

When you create your custom PHP.INI file, you need to make sure that the path/to/your/Joomla installation is the "absolute path" used by your service provider. You'll find a copy of that in your CONFIGURATION.PHP file -- look for the line that reads

$mosConfig_absolute_path =

The absolute path is everything inside the quotation marks.

Careful of typos -- even one letter wrong means the thing won't work at all!

Hope that helps

progra3
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Tue Sep 23, 2008 4:37 am

Re: upgrade .13 -> .15; invalid session

Postby progra3 » Tue Sep 23, 2008 4:44 am

Thanks sfetter! your solution made the difference for me on ipowerweb.

To recap here is what I did.

1. I created a /sessions/ directory in /public_html/web/

Where web is my directory where joomla was.

2. Create a two line php.ini

With the following two lines.

session.save_path = /full link to your account/public_html/web/sessions
register_globals = OFF

where /full link to your account/ is what is the absolute path in your configuration.php file.

3. PUt the php.ini file at the root of the administrator directory in

/public_html/web/administrator

Voila!

It worked. Man this was a time sinker.

Where would the world be without 'google' and 'forums'!

Scary!

Thanks for all the suggestions.

sfetter wrote:Just realized from reading your reply that I skipped a step in my description. I've been struggling with this problem too long. :'(

As I understand it (and remember, I'm a newbie!!!) PHP needs some place to store the session data. The default place to do this in in the /tmp folder of your service provider.

If you want to store the session info somewhere else (like within your own installation) you need to create a directory to put it in. I called mine "sessions" which seems to be a fairly common thing to call it, judging from the various threads about this. CHMOD the directory you created to 755 so it's writeable.

When you create your custom PHP.INI file, you need to make sure that the path/to/your/Joomla installation is the "absolute path" used by your service provider. You'll find a copy of that in your CONFIGURATION.PHP file -- look for the line that reads

$mosConfig_absolute_path =

The absolute path is everything inside the quotation marks.

Careful of typos -- even one letter wrong means the thing won't work at all!

Hope that helps

kirikee
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Sun Aug 27, 2006 5:26 am

Re: upgrade .13 -> .15; invalid session

Postby kirikee » Wed Sep 24, 2008 4:24 pm

Thank you very much for your advice. now my web site is working fine. i have created php inf file and the session folder.
Something is better than Nothing

DivaVocals
Joomla! Intern
Joomla! Intern
Posts: 73
Joined: Tue Oct 23, 2007 2:19 pm

Re: upgrade .13 -> .15; invalid session

Postby DivaVocals » Thu Sep 25, 2008 8:30 am

progra3 wrote:Thanks sfetter! your solution made the difference for me on ipowerweb.

To recap here is what I did.

1. I created a /sessions/ directory in /public_html/web/

Where web is my directory where joomla was.

2. Create a two line php.ini

With the following two lines.

session.save_path = /full link to your account/public_html/web/sessions
register_globals = OFF

where /full link to your account/ is what is the absolute path in your configuration.php file.

3. PUt the php.ini file at the root of the administrator directory in

/public_html/web/administrator

Voila!

It worked. Man this was a time sinker.

Where would the world be without 'google' and 'forums'!

Scary!

Thanks for all the suggestions.



I had followed earlier instructions and had my php.ini in the OH SO WRONG location.. (Mostly becasue previous instructions assume that one's Joomla install is in the HTML root directory.. hence the wrong information being communicated)

So I want to thank you for the totally CLEAR instructions on where to place the php.ini file.. I read through this whole thread.. No offense to anyone who posted here, but the prior directions on creating this php.ini (not so much the file setup as the instructions regarding where to put this file) were SO NOT clear until I read your post.. So thank you.. All is right with the world now.. Thanks goodness this all happened on my dev site.. **whew**

User avatar
burner
Joomla! Apprentice
Joomla! Apprentice
Posts: 44
Joined: Thu Aug 18, 2005 7:15 pm
Location: Vancouver, BC
Contact:

Re: upgrade .13 -> .15; invalid session

Postby burner » Fri Oct 03, 2008 1:57 am

bambam82 wrote:Another hack to my earlier desicribed hack is to change the following line in /includes/joomla.php
go to line 770
and change line

Code: Select all

if ($session_id != session_id()) {

to

Code: Select all

if ($session_id != $session_id) {

mind the $ and the () around session_id

This will do the "if" check on an "a" compare to "a" basis, which will work ofcourse :D

Like I said it's a hack and I will still hope the joomla guys will say something smart about this.

Cheers,
Bart


Took me awhile to find your hack & it did the trick. Your efforts are really appreciated.

:pop

Neil

User avatar
muddauber
Joomla! Ace
Joomla! Ace
Posts: 1466
Joined: Thu Jun 08, 2006 11:26 pm

Re: upgrade .13 -> .15; invalid session

Postby muddauber » Mon Oct 06, 2008 10:28 pm

I still have a few sites running on 1.0.x and had hoped to maintain them
until I have time to properly upgrade to 1.5.

I was recently hacked and upgraded from 1.0.13 to 1.0.15 only
to find that I now can not log in the admin section of the site.
I've scoured the forum and web reviewing all the work arounds,
hacks, etc and nothing has helped.

I know that if I use the www.mysite/administrator I'll just get
a pass thru with no message and back to entry page. If I use
mysite/administrator I get the "invalid session" message.

I read a good explanation that stated the problem is with
shared servers and the session path. Some ISP use shared session directory
rather than individual sessions per domain and per account. Any
of the workaround have not worked.

Besides the issues of plugins and templates, you also have the
database conversions to worry about. Does anyone have
a solution for the "invalid session" for 1.0.15. Considering
I've done the 1.0.15 upgrade on other servers without a hitch,
I suspect that the session path, saved session path, temp path may be
the issue. But it is behind me.

I have my hosting on 1and1 using Linux shared hosting

User avatar
muddauber
Joomla! Ace
Joomla! Ace
Posts: 1466
Joined: Thu Jun 08, 2006 11:26 pm

Re: upgrade .13 -> .15; invalid session

Postby muddauber » Wed Oct 08, 2008 12:57 am

I progressed thru the process to bring my old 1.0.X website
to the most current version. All went well thru 1.0.13. But when
I went to 1.0.15, I lost access to the admin login.

I went thru all the options I read and ran across that
"fix" for the 1.0.13 similar admin login problem. Since I couldn't
find a solution, I decided to try adding the 1.0.13 fix to my
1.0.15 update that had the problem. Using the fix found on
viewtopic.php?t=200725
I first backed up my 2 files in question. I then FTP'd the
files to my server. It worked and fixed my problems.
Both front end and back end admin login now works.

shariq
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Mar 08, 2007 7:45 pm

Re: upgrade .13 -> .15; invalid session

Postby shariq » Wed Oct 22, 2008 5:23 am

farmerdon wrote:I also had an invalid session. Here's how I fixed it:

Step 1. Create a new folder called tmp at root (same level as /public_html)

Step 2. Create a text file (using notepad or a text editor) with the following code:
session.save_path /(root directory)/tmp
Note: you will find your root directory at: /public_html in the configuration.php file on line 6 $mosConfig_absolute_path =.....

Step 3. Save as php.ini on your desktop

Step 4. Using your ftp program, transfer the php.ini file that you have just created into your new folder which you called tmp.

That worked for me.

Note: (you can download a very useful program for editing joomla files at http://www.pspad.com )
You can view my website at: http://www.corkboatclub.com

Thank You , it worked for me in PHP5, if someone change to php4 there seems to be no problem at all.

publipoint
Joomla! Intern
Joomla! Intern
Posts: 79
Joined: Fri Oct 19, 2007 7:34 am
Location: Switzerland
Contact:

Re: upgrade .13 -> .15; invalid session

Postby publipoint » Mon Oct 27, 2008 3:50 pm

erickaweb wrote:Hiya, the first poster's instructions to uncomment were backwards for me - I had to comment out the code in joomla.php lines 770-774:

Code: Select all

/*if ($session_id != session_id()) {
         // session id does not correspond to required session format
         echo "<script>document.location.href='index.php?mosmsg=Invalid Session'</script>\n";
         exit();
      }*/

That worked! :pop
Michele Bugliaro Goggia
designer SUP in visual communication
http://www.publipoint.ch

User avatar
GarlicBred
Joomla! Intern
Joomla! Intern
Posts: 86
Joined: Fri Dec 22, 2006 2:56 am
Location: Adelaide, Australia

Re: upgrade .13 -> .15; invalid session

Postby GarlicBred » Thu Nov 13, 2008 11:52 pm

I just had this problem - I wasn't upgrading or anything.

After a few minutes scratching head, the solution was pretty mundane - I had run out of allocated disc space, so the session file could not be written.

I deleted some files and all was good again. Hope that helps some people.
The greater our command over language, the sharper are the tools with which we disect reality.

User avatar
muddauber
Joomla! Ace
Joomla! Ace
Posts: 1466
Joined: Thu Jun 08, 2006 11:26 pm

Re: upgrade .13 -> .15; invalid session

Postby muddauber » Fri Nov 14, 2008 12:24 am

That happened to me awhile back. Now I give a Joomla install
a good 200 megs for storage to start and watch for error messages.
Another tip is to turn on debug. That probably would have jumped
out at you.

wis3crack
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Jun 23, 2008 7:33 am

Re: upgrade .13 -> .15; invalid session

Postby wis3crack » Fri Nov 21, 2008 5:24 am

I had the same problem, finally I got it working. There are two php settings need to be taken care of : session.save_path, and session.auto_start

If your host is running php as apache module just add this two lines in your .htaccess file:

Code: Select all

php_value session.save_path '/your_joomla_root_diretory/session'
php_value session.auto_start 0


Of course make a writable 'session' directory in your joomla root with permission 777

If php is running as CGI binary, create a local php.ini in your document root directory and add the below lines:

Code: Select all

session.save_path = /path_to_your_session_direcory
session.auto_start = 0


This worked for me and I hole it helps.

Thanks

User avatar
muddauber
Joomla! Ace
Joomla! Ace
Posts: 1466
Joined: Thu Jun 08, 2006 11:26 pm

Re: upgrade .13 -> .15; invalid session

Postby muddauber » Fri Nov 21, 2008 10:33 pm

Excellent!! There are odd little quirks with settings in each environment.

You can find out if that is already part of the environment on your server
by running the info.php script.

yannibmbr
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Mon May 14, 2007 4:26 pm

Re: upgrade .13 -> .15; invalid session

Postby yannibmbr » Wed Dec 24, 2008 6:02 pm

wis3crack wrote:I had the same problem, finally I got it working. There are two php settings need to be taken care of : session.save_path, and session.auto_start

If your host is running php as apache module just add this two lines in your .htaccess file:

Code: Select all

php_value session.save_path '/your_joomla_root_diretory/session'
php_value session.auto_start 0


Of course make a writable 'session' directory in your joomla root with permission 777

If php is running as CGI binary, create a local php.ini in your document root directory and add the below lines:

Code: Select all

session.save_path = /path_to_your_session_direcory
session.auto_start = 0


This worked for me and I hole it helps.

Thanks


OMG!!! This was a lifesaver. Thank you for this post! My server is configured to run php5 as an apache module. So this worked like a charm.

wis3crack
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Jun 23, 2008 7:33 am

Re: upgrade .13 -> .15; invalid session

Postby wis3crack » Thu Dec 25, 2008 3:36 am

yannibmbr wrote:OMG!!! This was a lifesaver. Thank you for this post! My server is configured to run php5 as an apache module. So this worked like a charm.


I am glad this worked for u mate!

User avatar
Sushant1
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu Jan 29, 2009 10:55 pm
Contact:

Re: upgrade .13 -> .15; invalid session

Postby Sushant1 » Thu Jan 29, 2009 11:49 pm

Bingo!!!

It worked for me.. I was just forgetting to save php.ini in administrator folder.

Thank you sfetter and progra3

sfetter wrote:Hi folks

I too have struggled with the Invalid Session problem ... and I think I have finally found something that works for my site.

I think that if PHP_Register_Globals is OFF (which is the recommended safer way to run the system), then my service provider wasn't saving the session data in the default file (which /tmp). Even though "System Information | Permissions" showed that /tmp was WRITEABLE, I now suspect that something in my service provider's setup made this unreliable.

(Come to think of it ... /tmp is a public directory on my service provider. Anybody can write to it. I wonder if somebody else's Joomla installation was also set to save session data to the same public directory ... which would mean that sometimes the session data would be stable for a while, but at other times it could have been overwritten almost immediately. That would explain why my sessions would last variable amounts of time.)

When I created a "sessions" directory within my own installation of Joomla, and put instructions re this in my php.ini file FIRST (before the direction to turn off register_globals) I stopped having problems all together.

To be clear, here's my php.ini file now. I have a copy in my main directory, and another copy in my administrator directory:

session.save_path=/path/to/joomla/sessions
register_globals = OFF

e_martel
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Aug 29, 2008 10:50 pm

Re: upgrade .13 -> .15; invalid session

Postby e_martel » Wed Mar 04, 2009 2:32 am

Changing the PHP.ini is the way to go.

My web site is hosted so I don't have control over the PHP.ini.

I checked the configuration.php for the absolute path.

So I just created a PHP.ini file with
session.save_path=/<absolutepath>/session folder/

That's it very simple even though it took me an hour to figure it out with your assistance.

Thank you

pozzo
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sun Nov 05, 2006 8:46 pm

Re: upgrade .13 -> .15; invalid session

Postby pozzo » Tue Mar 17, 2009 12:10 am

Hello
I had the same problem with Joomla 1.015 with IE7. None of your solutions worked for me, the solution was simple : don't forget to accept ALL cookies in internet options otherwise you get this invalid session when you try to log as an administrator

premanand19193
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Mon Mar 23, 2009 4:41 pm

Re: upgrade .13 -> .15; invalid session

Postby premanand19193 » Mon Mar 23, 2009 5:25 pm

it has worked out for me upgraded .12 to .15 i the system.it solved a lot of problems :D

jdhanley
Joomla! Apprentice
Joomla! Apprentice
Posts: 38
Joined: Thu Feb 08, 2007 9:23 pm

Re: upgrade .13 -> .15; invalid session

Postby jdhanley » Sun Mar 29, 2009 5:11 pm

progra3 wrote:Thanks sfetter! your solution made the difference for me on ipowerweb.

To recap here is what I did.

1. I created a /sessions/ directory in /public_html/web/

Where web is my directory where joomla was.

2. Create a two line php.ini

With the following two lines.

session.save_path = /full link to your account/public_html/web/sessions
register_globals = OFF

where /full link to your account/ is what is the absolute path in your configuration.php file.

3. PUt the php.ini file at the root of the administrator directory in

/public_html/web/administrator

Voila!

It worked. Man this was a time sinker.


That did the trick for me too. Thanks!

fraternite
Joomla! Apprentice
Joomla! Apprentice
Posts: 49
Joined: Thu May 22, 2008 11:28 am

Re: upgrade .13 -> .15; invalid session

Postby fraternite » Tue Mar 31, 2009 2:39 pm

Hello,

I had previously installed Blocklist on through the admin backend. But soon after that, I am no longer able to log into my back end. I deleted Blocklist files via cpanel as it was messing up my website with some errors.

But since I delete the files, there is no error now.

When I try to log into my admin panel = www.mysite.com/administrator I am redirected to the Front page (mysite.com) .

The live site is ok at present but I cannot login to update it or anything. And No administrator can log in.

Please help.


Return to “Upgrading - 1.0.x”

Who is online

Users browsing this forum: No registered users and 0 guests