Trying to upgrade from 14 to 15

Getting the following error:

Migrating legacy backupjobs
Moving servers to filestore

In Filestore.class.php line 200:

  trim() expects parameter 1 to be string, array given


moduleadmin [-f|--force] [-d|--debug] [--edge] [--ignorecache] [--stable] [--color] [--skipchown] [-e|--autoenable] [--skipdisabled] [--snapshot SNAPSHOT] [--format FORMAT] [-R|--repo REPO] [-t|--tag TAG] [--skipbreakingcheck] [--sendemail] [--onlystdout] [--] [<args>]...

This is at line 200
https://git.freepbx.org/projects/FREEPBX/repos/filestore/browse/Filestore.class.php#200

public function addItem($driver,$data){
		$id = \Ramsey\Uuid\Uuid::uuid4()->toString();
		$data['driver'] = $driver;
        //The below line is line 200
		$fsdata = array_map('trim',$data);
		return $this->saveConfig($id,$fsdata);

I am not a PHP guy and not sure how to fix thisā€¦ So I can complete the upgrade

Any help appreciated

My ā€œsolutionā€ was

mysql
use asterisk;
show tables like '%backup%';

and truncate every table

You are a life saver my friend, I was breaking my head as our upgrade was stuck in Backup. all the commercial modules including sysadmin was in disabled state. Finally you gave me the solution. I truncated all the tables and then backup installed without any issues and the upgrade completed successfully,

Sample truncate commands,

MariaDB [asterisk]> truncate table backup_cache;
Query OK, 0 rows affected (0.01 sec)

MariaDB [asterisk]> truncate table backup_details;
Query OK, 0 rows affected (0.00 sec)

MariaDB [asterisk]> truncate table backup_items;
Query OK, 0 rows affected (0.00 sec)

1 Like

Bumped into another issue today. (This update was divided in two. 1/2: Update the PBX from 14 to 15 and Asterisk from 16 to 18. 2/2: Convert all ChanSIP extensions to PJSIP)

While the phones tried to re-provision, I noticed that it doesnā€™t pull the new configuration. So I went to pbx.ip:83 and it prompted for authentication.

This PBX does not have SysAdmin pro, and no one has manually enabled http auth.

to be sure, the http auth file actually exists:

[root@freepbx ~]# cat /etc/httpd/provis.http.auth
:$1$UrK6tTy8$ID.Hv7FaCwA4nxAHVirBL1

I searched the forums and found this post where Kapil Gupta advises to go to Sysadmin ā†’ port management ā†’ submit (without any changes)

Tried that, no luck.

Then is when I came across this post from Rob Thomas, and as you can see, http auth got enabled during the upgrade.

[root@freepbx ~]# mysql asterisk -e 'select * from sysadmin_options where `key` like "provis%"'
+------------+-------+
| key        | value |
+------------+-------+
| provisauth | both  |
+------------+-------+

So the workaround here is:

mysql
use asterisk;
update sysadmin_options set `value` = 'none' where `key` ='provisauth';

Run fwconsole reload
Then follow Kapilā€™s instructions mentioned above.

To confirm it worked, check for the http auth file

[root@freepbx ~]# cat /etc/httpd/provis.http.auth
cat: /etc/httpd/provis.http.auth: No such file or directory

https://issues.freepbx.org/browse/FREEPBX-23609

edit - marked as resolved in 15.0.19

Hey Lorne, the ticket I created is in a ā€˜needs informationā€™ status. I didnā€™t have a chance to send the tar file, but if itā€™s easy to reproduce then I donā€™t think that I need to send that.

Can you please merge both issues?

https://issues.freepbx.org/browse/FREEPBX-23593

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.