I’m encountering a lot of errors while trying to install Asterisk, FreePBX, and especially PHP.
I always encounter errors with PHP, I’m following the documentation, but it’s not working.
Does anyone have a detailed step-by-step guide for installation? It’s been 3 days and I haven’t solved the problems, I’ve cleaned up the installation environment and started from scratch about 10 times and nothing…
Now, not being able to install PHP on the server isn’t a FreePBX issue it’s a server issue. You should probably provide actual details of your installation, how you are doing it and exactly what errors you are getting.
STARTING ASTERISK
Asterisk is already running
root@server:/usr/src/freepbx# ./install -n --dbuser root --dbpass “SQLPa$$w0rd”
Assuming you are Database Root
Checking if SELinux is enabled…Its not (good)!
Reading /etc/asterisk/asterisk.conf…Done
Checking if Asterisk is running and we can talk to it as the ‘asterisk’ user…Yes. Determined Asterisk version to be: 18.22.0
Checking if NodeJS is installed and we can get a version from it…Yes. Determined NodeJS version to be: 18.19.0
Preliminary checks done. Starting FreePBX Installation
Checking if this is a new install…Partial
Database Root installation checking credentials and permissions…Connected!
Initializing FreePBX Settings
Finished initalizing settings
Copying files (this may take a bit)…
20024/20024 [============================] 100%
Done
bin is: /var/lib/asterisk/bin
sbin is: /usr/sbin
Finishing up directory processes…Done!
Running variable replacement…Done
Creating missing #include files…Done
Setting up Asterisk Manager Connection…Done
Running through upgrades…
Checking for upgrades…
No further upgrades necessary
Finished upgrades
Setting FreePBX version to 17.0.15.2…Done
Writing out /etc/amportal.conf…Done
Writing out /etc/freepbx.conf…Done
Chowning directories…
PHP Fatal error: Declaration of Symfony\Component\Translation\TranslatorInterface::getLocale() must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::getLocale(): string in /var/www/html/admin/libraries/Composer/vendor/symfony/translation/TranslatorInterface.php on line 69
Whoops\Exception\ErrorException: Declaration of Symfony\Component\Translation\TranslatorInterface::getLocale() must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::getLocale(): string in file /var/www/html/admin/libraries/Composer/vendor/symfony/translation/TranslatorInterface.php on line 69
Stack trace:
Whoops\Run->handleShutdown() [internal]:0
Done
Installing framework…
PHP Fatal error: Declaration of Symfony\Component\Translation\TranslatorInterface::getLocale() must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::getLocale(): string in /var/www/html/admin/libraries/Composer/vendor/symfony/translation/TranslatorInterface.php on line 69
Whoops\Exception\ErrorException: Declaration of Symfony\Component\Translation\TranslatorInterface::getLocale() must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::getLocale(): string in file /var/www/html/admin/libraries/Composer/vendor/symfony/translation/TranslatorInterface.php on line 69
Stack trace:
root@server:/usr/src/freepbx# ./install -n --dbuser root --dbpass “Tec9748@”
PHP Fatal error: Uncaught Error: Call to undefined function FreePBX\Install\simplexml_load_file() in /usr/src/freepbx/install:19
Stack trace: #0 {main}
thrown in /usr/src/freepbx/install on line 19
These are basically the two errors I receive when trying to install freepabx after installing everything requested in the documentation
Remembering, I use Debian 12 on a cloud server, without a graphical interface
Do you have a link with installation instructions? I followed one that asked me for php 7.4, it must be an older link, that’s why I’m beating myself up
If using the script, you should be running it on a fresh minimal install of D12. That means without PHP, MySQL, apache etc. already installed. The script should take care of all that for you.