Jump to content

No access to Admin Panel


RVF147

Recommended Posts

Hello-

So I have been an admin and web developer for my VA for years now. I tried to login over the past few days and every time I click Admin or go to the admin center I get the error "Error was occured. Please log in first" I tried logging out and re-logging in with no luck. Went into the database and I am showing as part of group 1 - Administrators. I had the only other admin login and he said I show I am part of the admin group in my profile. Not sure what happened...any ideas? I was editing routes a few days ago and I went in to do more editing and it seems like the admin center wont let me in anymore. Any suggestions to the fix would be helpful so I can get some pireps approved.

Thank you!

Link to comment
Share on other sites

What OS (Mac, Linux, Windows?) and what browser are you using? Reason I ask is because lately I've had some Mac users tell me that Safari isn't remembering the session and they constantly have to log back in. Just trying to eliminate that as a potential problem. 

Are you sure nothing else has changed in the database or on your files? Does anyone else have access to either the SQL database, or directory access on the web server?

Link to comment
Share on other sites

Windows 10 and Ive tried chrome, edge, and IE with no luck...same error.

I am the only one with the password to the sql database and server. I have nt been in the server in over 4 months. Its just weird because one day im editing schedules and the next day it wont let me in the admin panel. Ive seen the "unauthorized user" several years ago and resolved that but never the "Please login" when clicking it. The other admin when in and removed me from the admin group and added me back in and still no luck. I just opened the sql database and it shows my Id in the admin group...

Link to comment
Share on other sites

I also just logged into another pilot's account after bumping them up to admin status for testing (done through sql) and all the admin links popped up that a normal admin would see....but go figure they cannot log in either...same error message I get. Attached a pic of the exact message I get. Any help is great at this point. I have tried 3 different pcs and none will let me back into the acmin center.... :(

error1.zip

Link to comment
Share on other sites

  • 5 months later...
On 3/9/2019 at 7:10 AM, Heritage1 said:

Have you recently cleaned your cookies on your Browser? What version of phpvms are you running also?

I am running Chrome and I have cleaned up my browsers on all computer....still not working.

Still says "An error was encountered. Please login first." Now none of the admins can access the admin center. I double checked the sql database and all the admins are in the administrator group. I tried adding them to the hub manager group, which also has access to the admin center....still no joy. I have tons of pireps stacking up and no way to get to them for approvals.

We are running phpvms 5.5.2.

Any help at all is great. I'm running against a brick wall.

Link to comment
Share on other sites

You have a few limited options at this point, it almost sounds like some of the Original Admin Files somehow might have been corrupted, the key files are in following areas that you most definately can overwrite and replace without affecting anything else, be very careful on doing so, and take your time on this also, double check your work, and always rename your original files for example;

layout.php.default  etc............ make sure you always rename your files just incase, the ones you would be overwriting of course. Thus, lets start, in your file structure you will have the following folder structures to be overwritten...../admin/lib . go there first. there are 3 default files there you can overwrite, airport_template.csv and phpvmsadmin.js and template.csv those are safe to overwrite.

Next, go to ; /admin/lib/layout . .............. overwrite layout.php, style.css and header.php files. Thats it, nothing else, and again, make sure you rename ANYTHING your overwriting so you have a backup to go back to, and don't say I didn't warn you on that. On that note, make sure you pull those files I've mentioned out of the install you have for phpvms, make a copy and upload the copys to the mentioned areas. What your doing is overwriting just the default files back to where it was on your Install. This should solve your problem, if your unsure, then by all means do not do it, and poke me a message first, I'm always around the boards. Hope this helps you, and again be very careful, Always Back things Up !

Jim

Link to comment
Share on other sites

1 hour ago, ProAvia said:

Did you try to log in again? What happens when you do that?

What version of PHP are you running?

When I logout and log back in, there is no change. I even used another admin account and no luck. It is phpvms 5 5.2 running on php 7.3 server. I know they updated about 2 months ago if that makes any difference.

Link to comment
Share on other sites

25 minutes ago, Heritage1 said:

You have a few limited options at this point, it almost sounds like some of the Original Admin Files somehow might have been corrupted, the key files are in following areas that you most definately can overwrite and replace without affecting anything else, be very careful on doing so, and take your time on this also, double check your work, and always rename your original files for example;

layout.php.default  etc............ make sure you always rename your files just incase, the ones you would be overwriting of course. Thus, lets start, in your file structure you will have the following folder structures to be overwritten...../admin/lib . go there first. there are 3 default files there you can overwrite, airport_template.csv and phpvmsadmin.js and template.csv those are safe to overwrite.

Next, go to ; /admin/lib/layout . .............. overwrite layout.php, style.css and header.php files. Thats it, nothing else, and again, make sure you rename ANYTHING your overwriting so you have a backup to go back to, and don't say I didn't warn you on that. On that note, make sure you pull those files I've mentioned out of the install you have for phpvms, make a copy and upload the copys to the mentioned areas. What your doing is overwriting just the default files back to where it was on your Install. This should solve your problem, if your unsure, then by all means do not do it, and poke me a message first, I'm always around the boards. Hope this helps you, and again be very careful, Always Back things Up !

Jim

I thought about doing that...I will see if I can find the default files for 5.5.2 and give that a whirl. Thanks for the advice. I'll let you know how it goes.

Link to comment
Share on other sites

  • Administrators

If you are running PHP 7.3 - that may well be your issue. Can you downgrade the PHP version to 5.6 (or as low as 5.3)? If you can't go back to php 5.x, what PHP versions are available to you?

What is your site URL?

 

Edited by ProAvia
Link to comment
Share on other sites

18 minutes ago, ProAvia said:

If you are running PHP 7.3 - that may well be your issue. Can you downgrade the PHP version to 5.6 (or as low as 5.3)? If you can't go back to php 5.x, what PHP versions are available to you?

What is your site URL?

 

Justhost has me on 7.3 despite my complaining. I dont see any way of downgrading back to where we were.

Our site is: fly.ravnalaskavirtual.com 

The mobile version is pretty useless so you may want to make sure you view it through a PC browser.

 

Edit: Just host assistant allowed me to bump back down to 5.6 but still having issues...

Edited by RVF147
Link to comment
Share on other sites

  • Administrators

I don't see any errors showing when loading the site and looking around as a guest......

In /core/local.config.php - around line 25 - what is the ERROR_LEVEL set to?

Are you using cPanel when accessing your host? Do you have an option for "MultiPHP Manager" - and can you set your VA domain to anything but 7.3 there? 

Edited by ProAvia
Link to comment
Share on other sites

1 hour ago, ProAvia said:

I don't see any errors showing when loading the site and looking around as a guest......

In /core/local.config.php - around line 25 - what is the ERROR_LEVEL set to?

Are you using cPanel when accessing your host? Do you have an option for "MultiPHP Manager" - and can you set your VA domain to anything but 7.3 there? 

it shows server is on 7.3 but my fly.ravnalaskavirtual.com is 5.6.

I attached the config file so you can see the settings

and yes we use the cpanel with justhost.

 

Edited by RVF147
Link to comment
Share on other sites

  • Administrators

Edit your post above and delete the zip file as it contains a password.

As a test, change all 3 for PHP 5.6 . The error level set is okay.

From a couple posts up...... Also - in the DB groups table - what is the permissions number shown for Admins?

Link to comment
Share on other sites

10 minutes ago, ProAvia said:

Edit your post above and delete the zip file as it contains a password.

As a test, change all 3 for PHP 5.6 . The error level set is okay.

From a couple posts up...... Also - in the DB groups table - what is the permissions number shown for Admins?

thanks for catching that wit the password....missed that.

also I changed the files with the ones from the original files....still no change.

Permission number is 536870911

Justhost wont let me downgrade the domains below 7.0...somehow my fly.ravnalaska domain is remaining at 5.6

Edited by RVF147
Link to comment
Share on other sites

1 minute ago, ProAvia said:

The permission number is correct for Admin on phpVMS 5.5.2

I'm not sure the other 2 are causing any issues - just thought it might be good to try downgrading their PHP version.

I'm at a loss.

i know its crazy. Not sure what could be causing this. it worked fine 2 months ago and now it wont play nice with us. I might have to find a new skin and start fresh....should i be looking into upgrading to the phpvms7.0 version or stick with my 5.5.2? 

Aside from that my site is a dud right now as i cant get into the admin panel...

Link to comment
Share on other sites

  • Administrators

phpVMS v7 isn't ready for a live environment. And there are no skins or modules yet either.

Leave the live site on PHP 5.6 if you can.

Well... let's try to get you operational at least.... 

  1. Make a copy of your DB in phpMyAdmin
  2. Make a backup of the live DB also - just to be extra safe (you will now have the live DB, a copy and the separate backup.... 3 in total)
  3. Download this version of phpVMS - it will install under PHP 7.2 (won't work in 7.3 though) https://forum.phpvms.net/topic/26545-phpvms-55272-phpvms-552-updated-for-php-72/
  4. Install the above linked version in a separate directory
  5. After install, go to /core/local.config.php and change the DB access to the COPY of the DB you made - also change the site URL there
  6. See if you can access the admin panel.

If all that worked - change this new install (5.5.2.72) to access the live DB and approve all the PIREPS from there. Also do any other admin functions you need to do.

Again, if it all worked, the pilots access the present live site. Admin access is through the 5.5.2.72 site. Hopefully that will allow you to get functional again.

Don't bother installing any skins or modules to the 5.5.2.72 site - you are just using it for admin functions. 

Let my know if this crazy idea works for you.

EDIT - as an aside - I have 5.5.2.72 running on my site since end of March when my host forced us to PHP 7.2. It took a lot of work to change 5.5.2 to 5.5.2.72 - and also skin and module changes.

Edited by ProAvia
clarification - hopefully....
Link to comment
Share on other sites

Deprecated: define(): Declaration of case-insensitive constants is deprecated in /home2/ravnalas/public_html/Crew/core/classes/ezdb/ezdb_base.class.php on line 45

Deprecated: define(): Declaration of case-insensitive constants is deprecated in /home2/ravnalas/public_html/Crew/core/classes/ezdb/ezdb_base.class.php on line 46

Deprecated: define(): Declaration of case-insensitive constants is deprecated in /home2/ravnalas/public_html/Crew/core/classes/ezdb/ezdb_base.class.php on line 47

Thees error message appear at the top of the page...can you help with a fix? I am not that experienced with php coding.

 

**ALSO   I did as you stated and the admin panel loaded on the new database. So i set it to use the live database...and it WORKS!!!!. The site updated after I approved the pireps and the live site looks to be working. So i think after the above errors get resolved....we have a method of at least getting into the admin panel operations through this method. THANK YOU SO MUCH!!!

So am I right in assuming that this is then an issue with the overall server being on 7.3 and my site being on 5.6 is causing compatibility issues with admin center files??? It would be nice to find a long term solution for this since the new admin site (crew.ravnalaskavirtual.com) is pretty dull without compatible skinning. :)

Edited by RVF147
Link to comment
Share on other sites

  • Administrators

Great that you can at least get into the admin - using a second install. Very weird issue.....

Having the inherited PHP version as 7.3 shouldn't affect any domains set for another PHP version - at least it didn't on mine (had 7.2 as inherited, 5.6, 7.0 and 7.1 also available)

I will look into the deprecated you posted and let you know.....

What PHP version is the main site running? What PHP version is the site with admin access running?

Edited by ProAvia
Link to comment
Share on other sites

  • Administrators

I don't think those Deprecated will affect the functioning of the site for right now. They are related to PHP 7.3 and are only showing on the admin panel site. I found some info, but need to research it a bit more before I comment further.

Link to comment
Share on other sites

1 hour ago, ProAvia said:

Great that you can at least get into the admin - using a second install. Very weird issue.....

Having the inherited PHP version as 7.3 shouldn't affect any domains set for another PHP version - at least it didn't on mine (had 7.2 as inherited, 5.6, 7.0 and 7.1 also available)

I will look into the deprecated you posted and let you know.....

What PHP version is the main site running? What PHP version is the site with admin access running?

Yeah its good to see it is running on the new admin site. The new admin site is on 7.3 and the main site is on 5.6. It shows i have the option to downgrade the 7.3 to as low as 7.0 tho if i choose. Should i drop it down to something lower?

Link to comment
Share on other sites

  • Administrators

Yes - drop the admin site down to 7.2 and those Deprecated will go away.

While what you have now is not perfect, at least it's functional. Hopefully your host will allow 7.2 for some time.

Once you have nothing better to do (HA) - consider updating all your modules to work with the 5.5.2.72 version. Many of the errors you will see will be repeated in the modules, so it' pretty easy to convert them over. As a Suggestion, if you go this route, make a test site on your host to work thru any issues - and set that test site to PHP 7.2. Once it's all working to your satisfaction, you can move it over to the live site (after backing everything up of course).

I haven't looked at using PHP 7.3 for the 5.5.2 (Simpilot) branch yet - beyond knowing it will throw errors. It may be possible to use my 5.5.2.72 version and update it for PHP 7.3, but I won't have time to look into it for a while.

Link to comment
Share on other sites

  • Administrators

Now that you changed to something lower than PHP 7.3.....

The "Pilots in flight" Warning you see on the front page of the admin site can be fixed by changing... 

starting on line 111 of .... /home2/ravnalas/public_html/Crew/lib/skins/ocean_blue/frontpage_main.php

from

 <?php
 if(count($shown) < 1){
echo 'There are no pilots online!';
 }
?> 

to......

<?php
    if(is_array ($shown) || $shown instance of Countable) {
        if(count($shown) < 1){
            echo 'There are no pilots online!';
        }
    }
?>

That's one of the error I saw more often than others

Edited by ProAvia
Link to comment
Share on other sites

yeah i just lowered it to 7.2 and the deprecated is gone. I have very little knowledge into php so ill just play around with it until i get it or someone throws up a 7.3 version of the modules and skin. Who knows we might get lucky and figure it out lol. I cant tell you how happy i am that you worked with me on this solution!!! 

Link to comment
Share on other sites

14 minutes ago, ProAvia said:

Now that you changed to something lower than PHP 7.3.....

The "Pilots in flight" Warning you see on the front page of the admin site can be fixed by changing... 

starting on line 111 of .... /home2/ravnalas/public_html/Crew/lib/skins/ocean_blue/frontpage_main.php

from


 <?php
 if(count($shown) < 1){
echo 'There are no pilots online!';
 }
?> 

to......


<?php
    if(is_array ($shown) || $shown instance of Countable) {
        if(count($shown) < 1){
            echo 'There are no pilots online!';
        }
    }
?>

That's one of the error I saw more often than others

That line of code didn't start til 194. I changed it but it doesn't look like anything changed.

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...