PHP mkdir() permission denied when setting up Sysadmin

bug
configuration
Tags: #<Tag:0x00007f7027988f20> #<Tag:0x00007f7027988db8>

(Pat Miller) #1

Trying to install the sysadmin module in FreePBX, but it keeps giving this:

mkdir(): Permission denied
/var/www/html/admin/modules/sysadmin/install.php
the materials provided herewith, you agree to all of the terms of use as
outlined in our End User Agreement which can be found and reviewed at
www.schmoozecom.com/cmeula
<?PHP
exit();
__halt_compiler();
?>
2004072203655431310950331x�

I’ve tried running fwconsole chown to fix permissions, and it doesn’t help. Really stuck with this one. Apache is running as user asterisk as well.

I’m running on Fedora, PHP 5.6.22, Asterisk 13.9.1. Thanks for any suggestions.


(Andrew Nagy) #2

Sysadmin is a commercial module and only supports CentOS 6.x and PHP 5.3. It won’t install on anything else.


(Pat Miller) #3

Shoot, didn’t know that.

Looks like somewhere in the process or trying to make this all work, I broke something nasty:

`[root@freepbx-localdomain asterisk] # fwconsole restart
Exception: could not find driver::could not find driver in file /var/www/html/admin/libraries/utility.functions.php on line 202
Stack trace:

  1. Exception->() /var/www/html/admin/libraries/utility.functions.php:202
  2. die_freepbx() /var/www/html/admin/libraries/BMO/Database.class.php:101
  3. PDOException->() /var/www/html/admin/libraries/BMO/Database.class.php:98
  4. PDO->__construct() /var/www/html/admin/libraries/BMO/Database.class.php:98
  5. FreePBX\Database->__construct() /var/www/html/admin/libraries/BMO/FreePBX.class.php:69
  6. FreePBX->__construct() /var/www/html/admin/bootstrap.php:141
  7. require_once() /etc/freepbx.conf:9
  8. include_once() /var/lib/asterisk/bin/fwconsole:12`

Using amportal gives this:
[root@freepbx-localdomain asterisk] # amportal start Please wait... /usr/sbin/amportal: line 44: Fatal: command not found /var/lib/asterisk/bin/freepbx_engine: line 133: Exception:: command not found **** WARNING: ERROR IN CONFIGURATION **** astrundir in '/etc/asterisk' is set to but the directory does not exist. Attempting to create it with: 'mkdir -p ' mkdir: missing operand Try 'mkdir --help' for more information. **** ERROR: COULD NOT CREATE **** Attempt to execute 'mkdir -p ' failed with an exit code of 1 You must create this directory and the try again.

Lastly, my /etc/asterisk/asterisk.conf file…the astrundir definitely exists too:
[directories] astetcdir=/etc/asterisk astmoddir=/usr/lib64/asterisk/modules astvarlibdir=/var/lib/asterisk astagidir=/var/lib/asterisk/agi-bin astspooldir=/var/spool/asterisk astrundir=/var/run/asterisk astlogdir=/var/log/asterisk [options] transmit_silence_during_record=yes languageprefix=yes execincludes=yes

Looks like I messed something up nicely…would anyone be so kind as to help me fix this one?

Thanks.


(Andrew Nagy) #4

You don’t seem to have the php mysql pdo driver installed


(Pat Miller) #5

Right…struggling to get it to load however:

[root@freepbx-localdomain freepbx] # /usr/bin/env php -m | grep -i pdo PDO pdo_sqlite

pdo_mysql is in the /etc/php.d directory:

[root@freepbx-localdomain php.d] # ls *pdo_mysql* 30-pdo_mysql.ini

I’ve done a dnf reinstall php php-common php-pdo php-mysqlnd and still having the same issue. Seems I just can’t get it to load pdo_mysql no matter what.

Edit: While supposedly php.ini is no longer used to load extensions, I did try it anyways, adding:
extension="pdo.so" extension="pdo_mysql.so"

And now…
[root@freepbx-localdomain freepbx] # /usr/bin/env php -m | grep -i pdo PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20090626/pdo.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20090626/pdo.so: undefined symbol: zend_new_interned_string in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20090626/pdo_mysql.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20090626/pdo_mysql.so: undefined symbol: mysqlnd_allocator in Unknown on line 0 PDO pdo_sqlite


#6

Hello tm,

Does this mean I cannot install it on CentOS 7 with php 5.4? How am I suppose to install the Endpoint Manager commercial module if I cannot install systemadmin?


(Andrew Nagy) #7

We do not support php 5.4. Only php 5.3


#8

Do I need to roll back to 5.3? I just get mkdir(): Permission denied.


(Aiwin) #9

We have centos 6.5 and php 5.3.3 version but still not able to install system admin module.
Same error getting like mkdir() permission denied


(Lorne Gaetz) closed #10

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