ALERT Buh-bye CentOS.

For now, a fix script for an existing setup would be:
Bash:
#!/bin/bash
add-apt-repository -y ppa:ondrej/apache2
apt upgrade
sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php/7.*/apache2/php.ini
sed -i 's/\(^memory_limit = \).*/\1256M/' /etc/php/7.*/apache2/php.ini
sed -i 's/\(^upload_max_filesize = \).*/\120M/' /etc/php/8.*/apache2/php.ini
sed -i 's/\(^memory_limit = \).*/\1256M/' /etc/php/8.*/apache2/php.ini
for i in $(ls /etc/php); do a2dismod php$i ; done
a2enmod php5.6
systemctl restart apache2
reboot

Using the older PHP, needs the other Apache2 that Debian team maintains...

ppa:ondrej/apache2:
This branch follows latest Apache2 packages as maintained by the Debian Apache2 team with couple of compatibility patches on top.


It also includes some widely used Apache 2 modules (if you need some other feel free to send me a request).
 
I'm still having the fwconsole error even after running the ucp rebuild script on Ubuntu 20.04. It might have something to do with Cron? Running fwconsole reload via SSH seems to temporarily resolve the issue. The instance is on Vultr.

Also I suspect there is an issue with the Apache2 config for the Debian and Ubuntu installs where the current Apache2 config isn't including the config files in /etc/pbx/httpdconf. This becomes a big issue if you try to make your instance public using the scripts provided (http://nerdvittles.com/?p=34063) because it never reads the public.conf file you add in /etc/pbx/httpdconf.


Update: In regards to the cron error I get this sometimes when running fwconsole reload --verbose:

Code:
Reload Started

In Cron.class.php line 281:
                                                                       
  [Whoops\Exception\ErrorException (2)]                                
  proc_open(/tmp/cron.error): failed to open stream: Permission denied
                                                                       

Exception trace:
() at /var/www/html/admin/libraries/BMO/Cron.class.php:281
Whoops\Run->handleError() at n/a:n/a
proc_open() at /var/www/html/admin/libraries/BMO/Cron.class.php:281
FreePBX\Cron->installCrontab() at /var/www/html/admin/libraries/BMO/Cron.class.php:162
FreePBX\Cron->remove() at /var/www/html/admin/libraries/BMO/Job.class.php:238
FreePBX\Job->init() at /var/www/html/admin/libraries/BMO/Job.class.php:91
FreePBX\Job->add() at /var/www/html/admin/libraries/BMO/Job.class.php:73
FreePBX\Job->addClass() at /var/www/html/admin/modules/timeconditions/Timeconditions.class.php:149
FreePBX\modules\Timeconditions->updateCron() at /var/www/html/admin/modules/timeconditions/functions.inc.php:225
timeconditions_get_config() at /var/www/html/admin/libraries/BMO/DialplanHooks.class.php:95
FreePBX\DialplanHooks->processHooks() at /var/www/html/admin/libraries/Console/Reload.class.php:318
FreePBX\Console\Command\Reload->reload() at /var/www/html/admin/libraries/Console/Reload.class.php:91
FreePBX\Console\Command\Reload->execute() at /var/www/html/admin/libraries/Composer/vendor/symfony/console/Command/Command.php:255
Symfony\Component\Console\Command\Command->run() at /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php:960
Symfony\Component\Console\Application->doRunCommand() at /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php:255
Symfony\Component\Console\Application->doRun() at /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php:148
Symfony\Component\Console\Application->run() at /var/lib/asterisk/bin/fwconsole:163

reload [--json] [--dry-run] [--skip-registry-checks] [--dont-reload-asterisk]
 
Last edited:
I'm still having the fwconsole error even after running the ucp rebuild script on Ubuntu 20.04. It might have something to do with Cron? Running fwconsole reload via SSH seems to temporarily resolve the issue. The instance is on Vultr.

Also I suspect there is an issue with the Apache2 config for the Debian and Ubuntu installs where the current Apache2 config isn't including the config files in /etc/pbx/httpdconf. This becomes a big issue if you try to make your instance public using the scripts provided (http://nerdvittles.com/?p=34063) because it never reads the public.conf file you add in /etc/pbx/httpdconf.


Update: In regards to the cron error I get this sometimes when running fwconsole reload --verbose:

Code:
Reload Started

In Cron.class.php line 281:
                                                                     
  [Whoops\Exception\ErrorException (2)]                              
  proc_open(/tmp/cron.error): failed to open stream: Permission denied
                                                                     

Exception trace:
() at /var/www/html/admin/libraries/BMO/Cron.class.php:281
Whoops\Run->handleError() at n/a:n/a
proc_open() at /var/www/html/admin/libraries/BMO/Cron.class.php:281
FreePBX\Cron->installCrontab() at /var/www/html/admin/libraries/BMO/Cron.class.php:162
FreePBX\Cron->remove() at /var/www/html/admin/libraries/BMO/Job.class.php:238
FreePBX\Job->init() at /var/www/html/admin/libraries/BMO/Job.class.php:91
FreePBX\Job->add() at /var/www/html/admin/libraries/BMO/Job.class.php:73
FreePBX\Job->addClass() at /var/www/html/admin/modules/timeconditions/Timeconditions.class.php:149
FreePBX\modules\Timeconditions->updateCron() at /var/www/html/admin/modules/timeconditions/functions.inc.php:225
timeconditions_get_config() at /var/www/html/admin/libraries/BMO/DialplanHooks.class.php:95
FreePBX\DialplanHooks->processHooks() at /var/www/html/admin/libraries/Console/Reload.class.php:318
FreePBX\Console\Command\Reload->reload() at /var/www/html/admin/libraries/Console/Reload.class.php:91
FreePBX\Console\Command\Reload->execute() at /var/www/html/admin/libraries/Composer/vendor/symfony/console/Command/Command.php:255
Symfony\Component\Console\Command\Command->run() at /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php:960
Symfony\Component\Console\Application->doRunCommand() at /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php:255
Symfony\Component\Console\Application->doRun() at /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php:148
Symfony\Component\Console\Application->run() at /var/lib/asterisk/bin/fwconsole:163

reload [--json] [--dry-run] [--skip-registry-checks] [--dont-reload-asterisk]

Running rm -rf /tmp/* BEFORE fwconsole reload will fix this issue. Will track down the Apache issue. Thanks.
 
Running rm -rf /tmp/* BEFORE fwconsole reload will fix this issue. Will track down the Apache issue. Thanks.
That's essentially the workaround I've been doing. The small annoyance is that applying new settings in FreePBX is broken.
 
Last edited:
SO there was a missing command in the Ubuntu Apache config setup that kept the Incredible PBX Apache config files from loading. I've pushed this out with the Automatic Update Utility now. This should fix the problem with public.conf not loading as well.
 
SO there was a missing command in the Ubuntu Apache config setup that kept the Incredible PBX Apache config files from loading. I've pushed this out with the Automatic Update Utility now. This should fix the problem with public.conf not loading as well.
That did the trick. I was suspecting it was missing an include line somewhere in the apache config. It probabily could of been put into its own conf file because I'm not entirely sure if a update of apache2 could overwrite /etc/apache2/apache2.conf.
 
So once the patch applied on my system, apache2 died. Because public.conf started being read, it wouldn't start. My public.conf got restored from my CentOS based backup, so a lot of values were wrong, including server IP address and log file locations. It also didn't like the UserDir directive, so I commented it out.
 
Upgrading from apples to oranges is fraught with surprises... but you at least knew that. :chef:
 
Yes, I mentioned it for others who will no doubt end up in the same boat. I'm probably about to re-deploy this PBX and do a straight Debian install anyway, to remove all of these variables. Or I may go back to CentOS and ride it out to the end, I don't know yet...
 
@tbrummell
Debian or Ubuntu. Since Ubuntu is based on Debian, the code for both is very similar. Debian is said to be more stable of an OS, as the packages are older, but with security patches of flaws that are discovered, and Ubuntu is more cutting edge, as they have newer packages. But for a PBX, it probably doesn't make any difference, as the Asterisk and Freepbx code is the same for both. Debian installs Php 7.3, whereas Ubuntu does 7.4... But the installation script defaults to php 5.6 on both, as the Hylafax doesn't work on PHP 7.

I have been helping @wardmundy with Ubuntu. But all my modifications should also work fine for the Debian. IE:
show-password has extension ranges you can specify now, with the defaults in there by default.
 
It is an original 2021 Debian with backup restored from CentOS 2020 PUBLIC.
 
The Centos restore would do the same thing on Ubuntu. So I guess you need to not use the public.conf from Centos :)
 
New release of Incredible PBX 2021 for Ubuntu is ready for the PIONEERS:
Code:
wget http://incrediblepbx.com/IncrediblePBX2021-U2.sh
chmod +x IncrediblePBX2021-U2.sh
./IncrediblePBX2021-U2.sh

Major tweaks in stability (we hope). Includes all of @jaminmc tweaks. Also supports automatic OpenVPN client support. Simply copy your .ovpn config to /etc and name it incrediblepbx.ovpn. When you reboot, OpenVPN should be enabled with IP address displaying in pbxstatus. Also includes /usr/local/sbin/refresh-freepbx that automatically updates FreePBX activated modules whenever you reboot your server.
 
Last edited:
Well, after noticing strangeness in my iptables (including my old IP address from the restore), I figured this box was compromised, possibly. So, decided to wipe and do a by hand reinstall/provision to get it straightened out.
 
New IncrediblePBX2021.sh release today that gets rid of the babysitting chore of manually entering your country code at 5 minutes into install. This ITU telephone code was only necessary for Voicetronix hardware reportedly. If you're using this hardware, simply comment out the expect section in the script and replace it with the following line:
Code:
contrib/scripts/install_prereq install
 
Last edited:
New release of Incredible PBX 2021 for Ubuntu is ready for the PIONEERS:
Code:
wget http://incrediblepbx.com/IncrediblePBX2021-U2.sh
chmod +x IncrediblePBX2021-U2.sh
./IncrediblePBX2021-U2.sh

Major tweaks in stability (we hope). Includes all of @jaminmc tweaks. Also supports automatic OpenVPN client support. Simply copy your .ovpn config to /etc and name it incrediblepbx.ovpn. When you reboot, OpenVPN should be enabled with IP address displaying in pbxstatus. Also includes /usr/local/sbin/refresh-freepbx that automatically updates FreePBX activated modules whenever you reboot your server.
It looks like I may want to rebuild my PBX in the future then....
 
this is an install on Debian installed from scratch in a VM. The first part of install went ok. Then i tried to install incrediblefax2020.sh script and i a request to switch to php5.6. I run the script and this is what i get
./switch-to-php5.6
Switching to PHP 5.6. One moment please...
Module php7.3 already disabled
ERROR: Module php5.6 does not exist!
update-alternatives: error: alternative /usr/bin/php5.6 for php not registered; not setting
PHP 7.3.19-1~deb10u1 (cli) (built: Jul 5 2020 06:46:45) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.19, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.19-1~deb10u1, Copyright (c) 1999-2018, by Zend Technologies
Loaded Configuration File => /etc/php/7.3/cli/php.ini
 
this is an install on Debian installed from scratch in a VM. The first part of install went ok. Then i tried to install incrediblefax2020.sh script and i a request to switch to php5.6. I run the script and this is what i get
./switch-to-php5.6
Switching to PHP 5.6. One moment please...
Module php7.3 already disabled
ERROR: Module php5.6 does not exist!
update-alternatives: error: alternative /usr/bin/php5.6 for php not registered; not setting
PHP 7.3.19-1~deb10u1 (cli) (built: Jul 5 2020 06:46:45) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.19, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.19-1~deb10u1, Copyright (c) 1999-2018, by Zend Technologies
Loaded Configuration File => /etc/php/7.3/cli/php.ini

The IncrediblePBX2020.sh script is only for CentOS 7. IncrediblePBX2021.sh is for Debian 10.
 

Members online

Forum statistics

Threads
26,687
Messages
174,409
Members
20,257
Latest member
Dempan
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Back
Top