FREEPBX crashed please help

Dear All,

When i update My PHP5.1 to 5.3 , I was unable to go into freepbx GUI, So i degrade back to 5.1 , now I am getting this error
FATAL ERROR
DB Error: extension not found
Trace Back
/var/www/html/admin/libraries/db_connect.php:63 die_freepbx()
[0]: DB Error: extension not found

/var/www/html/admin/bootstrap.php:98 require_once()
[0]: /var/www/html/admin/libraries/db_connect.php

/etc/freepbx.conf:9 require_once()
[0]: /var/www/html/admin/bootstrap.php

/var/www/html/admin/config.php:97 include_once()
[0]: /etc/freepbx.conf
and when I tried to do an amportal reload from ssh, it says :
Please wait…
/usr/local/sbin/amportal: line 46: [FATAL]: command not found

/var/lib/asterisk/bin/freepbx_engine: line 98: [FATAL]: command not found
**** 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.
please help.

It looks like you destroyed your system. When you tried to downgrade PHP it looks like you deleted Asterisk and probably many dependencies.

How was this originally installed?

I hope you made a backup in FreePBX.

No asterisk is working fine, Phones are registering and I am able to call through the system, just only that freepbx not working at all.I am having backup of all those files in the /etc/asterisk/ folder.

The real config is in the database /etc/asterisk won’t get you anywhere.

You are correct, Asterisk is fine I read too fast, it’s the run directory that can’t be found.

Check if Mysql is running, make sure that the /etc/freepbx.conf matches your mysql credentials.

Kill all asterisk then do an amportal stop then amportal start (don’t try and do an amportal restart).

I stopped all the asterisk services, and then tried an amportal stop. then i am getting this.
Please wait…
/usr/local/sbin/amportal: line 46: [FATAL]: command not found

/var/lib/asterisk/bin/freepbx_engine: line 98: [FATAL]: command not found
**** 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.

Are you sure you installed all of the required php packages ?

DB Error: extension not found

This looks like you missed something.