System not responding web interface

Hello All,

In connecting to one of the PBX’s I get nothing on the html side, I verified ports etc and nothging.
Investigating I discovered some strange errors, so I ran some fwconsole commends to check security and such, but no luck, including force install core.
I also reinstalled apache.
In looking at the apache error log I found the below:
PHP Parse error: syntax error, unexpected $end in /var/www/html/admin/functions.inc.php on line 592

I wasn’t able to find anything in the forum referencing the above.

Any help appreciated!

That’s saying that that file is ending on line 592. Sounds like someone’s accidentally overwritten it or something. The easiest thing to do is just re-get it from github or git.freepbx.org.

I’m not sure what version you’re running, but if you’re running 13, this will work to fix it:

wget 'http://git.freepbx.org/projects/FREEPBX/repos/framework/browse/amp_conf/htdocs/admin/functions.inc.php?at=0aea9f8aea6693439a594b88aedc0df48e30b7a4&raw' -O /var/www/html/admin/functions.inc.php

That’s all one line.

Hi Rob,

Thanks for the response…
Running 6.12.65-32
I tried reinstalling sysadmin rpm via yum and it came up with more errors.

Since this is the standby system, I figured why not get it from the running server, so i tried that and that also failed.

Here is what I’m seeing now:

Package Arch Version Repository Size

Reinstalling:
sysadmin noarch 2.8.0-2.shmz65.1.45 schmooze-commercial 102 k

Transaction Summary

Reinstall 1 Package(s)

Total download size: 102 k
Installed size: 98 k
Is this ok [y/N]: y
Downloading Packages:
sysadmin-2.8.0-2.shmz65.1.45.noarch.rpm | 102 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : sysadmin-2.8.0-2.shmz65.1.45.noarch 1/1
Shutting down Filesystem event daemon (incrond): [ OK ]
PHP Warning: require_once(/var/www/html/admin/functions.inc.php): failed to open stream: No such file or directory in /var/www/html/admin/bootstrap.php on line 77
PHP Fatal error: require_once(): Failed opening required ‘/var/www/html/admin/functions.inc.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /var/www/html/admin/bootstrap.php on line 77
PHP Warning: require_once(/var/www/html/admin/functions.inc.php): failed to open stream: No such file or directory in /var/www/html/admin/bootstrap.php on line 77
PHP Fatal error: require_once(): Failed opening required ‘/var/www/html/admin/functions.inc.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /var/www/html/admin/bootstrap.php on line 77
Starting Filesystem event daemon (incrond): [ OK ]
Verifying : sysadmin-2.8.0-2.shmz65.1.45.noarch 1/1

Installed:
sysadmin.noarch 0:2.8.0-2.shmz65.1.45

Complete!
[[email protected] admin]# amportal start

Fetching FreePBX settings with gen_amp_conf.php…
PHP Warning: require_once(/var/www/html/admin/functions.inc.php): failed to open stream: No such file or directory in /var/www/html/admin/bootstrap.php on line 77
PHP Fatal error: require_once(): Failed opening required ‘/var/www/html/admin/functions.inc.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /var/www/html/admin/bootstrap.php on line 77

PHP Warning: require_once(/var/www/html/admin/functions.inc.php): failed to open stream: No such file or directory in /var/www/html/admin/bootstrap.php on line 77
PHP Fatal error: require_once(): Failed opening required ‘/var/www/html/admin/functions.inc.php’ (include_path=’.:/usr/share/pear:/usr/share/php’) in /var/www/html/admin/bootstrap.php on line 77
**** WARNING: ERROR IN CONFIGURATION ****
astrundir in ‘/etc/asterisk’ is set to but the directory
does not exists. 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.

Um. I don’t know why you tried reinstalling sysadmin?

But the error is pretty self explanatory.

I thought the file came from sysadmin, but I did copy the missing file from the other server afterwards, but It created some other errors. I did do an amportal chown, even though I copied it from the other server with ownership info.

It’s giving the appearance that something got corrupted.

amportal restart

Fetching FreePBX settings with gen_amp_conf.php…

STOPPING ASTERISK
Waiting for Asterisk to Stop Gracefully…

Asterisk Stopped

STOPPING WANROUTER FOR SANGOMA CARDS

Router is already stopped !

STOPPING DAHDI FOR DIGIUM CARDS
Unloading DAHDI hardware modules: done
Dahdi Stopped

STARTING WANROUTER FOR SANGOMA CARDS
No Wanrouter Cards Installed

STARTING DAHDI FOR DIGIUM CARDS
No DAHDI modules on the system. Not starting
Dahdi Started

Stopping Restapps daemon

[email protected] stop /var/www/html/admin/modules/ucpnode/node
node_modules/forever/bin/forever stop --uid ‘ucp’ index.js

error: Forever cannot find process with id: index.js

npm ERR! [email protected] stop: node_modules/forever/bin/forever stop --uid 'ucp' index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] stop script.
npm ERR! This is most likely a problem with the ucp-server package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node_modules/forever/bin/forever stop --uid ‘ucp’ index.js
npm ERR! You can get their info via:
npm ERR! npm owner ls ucp-server
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.14.48-33.39.amzn1.x86_64
npm ERR! command “/usr/bin/node” “/usr/bin/npm” "stop"
npm ERR! cwd /var/www/html/admin/modules/ucpnode/node
npm ERR! node -v v0.10.40
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /var/www/html/admin/modules/ucpnode/node/npm-debug.log
npm ERR! not ok code 0
Stopping Queue Callback Daemon
SETTING FILE PERMISSIONS…Done
Removing any dangling symlinks
Dangling symlinks removed

STARTING ASTERISK
Asterisk Started
Starting Restapps daemon
Stopping fail2ban: [ OK ]
Ensuring logfiles are presentStarting fail2ban: [ OK ]
/var/lib/asterisk/bin/freepbx_engine_hook_ucpnode: line 5: [: =: unary operator expected
Starting Queue Callback Daemon
[[email protected] admin]# amportal chown

Fetching FreePBX settings with gen_amp_conf.php…

SETTING FILE PERMISSIONS…Done
Removing any dangling symlinks
Dangling symlinks removed
[[email protected] admin]#
[[email protected] admin]# amportal restart

Fetching FreePBX settings with gen_amp_conf.php…

STOPPING ASTERISK
Waiting for Asterisk to Stop Gracefully…

Asterisk Stopped

STOPPING WANROUTER FOR SANGOMA CARDS

Router is already stopped !

STOPPING DAHDI FOR DIGIUM CARDS
Unloading DAHDI hardware modules: done
Dahdi Stopped

STARTING WANROUTER FOR SANGOMA CARDS
No Wanrouter Cards Installed

STARTING DAHDI FOR DIGIUM CARDS
No DAHDI modules on the system. Not starting
Dahdi Started

Stopping Restapps daemon

[email protected] stop /var/www/html/admin/modules/ucpnode/node
node_modules/forever/bin/forever stop --uid ‘ucp’ index.js

error: Forever cannot find process with id: index.js

npm ERR! [email protected] stop: node_modules/forever/bin/forever stop --uid 'ucp' index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] stop script.
npm ERR! This is most likely a problem with the ucp-server package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node_modules/forever/bin/forever stop --uid ‘ucp’ index.js
npm ERR! You can get their info via:
npm ERR! npm owner ls ucp-server
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.14.48-33.39.amzn1.x86_64
npm ERR! command “/usr/bin/node” “/usr/bin/npm” "stop"
npm ERR! cwd /var/www/html/admin/modules/ucpnode/node
npm ERR! node -v v0.10.40
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /var/www/html/admin/modules/ucpnode/node/npm-debug.log
npm ERR! not ok code 0
Stopping Queue Callback Daemon
SETTING FILE PERMISSIONS…Done
Removing any dangling symlinks
Dangling symlinks removed

STARTING ASTERISK
Asterisk Started
Starting Restapps daemon
Stopping fail2ban: [ OK ]
Ensuring logfiles are presentStarting fail2ban: [ OK ]
/var/lib/asterisk/bin/freepbx_engine_hook_ucpnode: line 5: [: =: unary operator expected
Starting Queue Callback Daemon

From the web interface it has:
Can not write to cache folder at schmooze-font/cache. Please run (from the CLI): amportal chown

I did run the amportal chown again but that didn’t change anything.

You’re going to have to start removing modules until you get it working, and then re-add them.

If you look at them, all of the errors are from ucpnode, so you’ll want to start by removing that.