Drush command terminated abnormally due to an unrecoverable error - drupal

I have CentOS 6.6 with PHP 5.5.27 and Drupal 7.34
PHP 5.5.27 (cli) (built: Jul 10 2015 23:40:40)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
I've tried all latest 6,7,8 branches of Drush. When I type "drush -d -v status" I get an unrecoverable error (the error is the same on all branches of drush):
Drush bootstrap phase : bootstrap_drupal_full() [0.19 sec, 5.13 MB] [bootstrap]
Cannot modify header information - headers already sent by (output started at [warning]
/root/.composer/vendor/drush/drush/includes/output.inc:38) common.inc:698 [0.96 sec, 31.89 МБ]
Drush command terminated abnormally due to an unrecoverable error. [1.06 sec, 32.8 МБ]
I can't figure out what's wrong. Can anyone advise please?
Thanks in advance.

As mentioned in another comment, look for closing ?> tags at the end of custom modules, specifically any blank spaces after the >...but just remove the ?> to be in compliance.
A way to fix is to disable module by module until drush gives you a positive response. This will narrow down the code to review.
Also look at any hook_init() functions to see if anything is getting sent to the browser then check the weight of the module in the system table. If it is too low, it may cause an issue.

Related

xdebug : Fatal error with phpunit for code coverage

I wanna to test my code and coverage. I already install Xdebug extension and when I verify with php -v command, all i'ts good like that :
PHP 7.4.12 (cli) (built: Oct 27 2020 17:18:47) ( ZTS Visual C++ 2017 x64 )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Xdebug v3.0.0RC1, Copyright (c) 2002-2020, by Derick Rethans
with Zend OPcache v7.4.12, Copyright (c), by Zend Technologies
However if I run phpunit i have a fatal error :
PHPUnit 7.5.20 by Sebastian Bergmann and contributors.
Fatal error: Uncaught SebastianBergmann\CodeCoverage\RuntimeException: xdebug.coverage_enable=On has to be set in php.ini in C:\Users\quent\Desktop\Github\quentingeeraert-website\bin\.phpunit\phpunit-7.5-0\vendor\phpunit\php-code-coverage\src\Driver\Xdebug.php on line 42
SebastianBergmann\CodeCoverage\RuntimeException: xdebug.coverage_enable=On has to be set in php.ini in C:\Users\quent\Desktop\Github\quentingeeraert-website\bin\.phpunit\phpunit-7.5-0\vendor\phpunit\php-code-coverage\src\Driver\Xdebug.php on line 42
Call Stack:
0.0005 402112 1. {main}() C:\Users\quent\Desktop\Github\quentingeeraert-website\bin\phpunit:0
0.0027 477240 2. require('C:\Users\quent\Desktop\Github\quentingeeraert-website\vendor\symfony\phpunit-bridge\bin\simple-phpunit.php') C:\Users\quent\Desktop\Github\quentingeeraert-website\bin\phpunit:13
0.2824 501760 3. include('C:\Users\quent\Desktop\Github\quentingeeraert-website\bin\.phpunit\phpunit-7.5-0\phpunit') C:\Users\quent\Desktop\Github\quentingeeraert-website\vendor\symfony\phpunit-bridge\bin\simple-phpunit.php:405
0.2989 1149952 4. PHPUnit\TextUI\Command::main($exit = ???) C:\Users\quent\Desktop\Github\quentingeeraert-website\bin\.phpunit\phpunit-7.5-0\phpunit:22
0.2989 1150064 5. Symfony\Bridge\PhpUnit\Legacy\CommandForV6->run($argv = [0 => 'bin\\phpunit', 1 => '--colors=always', 2 => '--stop-on-failure'], $exit = TRUE) C:\Users\quent\Desktop\Github\quentingeeraert-website\bin\.phpunit\phpunit-7.5-0\src\TextUI\Command.php:162
I already add xdebug.coverage_enable = On in my php.ini file so I don't understand why the system say that :/
Maybe someone can help me ? Thank you a lot for help me !
I already add xdebug.coverage_enable = On in my php.ini file so I don't understand why the system say that :/
Xdebug v3.0.0RC1
PHPUnit 7.5.20
Either upgrade PHPUnit to the version that knows about Xdebug 3 ... or downgrade Xdebug to 2.x (2.9.8 is the latest).
Thing is: xdebug.coverage_enable is the Xdebug 2 option. That option does nothing in Xdebug 3 where you should use xdebug.mode = coverage instead.
Xdebug 3 uses different config options than v2 and your version of PHPUnit is simply not aware of that. Xdebug 3 will simply report an empty value/0 for no-longer-used Xdebug 2 options.
https://3.xdebug.org/docs/upgrade_guide#Changed-Configuration-Settings
P.S. You should see a warning when you run php -i with Xdebug 3 -- it should complain if such a wrong/outdated option is present in your php.ini (unless you have configured PHP to not to report any startup errors I guess).
In either case: run php -i and see the actual live values from Xdebug section: what value that option has.

How to fix chmod errors when updating wordpress theme?

I recently upgraded from php 5 to 7.2 and my wp site didnt work, service temporarily unavailable error. So I logged into the backend and WP 5.4 was telling me I needed to check security issues of which I resolved 2 of 3 automatically but 1 could not which is "restrict access to files and folders". So I tried to update the 2017 theme and when I do so I get a bunch of these(although its the same error):
Selected items were updated with errors:
- Unable to update theme 'twentyseventeen_1.7_1_', details: PHP Warning: chmod(): Operation not permitted in /var/www/vhosts/santiapps.com/httpdocs/wordpress_2/wp-admin/includes/class-wp-filesystem-direct.php on line 168
Warning: chmod(): Operation not permitted in /var/www/vhosts/santiapps.com/httpdocs/wordpress_2/wp-admin/includes/class-wp-filesystem-direct.php on line 168
PHP Warning: chmod(): Operation not permitted in /var/www/vhosts/santiapps.com/httpdocs/wordpress_2/wp-admin/includes/class-wp-filesystem-direct.php on line 168
Warning: chmod(): Operation not permitted in /var/www/vhosts/santiapps.com/httpdocs/wordpress_2/wp-admin/includes/class-wp-filesystem-direct.php on line 168...
and near the end it reads:
Warning: The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions. "front-page.php, rtl.css, 404.php...
Then in the end it doesnt update of course. A suggestion by the Wordpress Toolkit on plesk is:
Im using filezilla and changing the permissions to those files but I get "operation not permitted".
[SOLVED] (at least for me)
Me too on Cloudways and Digital Ocean.
Just restart the server and error is gone.

making first commit into diffusion git :Phabricator

I am setting up a phabricator server and i am observing the below issue, both from my diffusion repository Status window and the daemons.log file
Error updating working copy: Command failed with error #128!
COMMAND
git log --format='%H%x01%P%x01%ct' --all --
STDOUT
(empty)
STDRR
fatal: bad default revision 'HEAD'
After reading on this issue, i figured out that this is a common issue with bare repositories without first commits. So i tried committing from my local system through repository http URI, but it is returning a 500 exception.
below is the error message i pulled out from phabricator database:
$ select * from phabricator_repository.repository_pullevent;
500 | {"response.message":"Error 1: sudo: a password is required\n"}
Can any one help me out to understand the issues from repository_pullevents and daemons.log file.
thanks in advance!
i resolved the problem with sudo, by changing the user running apache and adding the symlink created for git-http-backened in sudoers for the apache user.
and the problem with repository bad HEAD revision was resolved by making the first commit from a client machine.

Segmentation violation on symfony 2.6.6 process component

When I try to run a command on a sub-process created by ProcessBuilder, i get segmentation violation.
[Symfony\Component\Process\Exception\RuntimeException]
The process has been signaled with signal "11".
But this doesn't happen upto v2.5.12 only from v2.6.0
finally the issue is found. Thanks to Rackspace support staff Cristian Banciu and Mike Bostic
Cause:
Latest newrelic php agent 4.23.1.107 causes seg fault when used with symfony 2.6.0 or above with process component.
newrelic.browser_monitoring.auto_instrument = 0 didn't help
Solution:
finally i downgraded newrelic php agent to 4.21.0.97-1 and all work fine
Anojan

(Drupal) Unsupported operand types in /var/www/html/includes/common.inc

I have installed quicktabs module and configured it. When I try to implement it using mini-panel, it gives me an error(Please see the attachments).
I have tried various methods which I found on Google and Drupal, but couldn't solve my problem.
When I looked in Error Logs, I found this.
[Thu Dec 05 15:02:00 2013] [error] [client 130.246.76.109] PHP Fatal error: Unsupported operand types in /var/www/html/includes/common.inc on line 4465, referer: http://etraining-dev.esc.rl.ac.uk/admin/structure/mini-panels/add/content
Any help would be appreciated.
I have solved this issue.
I figured out that the reason of that error was ctools module. I read somewhere that they have fixed this problem in their latest dev release. So I uninstalled the recommended 7.3 version and installed the 7.1 dev version and it solved this issue.
Thanks

Resources