Drush error: Call to undefined method Symfony\Component\Config\Definition\BaseNode::resetPlaceholders() - command-line

I created a Drupal 9 installation using the recommended Drupal method, and the Drupal site works fine. I have been using it for weeks to build the structure for my site and begin populating data.
However, recently I tried using Drush on the command line to clear caches (drush cr). It doesn't work, and instead throws the following error:
Error: Call to undefined method Symfony\Component\Config\Definition\BaseNode::resetPlaceholders() in /var/www/path-to-site/vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php on line 99 #0 ...
I did a composer global require drush/drush to install Drush globally, but even running drush --root=/var/www/path-to-site status doesn't work.
I am not good with command line troubleshooting. Does anybody know what the possible problem could be?

Related

memcached not getting loaded for php7

I am using Easyphp-DevServer-17 and PHP7 ,I want to use "memcached" with PHP-7.1 , I downloaded memcached dll files from the following link
php 7 memcahced
I tried adding dll files to ext folder in php 7 but phpinfo file
doesn't reflect it
and i tried following code
$servers = array(array('localserver', 11212));
$memcacheD = new Memcached;
but it throws following error "Fatal error: Uncaught Error: Class 'Memcached' not found"
Please help me on this issue as i am new to php and struggling to load memcached extension
First of all ensure you have the correct version of memcacheD. Most of the versions for Windows out there are memcache, without the D at the end, even the name of the libraries are called memcacheD. It's very misleading but I have added the link to the correct version below. To clarify, memcache and memcacheD are not the same and cannot be interchanged.
Run phpinfo() and make notations of Compiler, Architecture, Thread Safety, you will need this to get the correct version of the DLL.
Download the correct memcacheD version from https://github.com/lifenglsf/php_memcached_dll There are 2 files, the php extension DLL and the lib DLL. You need both.
Save the php extension DLL in your easyPHP folder, in my case was \eds-binaries\php\php713vc14x86x220414190951\ext.
Enable the extension in php.ini, I renamed the DLL so in my case I had to add the line extension=php_memcached.dll
Save libmemcached.dll in C:\windows
Reload Apache to ensure the config is refreshed.
And that's it. Now run phpinfo() again and should show there. If it's not working check Apache error log, it will tell you if the DLL failed to load. If you get the "not a Win32 application" message it means you didn't download the correct DLL.
Remember you also have to have the service running, memcached.exe -d start from cmd should do.

how to run facebook login in localhost using codeigniter

I used the facebook sdk for codeigniter to put its login on my website. I am trying to run the code but I am getting error. I am running it on my localhost providing the localhost url on facebook's site_url and i have tried to follow the instructions it has provided. THe error I am getting is
Fatal error: Class 'Facebook\Facebook' not found in C:\xampp\htdocs\huebind\application\libraries\facebook.php on line 67
The problem must be with not installing with composer. Unfortunately I dont know how to do it either. I simply copied the code on my codeigniter. What difference does it make?
install the composer and put the composer.json file inside the application folder. then from the directory use composer install from command prompt. It will work

laravel 5 ide autocompletion

I want to switch to laravel 5, but have some trouble with ide - autocompletion. I'm using phpstorm.
In google, the answers always end up with suggesting to use https://github.com/barryvdh/laravel-ide-helper . But it seems like it is broken for Laravel 5.
The steps I am doing are:
Install Laravel 5
composer create-project laravel/laravel
Require ide-helper
composer require barryvdh/laravel-ide-helper
Added 'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider',
....
'Illuminate\Translation\TranslationServiceProvider',
'Illuminate\Validation\ValidationServiceProvider',
'Illuminate\View\ViewServiceProvider',
'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider',
Trying to generate the helper file
artisan ide-helper:generate
But it always breaks with following error:
exception 'InvalidArgumentException' with message 'There are no commands defined in the "ide-helper" namespace.' in C:\xampp\htdocs\test\vendor\symfony\console\Symfony\Component\Console\Application.php:501
0 C:\xampp\htdocs\test\vendor\symfony\console\Symfony\Component\Console\Application.php(535): Symfony\Component\Console\Application->findNamespace('ide-helper')
1 C:\xampp\htdocs\test\vendor\symfony\console\Symfony\Component\Console
\Application.php(192): Symfony\Component\Console\Application->find('ide-helper:gene...')
2 C:\xampp\htdocs\test\vendor\symfony\console\Symfony\Component\Console\Application.php(126): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Outpu
t\ConsoleOutput))
3 C:\xampp\htdocs\test\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(91): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Out
put\ConsoleOutput))
4 C:\xampp\htdocs\test\artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
5 {main}
Maybe someone had the same issue and can help me.
I'm open for different solutions for autocompletion other than barryvdh's ide-helper.
I had the same problem and this fixed it:
Before you run php artisan ide-helper:generate command, make sure to php artisan clear-compiled and php artisan optimize as it's noted here. If this didn't fixed your problem, take a look at this and clean out PhpStorm cache by choosing this:
File | Invalidate Caches/Restart
After auto restarting, PhpStorm will index again and everything should work fine.
Sorry for my bad english.
Edited: After these steps import your Facades like this use Illuminate\Support\Facades\Auth link them inside your _ide_helper.php file like use Auth.
I ran into the same problem. These are the steps I took to fix it:
I double-checked that 'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider' was correctly added to the providers array in config/app.php.
I executed artisan clear-compiled. Had no effect
Executing php artisan config:clear fixed the problem.
This error occur when the package ServiceProvider isn't loaded.
If you have multiple config file (like for different environment), you must ensure that the service provider is well set in all the environment you which to use the package.
config/
local/
app.php
app.php
to verify if the service provider is correctly set to your application you can dump the app config:
dd(\Config::get('app.providers'));
Try this:
php artisan ide-helper:generate
Here is an updated gist as of this month. I have tested this and it works in PHPStorm.
Also you don't have to install this through composer. Copy the gist and save it in your root folder as _ide_helper.php.

Typo3 6.0: Install Tool Error Message

In conjunction with the failed installation of an extension (yag), the install tool is no longer available with the following error message:
PHP Fatal error: Class '\\tx_install_session' not found in /var/typo3_src-6.0.2/typo3/sysext/core/Classes/Utility/GeneralUtility.php on line 4158
Any suggestions are welcome.
Ok, I'm one step further.
Assuming the backend login works, it helps to clear the cache via the flash button.
Which leads me to the question: Is there a way to do this in the shell in case the BE login is broken?
Remove/comment the bad extension in the LocalConfiguration.php file and then remove content of /typo3temp/Cache/ directory.
It will allow you restore to the state before the malformed installation.

Typo3 4.7.0 update breaks my FE login?

I've updated my Typo3 from 4.5.5 to 4.7.0 and I get several deprecated errors:
ERROR: Content Element type "login" has no rendering definition!
call to undefined error in t3lib_div::view_array
fail to include class.t3lib_htmlmail.php
The install tool gives me "typo3/ext/ directory not writable" but I've the correct right. I've even allow all?????
When I select a CType Element in the BE it give me this warning: PHP Warning
PHP Warning: Invalid argument supplied for foreach() in /var/www/typo3_src-4.7.0/t3lib/l10n/parser/class.t3lib_l10n_parser_llphp.php line 95
The solution for 2. is to use the new class t3lib_utility_debug but what is with the other errors?
Edit: 1. http://lists.typo3.org/pipermail/typo3-english/2011-November/078129.html
Edit 2: The solution for the missing class t3lib_htmlmail is to include another class t3lib_mail_message: require_once(PATH_t3lib .'mail/class.t3lib_mail_message.php');
You solved allready: install system extension "felogin"
you solved allready: use t3lib_utility_debug
check where the error is from. Often it is helpfull to search for that file in typo3conf/temp_*.
You could check your filesystem, if your webserver is allowed to write to typo3/ext/. I guess, it is not. But you do not need to. Usually you install extensions to typo3conf/ext/.
Update your language files via the extension manager.
Well, i know it is to late now, but for all others wo think about an update: just activate the deprecation log in the isntall toll and fix that problems first!
Updating from 4.5.X to 4.7.x broke my felogin as well. The reason was that there has been a local extension installation that has been of higher priority than the system one. So if you suffer the same update issue, check for an local installation of felogin in "typo3conf/ext" - and delete it in case it is there. This solved my problem!