Page 1 of 1

Problems with Admin Login

Posted: 08 Feb 2009, 21:28
by Christoph
Hi, I just downloaded the X2 version and uploaded it to my site. I get to the admin page but I cannot log in with admin/admin. Instead, even the first time I visited the admin page, before even attempting to log in, I get the following warnings on the bottom of the page (in red).

I had absolutely no problems with V1 and am a bit puzzled why I now encounter problems with X2. I called my service provider and the "assured" me that everything is fine on their end.

See both errors below. If anybody could help me out, I'd greatly appreciate it.

Thanks,
Christoph

A PHP Error was encountered

Severity: Warning

Message: Unknown(): open(/var/php_sessions/sess_76dc266692bac0916785eb432ac10df1, O_RDWR) failed: No such file or directory (2)

Filename: Unknown

Line Number: 0

A PHP Error was encountered

Severity: Warning

Message: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/php_sessions)

Filename: Unknown

Line Number: 0

Posted: 09 Feb 2009, 01:42
by globetrotter
Sometimes files are not uploaded correctly, maybe it helps when you upload everything again.

Posted: 09 Feb 2009, 08:40
by Nick
Nope thats sessions aren't configured properly on server, php can't create temp files, forward this error to your hosting support and they'll get this one fixed in no time.

Posted: 09 Feb 2009, 17:22
by Christoph
Thanks! I just opened a ticket with them. I doubt they will know what to do, lol. Maybe it's time to switch hosting services... Appreciate the help though.

Christoph

Posted: 19 Mar 2009, 16:21
by bitwize
Did you get resolution to this error? I'm having the exact same issue and I have not been able to isolate the exact cause. Below are the events I have tried:
>> Received the unable to write error
>> Contacted ISP and the permissions were correct
>> Verified sessions were working by using the following code w/o any
errors:
<?php
session_start();
$_SESSION['views'] = 'view This';
echo "views = ". $_SESSION['views'];
?>

>> Noticed if i clicked 'remember me' and logged on, everything worked but i was still receiving the same 'write errors'
>> Noticed pop-up and emails would fail with the same errors
>> Knowing this is less than ideal, I placed error_reporting(0); in the common.inc.php file after the other error reporting statements to in essence turn off all errors. This removed all the errors (but again, not ideal) and all code continued to work as designed.

I found it interesting my session_start(); would work fine, but same code on the imagevue/index.php code with cause the errors. I have not had much time to investigate anything else, but it appears the message is not indeed true, as I'm able to write session data and return it just fine.

I'm running PHP 5.2.9-1 on a Windoze 2003/IIS6 box. I run the same code on my Vista/IIS7 machine, all works well. Any insights on where to start trouble shooting would be greatly appreciated!

Thanks,
bit[/list]

Posted: 21 Mar 2009, 07:18
by Nick
This means php can't write to sessions dir, it should be created upfront and be writable for php. There are lots of success stories if you do search on forums.

Usually it takes no time to fix. With windowze I am not sure what went wrong, but you can try to open php.ini and change path for sessions pointing to C:/TEMP or something.

Posted: 22 Mar 2009, 11:08
by bitwize
thx Nick. But what I'm trying to say is it can write as i'm able two write and retrieve session data with other PHP code. It also is confirmed that session data is being written/read by the imagevue code. It appears to be something else, even though the message says it can't write. (to verify, i had the isp on the phone, hit the site, and the sess_ file was created with the appropriate content).

Remember, this is PHP on Windoze and error messages on Windoze (even though php is reporting it) are not always reflective of the 'real error'. I know it is easy to assume the error reported is the correct error, and it often is, but in this case, i don't believe it is.

bit

Posted: 22 Mar 2009, 16:13
by Nick
Not sure what's going on here, maybe using cookies will help?
Code
; Whether to use cookies.
session.use_cookies = 1

; This option enables administrators to make their users invulnerable to
; attacks which involve passing session ids in URLs; defaults to 0.
; session.use_only_cookies = 1
I would try setting both cookie vars to 1, it could help.
Could you please provide some additional info like error messages or a link to your gallery?