No access to Admin Panel

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

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.

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?

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.

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?

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.

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

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

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.

Hmm - maybe your frontpage_main has been modified. What I posted is from the original file. 

What is line 112 in /home2/ravnalas/public_html/Crew/lib/skins/ocean_blue/frontpage_main.php

<td><font color=“053077”><?php echo count(ACARSData::GetACARSData());?></td></font>

39 minutes ago, RVF147 said:

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

You shouldn’t hold your breath waiting for someone else to update your skin and your modules to work with PHP 7.3. You might see a Simpilot derived version of phpVMS 5.5.2 that will work in PHP 7.3 - but the skin and modules probably not.

It took me many hours to get the Simpilot version working with PHP 7.2 - and lots of searching on Google and a boat load of reading to find things to try to resolve the issues I was seeing. After I had the base program working, it took a lot more hours to adapt my skin and get all my modules working with it. There was a bunch of stumbling along the way too.

As for your admin issue - honestly, what worked was a WAG on my part. It made sense to me, but I really had NO idea if it would be successful. Glad it helped!

1 minute ago, ProAvia said:

You shouldn’t hold your breath waiting for someone else to update your skin and your modules to work with PHP 7.3. You might see a Simpilot derived version of phpVMS 5.5.2 that will work in PHP 7.3 - but the skin and modules probably not.

It took me many hours to get the Simpilot version working with PHP 7.2 - and lots of searching on Google and a boat load of reading to find things to try to resolve the issues I was seeing. After I had the base program working, it took a lot more hours to adapt my skin and get all my modules working with it. There was a bunch of stumbling along the way too.

As for your admin issue - honestly, what worked was a WAG on my part. It made sense to me, but I really had NO idea if it would be successful. Glad it helped!

Yeah i just took the oceanblue v2 skin and changed the coloring…maybe added a few other easy lines of code from basic php knowledge…but who knows…maybe google might help me stumble across some fixes as well. Not knowing a whole lot about php really makes me want to dive deeper into it just to resolve these issues. Just gotta find the time to learn php then explore phpvms a little more as well. 

15 minutes ago, RVF147 said:

<td><font color=“053077”><?php echo count(ACARSData::GetACARSData());?></td></font>

Not sure if this will work…

\<td\>\<font color="053077"\> \<?php &nbsp; &nbsp;if(is\_array(ACARSData::GetACARSData()) ||&nbsp;ACARSData::GetACARSData() instanceof Countable) { &nbsp; &nbsp; &nbsp; &nbsp;echo count(ACARSData::GetACARSData() &nbsp; } ?\> \</font\>\</td\>

Revert what I initially posted… yours started on line 194 I think

9 minutes ago, RVF147 said:

Yeah i just took the oceanblue v2 skin and changed the coloring…maybe added a few other easy lines of code from basic php knowledge…but who knows…maybe google might help me stumble across some fixes as well. Not knowing a whole lot about php really makes me want to dive deeper into it just to resolve these issues. Just gotta find the time to learn php then explore phpvms a little more as well. 

That’s where I was back in March - now I know just enough to be dangerous. LOL

I found if I did a copy/paste of the base error, Google usually found something that worked… so, in the error

Warning: count(): Parameter must be an array or an object that implements Countable in /home2/ravnalas/public_html/Crew/lib/skins/ocean_blue/frontpage_main.php on line 112

I searched for

Warning: count(): Parameter must be an array or an object that implements Countable

Good luck in your searching… you will learn a lot