In my Magento application when I try to enable logging in command line using below code
# bin/magento setup:config:set –enable-debug-logging=true
I am getting the error
PHP Fatal error: Declaration of Magenest\SagePay\Helper\Logger::debug($message, array $context = []) must be compatible with Monolog\Logger::debug($message, array $context = []): void in /vendor/magenest/module-sage-pay-basic/Helper/Logger.php on line 49
Related
How to solve in laravel an vuejs, when I am trying to refresh the page I got such error message, this is my code from web file :
preg_match(): Compilation failed: invalid range in character class at offset 20
This is my Route:
I ma using laravel 8 php 7.4
Route::get('{path}',"HomeController#index")->where( 'path', '([A-z\d-\/_.]+)?' );
Route::get('{path}',"HomeController#index")->where('path','[-a-z0-9_\s]+');
For php version is 7.3 and above use \- instead of -, so your final code :
Route::get('{path}',"HomeController#index")->where( 'path', '([A\-z\d\-\/_.]+)?' );
Route::get('{path}',"HomeController#index")->where('path','[\-a\-z0\-9_\s]+');
I've installed laravel livewire on a Laravel 8 project, ad when i run the command php artisan make:livewire table the terminal shows this error:
ArgumentCountError
Too few arguments to function Illuminate\Support\Str::finish(), 1 passed in /Applications/MAMP/htdocs/cuoreLaravel/vendor/livewire/livewire/src/helpers.php on line 12 and exactly 2 expected
at vendor/laravel/framework/src/Illuminate/Support/Str.php:235
231▕ * #param string $value
232▕ * #param string $cap
233▕ * #return string
234▕ */
➜ 235▕ public static function finish($value, $cap)
236▕ {
237▕ $quoted = preg_quote($cap, '/');
238▕
239▕ return preg_replace('/(?:'.$quoted.')+$/u', '', $value).$cap;
+17 vendor frames
18 artisan:37
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
I've followed all the documentation installation steps, but I don't understand what the problem is.
I hope someone can help me :-) thanks
This happened to me after a fresh install of Livewire. Running php artisan optimize fixed it in my case. I have not found the exact reason, but I suspect some of the Livewire config needed to be included in the config cache first.
So either optimize, or clear the cached config completely.
I need some help in understanding the following things,
I am using composer for elasticsearch php integration. I have created a html page to post form data into elasticsearch. I am trying to access the html page from another pc by changing the localhost ip to the system ip where i have hosted the html page. But i'm getting error.
Fatal error: Uncaught Elasticsearch\Common\Exceptions\NoNodesAvailableException: No alive nodes found in your cluster in C:\xampp\htdocs\Client_portal\vendor\elasticsearch\elasticsearch\src\Elasticsearch\ConnectionPool\StaticNoPingConnectionPool.php:50 Stack trace: #0 C:\xampp\htdocs\Client_portal\vendor\elasticsearch\elasticsearch\src\Elasticsearch\Transport.php(77): Elasticsearch\ConnectionPool\StaticNoPingConnectionPool->nextConnection() #1 C:\xampp\htdocs\Client_portal\vendor\elasticsearch\elasticsearch\src\Elasticsearch\Transport.php(94): Elasticsearch\Transport->getConnection() #2 C:\xampp\htdocs\Client_portal\vendor\elasticsearch\elasticsearch\src\Elasticsearch\Connections\Connection.php(269): Elasticsearch\Transport->performRequest('POST', '/sib_api/_doc', Array, '{"requestid":"#...', Array) #3 C:\xampp\htdocs\Client_portal\vendor\react\promise\src\FulfilledPromise.php(25): Elasticsearch\Connections\Connection->Elasticsearch\Connections{closure}(Array) #4 C:\xampp\htdocs\Client_portal\vendor\guzzlehttp\ringphp\sr in C:\xampp\htdocs\Client_portal\vendor\elasticsearch\elasticsearch\src\Elasticsearch\ConnectionPool\StaticNoPingConnectionPool.php on line 50
To resolve the above issue i tried to call the autoload.php file using the complete path (i.e) http://localhost:8080/client_portal/vendor/autoload.php
But now I am getting another error
Fatal error: Uncaught Error: Class 'Elasticsearch\ClientBuilder' not found in C:\xampp\htdocs\Client_portal\Elastic_api.php:19 Stack trace: #0 {main} thrown in C:\xampp\htdocs\Client_portal\Elastic_api.php on line 19
Could someone help me to resolve this issue... and also guide me how to access my html page from another system without any isssues.
<?php
session_start();
$Engagement = $_SESSION["Engagement"];
$Application = $_SESSION["Application"];
$Priority = $_SESSION["Priority"];
$Requestid = $_SESSION["Requestid"];
$_SESSION["URL"] = $_POST['url'];
$_SESSION["REQ"] = $_POST['request'];
$_SESSION["RES"] = $_POST['response'];
$_SESSION["yn"] = $_POST['YN'];
$_SESSION["START"] = $_POST['start'];
$_SESSION["END"] = $_POST['end'];
if (isset($_POST['Submit2']))
{
require 'http://localhost:8080/client_portal/vendor/autoload.php';
$client = Elasticsearch\ClientBuilder::create()->build();
// the above line is where i'm getting the error...
page show this error in codeigniter project but log file not generate error
its me first experience with logging function
so i do not know how to generate error
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: bottomstatus
Filename: views/template.php
Line Number: 65
Backtrace:
File: D:\xampp\htdocs\timehubzone\application\views\template.php
Line: 65
Function: _error_handler
codeigniter error status
$config['log_threshold'] = 1;
$config['log_path'] = '';
$config['log_file_extension'] = '';
In order to get notices logged too - you've to increase your threshold value
Instead of
$config['log_threshold'] = 1;
you simply have to change that to
$config['log_threshold'] = 2;
Be aware, this isn't useful for production environments - because your log file will get to big. You will find more information at the Codeigniter Documentation and at this SO post answered by Narf: CodeIgniter 3 - configuring log_threshold
When attempting to import a csv product file into magento it keeps staying at "please wait". After using firebug I found I was getting this error:
Fatal error: Call to a member function prepareAttributesForSave() on a non-object in /magento/app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php on line 1259
Here's line 1259 in product.php:
$rowData = $this->_productTypeModels[$productType]->prepareAttributesForSave($rowData);
$product = Mage::getModel('importexport/import_proxy_product', $rowData);
I am a complete newbie to PHP and am not sure how to fix this. I tried searching google, but didn't find anything related to this specific function.