themetman's picture

I am helping a friend move his local site from old laptop running Ubuntu to new laptop runnning Manjaro.

We have got the LAMP server and Drush working fine, however after uploading the database using either Drush or MySQL we get this error when trying to use drush therafter.

PHP Fatal error:  Uncaught Error: Class "Drupal\Core\Logger\RfcLogLevel" not found in phar:///usr/local/bin/drush/commands/core/drupal/environment_common.inc:294
stack trace:
#0 phar:///usr/local/bin/drush/includes/drupal.inc(122): drush_watchdog_severity_levels()
#1 /home/francisg/rob_docs/webdev/rob2.local/web/core/includes/module.inc(975): system_watchdog()
#2 /home/francisg/rob_docs/webdev/rob2.local/web/core/includes/bootstrap.inc(2329): module_invoke_all()
#3 /home/francisg/rob_docs/webdev/rob2.local/web/core/includes/errors.inc(214): watchdog()
#4 /home/francisg/rob_docs/webdev/rob2.local/web/core/includes/bootstrap.inc(2969): _backdrop_log_error()
#5 [internal function]: _backdrop_exception_handler()
#6 {main}
  thrown in phar:///usr/local/bin/drush/commands/core/drupal/environment_common.inc on line 294

This is repeated three times.

With no database loaded issuing drush status we get this:

Backdrop version         :  1.20.3               
 Site URI                 :  http://web           
 Database driver          :  mysql                
 Database hostname        :  localhost            
 Database port            :  3306                 
 Database username        :  rob                  
 Database name            :  rob2local_db         
 PHP configuration        :  /etc/php/php.ini     
 PHP OS                   :  Linux                
 Drush script             :  /usr/local/bin/drush
 Drush version            :  8.4.10               
 Backdrop Drush           :  1.x-1.x              
 Drush temp directory     :  /tmp                 
 Drush configuration      :                       
 Drush alias files        :                       
 Backdrop Settings File   :  ./settings.php

I cannot find any clue when online searching.

The only other thing is that when using Drush to upload the database as in this command: drush sql-cli < database.sql we get this warning:

WARNING: Forcing protocol to  TCP  due to option specification. Please explicitly state intended protocol.

Anyone got an idea why this is a problem?

Here are the php modules installed:

[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
pspell
readline
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

 

Accepted answer

Hi themetman,

the error isn't thrown by Backdrop, but by Drush:

PHP Fatal error:  Uncaught Error: Class "Drupal\Core\Logger\RfcLogLevel" not found in phar:///usr/local/bin/drush/commands/core/drupal/environment_common.inc:294

So maybe search in that direction?

Or maybe you don't need drush at all in this case.

Most helpful answers

You are very kind!

Comments

indigoxela's picture

Hi themetman,

the error isn't thrown by Backdrop, but by Drush:

PHP Fatal error:  Uncaught Error: Class "Drupal\Core\Logger\RfcLogLevel" not found in phar:///usr/local/bin/drush/commands/core/drupal/environment_common.inc:294

So maybe search in that direction?

Or maybe you don't need drush at all in this case.

themetman's picture

In the end we switched to Ubuntu and all went fine.

Thanks for the input, and yes sorry, realise now that we should not have posted this on the Backdrop Forum.

Regards

indigoxela's picture

No need to excuse, you're welcome with any question. I just wanted to give a hint, that it's not Backdrop, which "nags", but drush. :-)