Drupal 7 print stack trace

Drupal 7 stack trace


//$e = new \Exception;
//$trace = var_dump($e->getTraceAsString());
//$trace = $e->getTraceAsString();
//$formatted_trace = str_replace('#', '<br />#',$trace);

Repair mysql database

After an unexpected shutdown, your mysql dastabase files might need to be recovered.


Database datafiles for mysql are typically in /var/lib/mysql, one folder for each schema so long as you have innodb_file_per_table set.


The mysql log file can be found at /var/log/mysql/error.log. 

Check each database with

Install Drush 8

You will need drush 8 and drush 7 to work with Drupal 8 and with Drupal 7.

This requires composer already installed.


mkdir ~/drush8
cd ~/drush8
composer require drush/drush:8.x

You may have drush 7 already installed. If not, then

mkdir ~/drush7
cd ~/drush7
composer require drush/drush:7.x


Update aliases

In .bash_aliases add

#alias drush7='~/drush7/vendor/bin/drush'
alias drush8='~/drush8/vendor/bin/drush'

Uncomment the drush7 alias if you need it.

and source your .bash_rc file


Subscribe to Front page feed