• Welcome to SAIL Community Supported PBX . Please login or sign up.
 
May 05, 2024, 02:24:41 PM

News:

SMF updated to 2.0


Debian 9.x stretch support

Started by sysadmin, March 12, 2018, 09:19:34 AM

Previous topic - Next topic

sysadmin

March 12, 2018, 09:19:34 AM Last Edit: March 12, 2018, 09:23:31 AM by sysadmin
Sail is now packaged for Debian 9.  This is still a beta release but it is available to install now from the repository.   Stretch is quite a bit different from its predecessor Jessie.  Among other things it uses Systemd, PHP7 and Asterisk 13.  Stretch has also dropped MySQL in favour of MariaDB but it's a straight "drop-in" replace so there's not much of a learning curve if you know MySQL.   Install instructions for SAIL on stretch are pretty much the same as previous Debian versions.  Here they are in a nutshell.  This assumes you have a vanilla stretch install with only ssh.


wget  http://sailpbx.com/sail/sail-5.0/debs/sail.gpg.key
apt-key add sail.gpg.key
echo deb http://sailpbx.com/sail/sail-5.0/debs/repo/ stretch main >> /etc/apt/sources.list
apt-get update
apt-get install ssmtp
apt-get install sail
reboot
mysql -u root < /opt/sark/stat/asterisk-stat-v2/cdr-mysql-setup.sql
apt-get install ast-en-gb-gpl-gsm-sounds


That's it.  Functionally, the only difference is that the Areski "stats" package is no longer supported in stretch. This is because PHP7 is PDO only so the stats package would require quite a bit of work to bring forward.  This is a temporary situation and we are actively working on a replacement for it.  Meanwhile, the stats code is still in the release if anyone wants to have a go at modifying it.



compsos

Hi Team
Good to have something new to test.
Upgraded an existing Jessie ver 5.0.32. Interesting exercise.
Had to purge php5 and then reinstall php7.0 and sail. Also # out php_admin_value. Seems it has been diminished from php7.0. Data then loaded
mkdir ~/sites_available_backup cp -av /etc/apache2/sites-available/* ~/sites_available_backup

Remove problematic lines sed -i "/\b(php_value|php_admin_value)\b/d" /etc/apache2/sites-available/*


Do we need to do this?
"You cannot use php_admin_value/php_admin_flag with PHP compiled as CGI (suPHP), because these options are only supported when PHP is compiled as a module of Apache. Feel free to use php.ini sections to change the settings (http://php.net/manual/en/ini.sections.php). Otherwise - just switch to mod_ruid2+mod_php and you'll be able to use php_admin_value in Apache configuration files. "

Even without the above as most of the entries appear to be linked to the CDR modules, the other issue that came up is te holiday schedule. It throws an error and returns nothing.
QuotePHP Fatal error:  Uncaught Error: Call to undefined function split() in /opt/sark/php/sarkholiday/view.php:266\nStack trace:\n#0 /opt/sark/php/sarkholiday/view.php(46): sarkholiday->saveNew()\n#1 /opt/sark/php/srkmain.php(35): sarkholiday->showForm()\n#2 /opt/sark/php/sarkholiday/main.php(3): require_once('/opt/sark/php/s...')\n#3 {main}\n  thrown in /opt/sark/php/sarkholiday/view.php on line 266, referer: https://xxx.xxx.xxx.xxx/php/sarkholiday/main.php
Which looks like it is this block
// convert the inputs to Epoch time     
        $hmsplit = split(':',$shm);
        $tm = new DateTime();
        $tm-> setDate($syy, $smm, $sdd);
        $tm-> setTime($hmsplit[0], $hmsplit[1], 00);
        $sepoch = $tm->getTimestamp(); 
        $hmsplit = split(':',$ehm);
        $tm-> setDate($eyy, $emm, $edd);
        $tm-> setTime($hmsplit[0], $hmsplit[1], 00);
        $eepoch = $tm->getTimestamp();


As this is a test platform will try an install on a clean Debian9 and see if we get the same issues.
It almost upgraded!!

sysadmin

Thanks for the input!   We wouldn't usually recommend upgrading 8 to 9 simply because so much has changed in Debian 9.   In general, we would either do a complete re-install or create a new instance alongside and load a backup.

I'll take a look at the holiday schedule bug you found. I think it's because "Split" has gone in PHP7.  I've put it on the list.





Del

Quote from: sysadmin on March 12, 2018, 09:19:34 AM
Sail is now packaged for Debian 9.  This is still a beta release but it is available to install now from the repository. 

Cool, thanks. Has anything changed between v 5.0.0-32 & v5.0.0-57 or is it strictly the Debian 9 changes?

Quote from: sysadmin on April 08, 2018, 07:59:13 PM
I'll take a look at the holiday schedule bug you found. I think it's because "Split" has gone in PHP7.  I've put it on the list.

I had a quick search and it looks like explode replaced the split function. Changing the split function to explode seemed to fix it for me. No idea if this is the proper way to do it but it works if anyone want to try it.

sysadmin

Hi,

5.0.0-57 is the first stabilisation release for V5 as we begin to run it out.   It has a patch rollup and additions to some of the provisioning templates, particularly for Yealink.   

If you look in the repos or GiTHub you will see that we are currently working on V6, which is currently in alpha and we expect it to be available as a beta in a month or so.

We'll publish more about V6 as we move towards releasing it.