phpVMS Legacy support for PHP 7

Hi guys… PHP 5.x series has been deprecated as we all know, and with cPanel now dropping support as of Jan 2018, that is going to put a lot into a bind. So I’ve been working on bringing up that compatibility level. First step is making sure that everything is backwards compatible, so it would be great if people can test and report back issues. I recommend creating a duplicate of your site, and applying updates. I’m trying to make as few changes as possible for now to make diffs easier. The branch is here:

https://github.com/nabeelio/phpvms/tree/php70

It’ll be easier to just keep updates and notes to this thread here. Thanks!

Hello Nabeel,

I just installed it on my site and at the “Finish” button I got the following error:

  • Fatal error : Uncaught Error: Call to undefined function imagecreatefrompng() in /home/parkhoi1/public_html/test.parkho.ir/core/common/PilotData.class.php:998 Stack trace: #0 /home/parkhoi1/public_html/test.parkho.ir/core/common/RegistrationData.class.php(122): PilotData::generateSignature(1) #1 /home/parkhoi1/public_html/test.parkho.ir/install/Installer.class.php(245): RegistrationData::AddUser(Array) #2 /home/parkhoi1/public_html/test.parkho.ir/install/install.php(93): Installer::SiteSetup() #3 {main} thrown in  /home/parkhoi1/public_html/test.parkho.ir/core/common/PilotData.class.php  on line  998

I’ll try to see if I can fix it.

Cheers

32 minutes ago, Parkho said:

Do you have GD installed and enabled?

1 minute ago, Nabeel said:

That’s a weird one. Looks like that is supposed to be a built-in function. Are you installing on 5.3?

Nope! On 7.0

Just now, Parkho said:

Nope! On 7.0

Sorry, I edited my message. Is GD installed/enabled?

1 minute ago, Nabeel said:

Sorry, I edited my message. Is GD installed/enabled?

Honestly, I don’t know what that is!!!??!?

1 minute ago, Parkho said:

Honestly, I don’t know what that is!!!??!?

The extension: http://php.net/manual/en/book.image.php

Aha! That might be it cause a while ago I was trying to install phpVMS on php 7 but the built-in functions wouldn’t work, so I had to call my host and they said they fixed it for me which they did. I think I’m gonna have to call them back since I don’t think I have access to enable GD myself. I’ll let u know.

1 Like

16 hours ago, Nabeel said:

The extension: http://php.net/manual/en/book.image.php

Hi, The hosting company said they were to enable (GD) in next 24 hrs, so I will wait until then and try again.

Cheers

7 hours ago, Parkho said:

Hi, The hosting company said they were to enable (GD) in next 24 hrs, so I will wait until then and try again.

Cheers

Thanks for the update!

41 minutes ago, Nabeel said:

Thanks for the update!

Hi, I tried again and got the following error:

Fatal error : Uncaught Error: Call to undefined function mysql_get_server_info() in /home/parkhoi1/public_html/test.parkho.ir/install/Installer.class.php:365 Stack trace: #0 /home/parkhoi1/public_html/test.parkho.ir/install/install.php(97): Installer::RegisterInstall(‘2.1.936\n’) #1 {main} thrown in  /home/parkhoi1/public_html/test.parkho.ir/install/Installer.class.php  on line  365

Could it be again the missing built-in function on my server?

Thanks

Update: I ignored the error and opened the site it comes up okay but hitting “Admin Center” will give me the following error on “Dashboard” page:

Fatal error : Uncaught Error: Call to undefined function curl_init() in /home/parkhoi1/public_html/test.parkho.ir/core/classes/CodonWebService.class.php:58 Stack trace: #0 /home/parkhoi1/public_html/test.parkho.ir/admin/modules/Dashboard/Dashboard.php(91): CodonWebService->__construct() #1 /home/parkhoi1/public_html/test.parkho.ir/admin/modules/Dashboard/Dashboard.php(37): Dashboard->CheckForUpdates() #2 /home/parkhoi1/public_html/test.parkho.ir/core/classes/MainController.class.php(218): Dashboard->index() #3 /home/parkhoi1/public_html/test.parkho.ir/admin/index.php(82): MainController::RunAllActions() #4 {main} thrown in  /home/parkhoi1/public_html/test.parkho.ir/core/classes/CodonWebService.class.php  on line  58

Okay! The first error is fixed by changing " mysql_get_server_info() " to " mysqli_get_server_info()" in " Installer.class.php" line 365.

The second error on Dashboard I think is again missing built-in function on my server but other than that, so far so good!.

Cheers

17 hours ago, Nabeel said:

Thanks for the update!

 

A small bug has been fixed. During the installation when KJFK info is inserted into airports table “HUB” section must be ‘true’ otherwise after installation the “pilots” page wouldn’t show up. I changed and fixed it and now it’s okay. Also, I will have to change the file extension from “.tpl” to “.php” if you agree.

Cheers

23 hours ago, Parkho said:

Hi, I tried again and got the following error:

Fatal error : Uncaught Error: Call to undefined function mysql_get_server_info() in /home/parkhoi1/public_html/test.parkho.ir/install/Installer.class.php:365 Stack trace: #0 /home/parkhoi1/public_html/test.parkho.ir/install/install.php(97): Installer::RegisterInstall(‘2.1.936\n’) #1 {main} thrown in  /home/parkhoi1/public_html/test.parkho.ir/install/Installer.class.php  on line  365

Could it be again the missing built-in function on my server?

Thanks

Update: I ignored the error and opened the site it comes up okay but hitting “Admin Center” will give me the following error on “Dashboard” page:

Fatal error : Uncaught Error: Call to undefined function curl_init() in /home/parkhoi1/public_html/test.parkho.ir/core/classes/CodonWebService.class.php:58 Stack trace: #0 /home/parkhoi1/public_html/test.parkho.ir/admin/modules/Dashboard/Dashboard.php(91): CodonWebService->__construct() #1 /home/parkhoi1/public_html/test.parkho.ir/admin/modules/Dashboard/Dashboard.php(37): Dashboard->CheckForUpdates() #2 /home/parkhoi1/public_html/test.parkho.ir/core/classes/MainController.class.php(218): Dashboard->index() #3 /home/parkhoi1/public_html/test.parkho.ir/admin/index.php(82): MainController::RunAllActions() #4 {main} thrown in  /home/parkhoi1/public_html/test.parkho.ir/core/classes/CodonWebService.class.php  on line  58

I’ll look at the first error, but the 2nd one, you need to the curl extension to be enabled (same as GD)

16 minutes ago, Nabeel said:

I’ll look at the first error, but the 2nd one, you need to the curl extension to be enabled (same as GD)

Yes. I sent a request for the host to enable that.The system is now up and running and so far has no problems. One thing that is still not working is “Airport Look Up”. I’m still trying to fix that. I added “http://api.vacentral.net/” but still no go. I think it’s the “js” file.

P.S: Second error has been resolved.

On 3/2/2017 at 6:50 PM, Nabeel said:

I’ll look at the first error, but the 2nd one, you need to the curl extension to be enabled (same as GD)

Hi, I can confirm that the system is up and running on PHP 7 and so far has no issues until further notice. Good Job. 

P.S: The file extension has been changed from “.tpl” to “.php”. All system are up and running.

Cheers

On 3/4/2017 at 10:35 AM, Parkho said:

Hi, I can confirm that the system is up and running on PHP 7 and so far has no issues until further notice. Good Job. 

P.S: The file extension has been changed from “.tpl” to “.php”. All system are up and running.

Cheers

Awesome. Do you have a PHP 5.3 server? Can you test on that?

1 hour ago, Nabeel said:

Awesome. Do you have a PHP 5.3 server? Can you test on that?

I’ll check and let u know.

1 hour ago, Nabeel said:

Awesome. Do you have a PHP 5.3 server? Can you test on that?

I just checked my server and I don’t have PHP 5.3 installed.

Hi Nabeel,

I got phpvms Version simpilot 5.5.2 

This changes can work on that version mentioned above ?

Thanks,