Jump to content

Login issue


BaderNET

Recommended Posts

Hi, 

I have an issue with the members trying to login in my VA web this msg appear after login :

You must be logged in to access this feature!  

 

any suggestion ?!

 

P.I i have used two Versions of phpvms  v2.1.934 and now i am using  Version simpilot 5.5.2

The problem appears in both versions since i have transferred my Domain to a new Server ... 

 

 

 

 

erer1.png

Link to comment
Share on other sites

  • Members

i would enable the logs by setting this in local.config.php

    Config::Set('DEBUG_MODE', true);
    Config::Set('DEBUG_LEVEL', 2); // 1 logs query errors, 2 logs all queries
    Config::Set('ERROR_LEVEL', E_ALL ^ E_NOTICE);

and then see in core/logs folder for errors

Link to comment
Share on other sites

2 hours ago, Vangelis said:

i would enable the logs by setting this in local.config.php


    Config::Set('DEBUG_MODE', true);
    Config::Set('DEBUG_LEVEL', 2); // 1 logs query errors, 2 logs all queries
    Config::Set('ERROR_LEVEL', E_ALL ^ E_NOTICE);

and then see in core/logs folder for errors

This errors in logs ???
=====
Time: 04.30.17 21:36:54
Backtrace: DB::write_debug > DB::query > Auth::update_session > Auth::ProcessLogin > Login->ProcessLogin > Login->login > Login->index > call_user_func_array > MainController::RunAllActions
Query: UPDATE phpvms_sessions SET `pilotid`=2007, `logintime`=NOW(), `ipaddress`='80.184.89.159' WHERE `id`=
Error: (1064) - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3

 

Link to comment
Share on other sites

  • 2 years later...

Hi!

actually after transfering my phpvms to a new webserver i have the same issue. After trying to login I get the same message like above.

In my log.txt I can find following:

Quote

=====
Time: 04.13.20 18:45:24
=====
Time: 04.13.20 18:45:24
Backtrace: DB::write_debug > DB::query > Auth::update_session > Auth::ProcessLogin > Login->ProcessLogin > Login->login > Login->index > call_user_func_array > MainController::RunAllActions
Query: UPDATE phpvms_sessions SET `pilotid`=5, `logintime`=NOW(), `ipaddress`='217.230.xx.xxx' WHERE `id`=
Error: (1064) - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3
=====


=====

 

 

The error.txt and all other logfiles remained empty.

 

A bit strange is, that in the update-statement after "where ID="   is nothing.

 

I already cleaned up the phpvms_sessions table. But it didnt helped.

 

What can I do?

Edited by breenild
Link to comment
Share on other sites

  • Administrators

What MySQL version did the old host use?

What MySQL version does the new host use?

 

Is this happening right after you enter the emai/pilotID, password and then click Log In?

 

What version of phpVMS?

 

Post the contents of your /core/modules/Login/Login.php file

Link to comment
Share on other sites

The old mySQL-Server has version: 5.6.44

the new Server has version: 5.7.21-1

 

Quote

Is this happening right after you enter the emai/pilotID, password and then click Log In?

Yes exactly right after click on "login".

When I enter a wrong password for example, then correctly appears the message, that the pw is wrong.

Only when I enter the correct pw, appears this message.

 

The version of phpVMS is a bit older. I don't know, where I can find the version number.

The update to a newer version is a bit complicate, because we did a lot of constumizations, which get lost on an update.

 

the login.php is attached.

 

Login.zip

Link to comment
Share on other sites

  • Administrators

To find the version number, look in admin panel on lower right.

 

Have you looked in the error_log file in the main phpvms directory and in /admin directory for errors?

 

You can update to a newer version, but will need to tweak many of your modules and other customizations.

 

Link to comment
Share on other sites

  • 2 weeks later...

Hey Vangelis,

 

after some very long try and error I finally solved the problem.

If you like to know my solution to that problem:

 

There was something wrong with the clone of my database.

 

that's the original phpvms_sessions Table:

Quote

CREATE TABLE `phpvms_sessions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `pilotid` int(11) NOT NULL,
  `ipaddress` varchar(25) NOT NULL,
  `logintime` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `sessions01` (`pilotid`,`logintime`,`id`)
) ENGINE=MyISAM AUTO_INCREMENT=24042318 DEFAULT CHARSET=latin1;

 

But in my clone on the new server the primary_key, the unique keys and even the AUTO_INCREMENT was missing for any reason.

 

After dropping the table and create again in the right way, my login works now!

And I have now to check all the other tables too, if there's anything missing.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...