Call to undefined function lib\\db\\array_column() on LIVE server but LOCALHOST fine

Windows: 10
WAMP : localhost
PHP

Again dont think its a bug if its working on localhost… But maybe somebody can give me a heads up why it will go all pear-shaped online… i even changed passwords and usernames on the database online.

Its a older site that I upgraded to by using the request to update files via Wappler.

dmxConnectLib folder updated
dmxAppConnect folder updated
dmxConnect folder updated

All seems to be working fine on localhost with data returning and working…

So once uploaded … LIVE… I get
Call to undefined function lib\db\array_column()

+++++++++++++++++

So maybe the next step would be to take an older project … and copy those files back to the server and see the result…

This is a function in PHP 5.5+, you are most probably using an older version of PHP.

OK I can confirm if I copy BACK the “OLDER” dmxConnectLib then it all works online again.
So weird… but yes … just replacing it with the older “dmxConnectLib” from a backup it worked online

Hi Teodor not at all… 7.2 php according to the server.

Screenshot 2021-12-01 at 11-07-23 cPanel - Server Information

But let me see if there is not some php.ini or htacess setting the php version on that site… thanks for the heads up… let me have a look

Ok … if i use the older Connection.php file it works as im using php 7.2.34 .
I have checked online there is no ini or htaccess forcing 5.5+
It could be very specific to this server…

The older version below works fine.

The new version does not work on my server… but could be server specific as its working on localhost.

I have tested this on localhost php 5.0.2 and working…
I am baffled… and cannot give you an answer why it wont work online :frowning:

Can you please check this in your php.ini and confirm this by checking the phpinfo() ?
Create a php file named info.php and place it in the root of your site (upload to remote server).
Add the following content inside it

<?php

phpinfo();

?>

and open the file in your browser.

ok let me give that i go… :slight_smile: maybe the server shows 7.2 but the info might bring something else up… weird as monkey nuts in the city of Jozi.

You are 100% correct… ill have to speak to the host… 5.4 foook me…

You can upgrade to a more recent version or @patrick maybe can check how to make this compatible with older versions.

seem they have 2 different configurations … if that is even possible… as you will se above the server say 7.2 but the info file says 5.4 …

Thanks for solving this … ill give them a shout now

@Teodor… no the server needs to upgrade… but thanks for the offer :slight_smile:
Im busy making the sites on my side compatible to the latest version of wappler… so forward and onward as they would say … :slight_smile:

PHP 5.6 is the minimum version required for Server Connect.

PHP support vor PHP 5.6 ended in 2019 and currently PHP 7.3 is the minimum version supported. This means that there are no security updates for older PHP versions and I would advise to at least update to version 7.3. With Server Connect we will support 5.6 for a little while for the users that are still running on it, but I would advise on upgrading to 7 or 8.

https://www.php.net/supported-versions.php

Yes 100% that i understand… what got my was the sever said in cpanel ver 7.2php *see above)… but the info() said 5.2 hence the confusion… thanks @patrick … im not sticking around with those… i am updating all the time…

** so i guess you can move this out of the bugs section :slight_smile: :slight_smile: as its not a bug…