Can anybody help me to find out solution.
Problem: php artisan command not working on server(using putty name.com) but showing result on my local environment (command prompt windows).
Description: when i am running php artisan command using putty it throws error in my error logs.
PHP Catchable fatal error: Argument 2 passed to Illuminate\Routing\UrlGenerator::__construct() must be an instance of Illuminate\Http\Request, null given, called in /home/hisunil4/intraview.co.in/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php on line 62 and defined in /home/hisunil4/intraview.co.in/vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php on line 103
Related
I've been trying to run the command php bin/console make:entity on my terminal on ubuntu but I have been getting this error message after trying to enter a property name and I have no idea what to do about it.
In Validator.php line 158: Argument 2 passed to
Symfony\Bundle\MakerBundle\Validator::validateDoctrineFieldName() must
be an instance of Doctrine\Common\Persistence\ManagerRegistry,
instance of Doctrin e\Bundle\DoctrineBundle\Registry given, called
in
/home/tautis/NQd/vendor/symfony/maker-bundle/src/Maker/MakeEntity.php
on line 303
When running drush cim/cr commands in a Drupal 8 (core 8.5.5) project i get the following error:
Fatal error: Default value for parameters with a class type hint can only be NULL in E:\Work\EmakinaCH\IheidCH\web\modules\contrib\search_api_solr\src\Plugin\search_api\backend\SearchApiSolrBackend.php on line 2669
[error] Drush command terminated abnormally due to an unrecoverable error.
Error: Default value for parameters with a class type hint can only be NULL in E:\Work\EmakinaCH\IheidCH\web\modules\contrib\search_api_solr\src\Plugin\search_api\backend\SearchApiSolrBackend.php, line 2669
And here's the aforementioned line of code
protected function flattenKeys($keys, array $fields = [], string $parse_mode_id = 'phrase') {
This error only occurs on one test machine which is running Win10 + Wamp 64-bit version 3.1.0, regardless of which php version is run on it 5.6, 7.0 or 7.1.9. On any other linux machine i use there are no issues.
Anyone know how to fix this, or what is the cause of this error?
Thanks
I'm having problem in issuing this command php artisan cache:clear, or php artisan I get this error.
Catchable fatal error: Argument 1 passed to
Illuminate\Config\Repository::__construct() must be of the type array,
integer given integer given, called in
/var/www/mysite/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php
on line 32 and defined in
/var/www/mysite/vendor/laravel/framework/src/Illuminate/Config/Repository.php
on line 24
Thank you in advance.
Solved in Laravel 5.5 by deleting the config.php file in bootstrap/cache folder then running php artisan config:cache
Solved
Rename your cache.php file, located in bootstrap/cache/.
After this, run php artisan config:cache command if still not working.
In your config/***.php file, the first line must be
<?php
NOT
<?
I have everything configured but when I run the tests it fails with this error log:
/usr/bin/php /tmp/ide-phpunit.php --bootstrap /home/lchost/EOSS2/tests/bootstrap.php --no-configuration /home/lchost/EOSS2/tests
Testing started at 9:02 PM ...
PHP Notice: Undefined variable: argv in /tmp/ide-phpunit.php(191) : eval()'d code on line 1
PHP Stack trace:
PHP 1. {main}() /tmp/ide-phpunit.php:0
PHP 2. IDE_PHPUnit_Loader::init() /tmp/ide-phpunit.php:250
PHP 3. eval() /tmp/ide-phpunit.php:191
This version of PHPUnit is supported on PHP 5.6, PHP 7.0, and PHP 7.1.
You are using PHP 5.5.9-1ubuntu4.20 (/usr/bin/php5).
What should I do? I was trying to update php5.5.9 to php5.6 but unsuccessful.
For the Notice message, from PHP for argv variable.
enable register_argc_argv in you php.ini file.
And for testing, upgrade your php.
You are getting Notice that will not affect your execution of the test. So thats not a problem for the PHPUnit.
I cannot run the composer command. I'm using windows cmd.
Inside C:\ProgramData\ComposerSetup\bin, I can do php composer.phar and it works.
But if do composer or composer.bat, I get this :
PHP Warning: Phar::mapPhar(/cygdrive/c/ProgramData/ComposerSetup/bin/c:\ProgramData\ComposerSetup\bin\composer.phar): failed to open stream: No such file or directory in /cygdrive/c/ProgramData/ComposerSetup/bin/c:\ProgramData\ComposerSetup\bin\composer.phar on line 23
PHP Fatal error: Uncaught exception 'PharException' with message 'unable to open phar for reading "/cygdrive/c/ProgramData/ComposerSetup/bin/c:\ProgramData\ComposerSetup\bin\composer.phar"' in /cygdrive/c/ProgramData/ComposerSetup/bin/c:\ProgramData\ComposerSetup\bin\composer.phar:23
Stack trace:
#0 /cygdrive/c/ProgramData/ComposerSetup/bin/c:\ProgramData\ComposerSetup\bin\composer.phar(23): Phar::mapPhar('composer.phar')
#1 {main}
thrown in /cygdrive/c/ProgramData/ComposerSetup/bin/c:\ProgramData\ComposerSetup\bin\composer.phar on line 23
What's wrong ?
I'm using the cygwin php in my path (cygwin/bin).
It works if I use a new php installation. But I want to keep "cygwin/bin" in my path.
I found it !
Removing "c:\cygwin64\bin" in the path.
Adding new php installation in path : "c:\php"
Adding new system variable : "CYGWIN_HOME", with value c:\cygwin64.
This way, using windows cmd, composer will use the php in the path ("c:\php").
And using cygwin, composer will use the php in "cygwin\bin" (because of the CYGWIN_HOME variable).