CarlosEduardo2409 Posted January 10, 2020 Report Share Posted January 10, 2020 (edited) Hello again! phpVMS Version: 5.5.2.72 from ProAvia (Forum Topic) I am having problems with users who are unable to log in to the company, this includes all users, even me. I am not sure how to explain this, but I will try. First of all (to understand): When a pilot logs in with all the correct credentials, he is redirected to the dashboard, which is normal. But when a pilot tries to log in but the credentials are really wrong, an alert appears above the form, like this: https://prnt.sc/qm1bys What is happening: Yes, if the pilot misses the credentials, the site does what it should do, show the alert saying it's wrong, so far so good. But if the pilot tries to enter the correct credentials, by pushing the login button, the site sees that the credentials are correct but he does not log in, he redirects to Darshbaord but he show warning that says: "You must be logged in to access this feature!" That is, when logging in, it redirects to Dashboard, but already redirects logged out, thus showing the warning that it must be logged. This started to happen a short time ago, but I didn't update any files before it started this error. Best regards. Thanks, Carlos. Edited January 12, 2020 by CarlosEduardo2409 Quote Link to comment Share on other sites More sharing options...
Administrators ProAvia Posted January 11, 2020 Administrators Report Share Posted January 11, 2020 What skin are you using? If the user closes their browser and reopens it - then goes to the site and uses the correct log in details, are they able to log in correctly? Are there any errors showing in the error_log? Quote Link to comment Share on other sites More sharing options...
CarlosEduardo2409 Posted January 11, 2020 Author Report Share Posted January 11, 2020 2 hours ago, ProAvia said: What skin are you using? If the user closes their browser and reopens it - then goes to the site and uses the correct log in details, are they able to log in correctly? Are there any errors showing in the error_log? Hello @ProAvia 1. Yes, I use my own skin (also my own admin skin). It was the first thing I thought, but I don't know because it was working before. 2. No, if the user closes the browser and reopens it still has the same problem. 3. How can I see error_log? If you enable 'display_errors' in php.ini already enabled but nothing happened (any file created). More information: The company is in a subdomain. Quote Link to comment Share on other sites More sharing options...
PetitJedi Posted January 11, 2020 Report Share Posted January 11, 2020 Hy if I don't say nonsense, for the log, you have to put that 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 ^ E_STRICT); After you can see the log file in core/logs Bests regards Quote Link to comment Share on other sites More sharing options...
Administrators ProAvia Posted January 11, 2020 Administrators Report Share Posted January 11, 2020 In the root folder of phpVMS should be a file named error_log. Also, at least in my PHP 7.2 with my host, I needed to create a ".user.ini" file which includes a directive to enable logging of errors (this file supposedly overrides the php.ini file on a folder by folder basis). .user.ini - file contents for error logging error_reporting = 32759 display_errors = On display_startup_errors = Off log_errors = On log_errors_max_len = 0 error_log = /<path to phpvms install>/error_log <path to phpvms install> can include "home/public_html/<rest of path>/error_log" I also have the same thing set up in my /admin folder to show admin errors. I suggest changing back to the default user and admin skins and test the log in again. If its working in the default skins, there is probably something messed up in your custom skins. Quote Link to comment Share on other sites More sharing options...
Administrators ProAvia Posted January 11, 2020 Administrators Report Share Posted January 11, 2020 6 hours ago, PetitJedi said: Hy if I don't say nonsense, for the log, you have to put that 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 ^ E_STRICT); After you can see the log file in core/logs Bests regards I have not made these changes to "local.config.php" and I get error_log to show errors. Quote Link to comment Share on other sites More sharing options...
CarlosEduardo2409 Posted January 11, 2020 Author Report Share Posted January 11, 2020 (edited) 54 minutes ago, ProAvia said: In the root folder of phpVMS should be a file named error_log. Also, at least in my PHP 7.2 with my host, I needed to create a ".user.ini" file which includes a directive to enable logging of errors (this file supposedly overrides the php.ini file on a folder by folder basis). .user.ini - file contents for error logging error_reporting = 32759 display_errors = On display_startup_errors = Off log_errors = On log_errors_max_len = 0 error_log = /<path to phpvms install>/error_log <path to phpvms install> can include "home/public_html/<rest of path>/error_log" I also have the same thing set up in my /admin folder to show admin errors. I suggest changing back to the default user and admin skins and test the log in again. If its working in the default skins, there is probably something messed up in your custom skins. Thanks for the answers. I updated the file ".user.ini" but nothing appeared in "error_log", I also made the change "local.config.php" and nothing appeared in core / logs. But I just realized that the hosting creates an error file, and in it the last error it had was on 05, so I believe it has no error. But I did what ProAvia suggested, I changed the skin to default and apparently, the error is really in the skin, I think I'll have to redo it. But I have a question: my skin uses a jQuery which is the newer version and phpVMS uses another jQuery which is an older version. So as there are two jQuery on the site, it appears this error: Quote Uncaught TypeError: $(...).ajaxForm is not a function phpvms.js:27 Could it be that? Thanks. Edited January 11, 2020 by CarlosEduardo2409 Quote Link to comment Share on other sites More sharing options...
Administrators ProAvia Posted January 11, 2020 Administrators Report Share Posted January 11, 2020 My very basic understanding is that using different jquery versions can cause all sorts of issues. And converting phpVMS to use a newer jquery version is going to require a lot of code changes. Since you said your skins are custom, any chance you can get them working with the same jquery versions presently used by phpVMS? Maybe reach out to other skin developers (see the forum here on site) and see what they suggest. Once you get these skins working correctly, any chance you will release them as freeware for others to use? Quote Link to comment Share on other sites More sharing options...
CarlosEduardo2409 Posted January 12, 2020 Author Report Share Posted January 12, 2020 23 hours ago, ProAvia said: My very basic understanding is that using different jquery versions can cause all sorts of issues. And converting phpVMS to use a newer jquery version is going to require a lot of code changes. Since you said your skins are custom, any chance you can get them working with the same jquery versions presently used by phpVMS? Maybe reach out to other skin developers (see the forum here on site) and see what they suggest. Once you get these skins working correctly, any chance you will release them as freeware for others to use? So, I just found the error, and it was literally a mistake made. Had placed a cookie in the header to not accept unsafe sites, I removed it and returned to work normally. Quote Link to comment Share on other sites More sharing options...
Administrators ProAvia Posted January 12, 2020 Administrators Report Share Posted January 12, 2020 Great that you have it now working properly. Any chance you will be releasing these skins for others to freely use? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.