Upgrading Core Issue - failed to open stream: Permission denied - RESOLVED

Tags: #<Tag:0x00007f70259c6a70> #<Tag:0x00007f70259c68e0>

(Bob Testa) #1

Working on a mostly-fresh install of the latest nethserver (based on centos 7) on a vm for testing, I installed freepbx for feasibility exploration. Some of the modules were not working, because core (current version 14.0.1rc1.6) has been disabled. It requires upgrade to 14.0.1rc1.9 to enable, but when trying to upgrade, I get the following error:
Whoops\Exception\ErrorException thrown with message "file_put_contents(/etc/asterisk/http_custom.conf): failed to open stream: Permission denied"
#6 Whoops\Exception\ErrorException in /var/www/html/freepbx/admin/modules/core/install.php:810
#5 file_put_contents in /var/www/html/freepbx/admin/modules/core/install.php:810
#4 include_once in /var/www/html/freepbx/admin/libraries/modulefunctions.class.php:2495
#3 module_functions:_doinclude in /var/www/html/freepbx/admin/libraries/modulefunctions.class.php:2447
#2 module_functions:_runscripts in /var/www/html/freepbx/admin/libraries/modulefunctions.class.php:1981
#1 module_functions:install in /var/www/html/freepbx/admin/page.modules.php:297
#0 include in /var/www/html/freepbx/admin/config.php:390

Please help me upgrade so I can properly test the software.

I’ve also logged the issue here: \https://issues.freepbx.org/browse/FREEPBX-15065

(Andrew Nagy) #2

fwconsole chown

(Bob Testa) #3

PHP Fatal error: Undefined class constant ‘MYSQL_ATTR_INIT_COMMAND’ in /var/www/html/freepbx/admin/libraries/BMO/Database.class.php on line 128
Whoops\Exception\ErrorException: Undefined class constant ‘MYSQL_ATTR_INIT_COMMAND’ in file /var/www/html/freepbx/admin/libraries/BMO/Database.class.php on line 128
Stack trace:

  1. Whoops\Exception\ErrorException->() /var/www/html/freepbx/admin/libraries/BMO/Database.class.php:128

(TheJames) #4

Make sure you have php-mysql installed

(Andrew Nagy) #5

This is a nethserver issue and therefore should be brought up to them. They execute a specialized version of php.


/usr/bin/scl enable rh-php56 ‘fwconsole chown’

(Bob Testa) #7

Installed php-mysql and executed /usr/bin/scl enable rh-php56 ‘fwconsole chown’ and it works now. Thanks guys! :slight_smile:

(Lisinwang) #8

scl enable rh-php56 – fwconsole chown

(Lorne Gaetz) closed #9