Page 3 of 4

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

Posted: Thu Jun 05, 2008 4:54 am
by mebuzzme
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.

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

Posted: Thu Jun 26, 2008 4:12 am
by mknz
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!

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

Posted: Sat Jun 28, 2008 9:29 pm
by daantje
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).

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

Posted: Mon Jun 30, 2008 12:40 pm
by farmerdon
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

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

Posted: Sat Jul 19, 2008 6:10 am
by ruthnis
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.

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

Posted: Thu Jul 24, 2008 6:10 am
by meadwench
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.

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

Posted: Sun Aug 03, 2008 11:50 pm
by kcools
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.

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

Posted: Sun Aug 10, 2008 6:29 pm
by willing
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

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

Posted: Mon Aug 25, 2008 2:54 pm
by kirikee
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.

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

Posted: Thu Aug 28, 2008 11:17 pm
by gsbe
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

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

Posted: Tue Sep 23, 2008 4:44 am
by progra3
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

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

Posted: Wed Sep 24, 2008 4:24 pm
by kirikee
Thank you very much for your advice. now my web site is working fine. i have created php inf file and the session folder.

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

Posted: Thu Sep 25, 2008 8:30 am
by DivaVocals
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**

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

Posted: Fri Oct 03, 2008 1:57 am
by burner
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

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

Posted: Mon Oct 06, 2008 10:28 pm
by muddauber
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

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

Posted: Wed Oct 08, 2008 12:57 am
by muddauber
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
http://forum.joomla.org/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.

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

Posted: Wed Oct 22, 2008 5:23 am
by shariq
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.

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

Posted: Mon Oct 27, 2008 3:50 pm
by publipoint
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

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

Posted: Thu Nov 13, 2008 11:52 pm
by GarlicBred
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.

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

Posted: Fri Nov 14, 2008 12:24 am
by muddauber
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.

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

Posted: Fri Nov 21, 2008 5:24 am
by wis3crack
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

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

Posted: Fri Nov 21, 2008 10:33 pm
by muddauber
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.

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

Posted: Wed Dec 24, 2008 6:02 pm
by yannibmbr
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.

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

Posted: Thu Dec 25, 2008 3:36 am
by wis3crack
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!

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

Posted: Thu Jan 29, 2009 11:49 pm
by Sushant1
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

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

Posted: Wed Mar 04, 2009 2:32 am
by e_martel
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

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

Posted: Tue Mar 17, 2009 12:10 am
by pozzo
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

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

Posted: Mon Mar 23, 2009 5:25 pm
by premanand19193
it has worked out for me upgraded .12 to .15 i the system.it solved a lot of problems :D

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

Posted: Sun Mar 29, 2009 5:11 pm
by jdhanley
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!

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

Posted: Tue Mar 31, 2009 2:39 pm
by fraternite
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.