Zen Cart Logo
Forums / Installing on a Linux/Unix Server / cannot log in admin area after moveto new server

cannot log in admin area after moveto new server

Locked

Views: 2,702

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
13 May 2009, 10:44 PM
#1
sunriseimports avatar

sunriseimports

New Zenner

Join Date:
Mar 2007
Posts:
24
Plugin Contributions:
0

cannot log in admin area after moveto new server

I have moved shop from a dedicated server use plesk migration tool to a new dedicated server in same company aplus net . everthing works ok but can not log in admin area . tried to resend a password by email , no email . tried https://www.zen-cart.com/tutorials/index.php?article=2 still cann't log in . using zen cart version 3.60 . try to restore DB by myphpadmin . get message data already exsist .

14 May 2009, 2:18 AM
#2
sunriseimports avatar

sunriseimports

New Zenner

Join Date:
Mar 2007
Posts:
24
Plugin Contributions:
0

Re: cannot log in admin area after moveto new server

Following is chat record with my host company see if that helps :
I am seeing a PHP Fatal error.
[error] [client 121.223.245.129] PHP Fatal error: Call to a member function Execute() on a non-object in /var/www/vhosts/sxxxx/httpdocs/includes/functions/sessions.php on line 61, referer: http://xxxx/admin/login.php
That indicates that something in the code has an issue but not server
It could be that a file has not been uploaded or that the file was uploaded in ascii mode and it should have been uploaded in binary mode

16 May 2009, 2:05 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: cannot log in admin area after moveto new server

This is most likely causes by going to php 5.x on your server ...

In the two sessions.php functions, you can try adding:

    function _sess_write($key, $val) {
      global $db;
[B]      if (!is_object($db)) {
        //PHP 5.2.0 bug workaround ... 
        $db = new queryFactory();
        $db->connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE, USE_PCONNECT, false);
      }[/B]
18 May 2009, 8:20 PM
#4
raskayu avatar

raskayu

New Zenner

Join Date:
Apr 2006
Posts:
56
Plugin Contributions:
0

Re: cannot log in admin area after moveto new server

Ajeh:

This is most likely causes by going to php 5.x on your server ...

In the two sessions.php functions, you can try adding:

function _sess_write($key, $val) {
  global $db;

[B] if (!is_object($db)) {
//PHP 5.2.0 bug workaround ...
$db = new queryFactory();
$db->connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE, USE_PCONNECT, false);
}[/B]


Hi Ajeh:

I have had the same problem when my hoster changed to PHP 5.2.

I've tried the solution you said and all work perfect again- :clap:

But I have a doubt, you are talking of 2 sessions.php. I got the message in public_html/cart/includes/functions/session.php, that was where I got the error into admin panel, but I was having the same error every time than an user tried to log, apparently no errors on login, but the user couldn't get into, so no possiblity to purchase either.

I changed also the public_html/cart/admin/includes/functions/sessions.php case that this one were the other file.

Really, with only the first change all back to work again(adminn panel and users login , but I have the doubt if more sessions.php are affected for the PHP5.2 bug.

Any ideas?

Thanks for your help
:cool:
19 May 2009, 4:08 AM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: cannot log in admin area after moveto new server

In the Admin I used for:
/admin/includes/functions/sessions.php

    function _sess_write($key, $val) {
      global $SESS_LIFE, $db;
      if (!is_object($db)) {
        //PHP 5.2.0 bug workaround ...
        $db = new queryFactory();
        $db->connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE, USE_PCONNECT, false);
      }
19 May 2009, 4:47 PM
#6
raskayu avatar

raskayu

New Zenner

Join Date:
Apr 2006
Posts:
56
Plugin Contributions:
0

Re: cannot log in admin area after moveto new server

Ajeh:

In the Admin I used for:
/admin/includes/functions/sessions.php

function _sess_write($key, $val) {
  global $SESS_LIFE, $db;
  if (!is_object($db)) {
    //PHP 5.2.0 bug workaround ...
    $db = new queryFactory();
    $db->connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE, USE_PCONNECT, false);
  }

Many thanks, that was the way I did. :D

Cheers!!
16 Jun 2009, 1:57 AM
#7
hugh_dennis avatar

hugh_dennis

New Zenner

Join Date:
May 2009
Posts:
1
Plugin Contributions:
0

Re: cannot log in admin area after moveto new server

Thank you to all of you. I have also had this problem for the past three weeks. The addition to the sessions.php file worked perfectly. :clap:

I have been tring to get my host to help with the problem but the Host contact has disappeared off the face of the earth and can't get ahold of anyone at the company.

Once again many thanks.