Questions tagged [cli]

Denotes questions related to CLI which is a short form of Command-Line Interface

Filter by
Sorted by
Tagged with
0
votes
0answers
17 views

Magento 2 Missing required argument $areaCode of Magento\Framework\App\Area

I'm using CLI to execute a custom module, that generate a custom sales report. It has been working nicely, but it suddenly failed with the error Missing required argument $areaCode of Magento\...
1
vote
1answer
16 views

Cannot save custom product attribute via custom console command

I am trying to update a custom product attribute via a custom console command. The command runs, and the product seemingly saves; it never throws an exception or any form of error, yet the attribute ...
0
votes
2answers
14 views

How to stop db.log in magento 2.3

How to stop the DB log i had used the CLI to stop but it is not stopping it increasing to huge file. I used the below command but it is not stopping. It is in the path var/debug/db.log bin/magento ...
0
votes
1answer
20 views

Why I'm not receiving any output from the Magento CLI?

When I run bin/magento in my server I'm not receiving any output, so I'm not able to see any possible issue. How could I solve it?
0
votes
1answer
34 views

Magento2 - Cannot Resize Images due to error message In CLI

I'm currently trying to run the image resize command in the CLI for Magento2.3.2 but it keeps coming up with the following error as soon as I run the command: mysite@dx1287:~/httpdocs$ php bin/...
1
vote
1answer
56 views

catalog:images:resize not working in CLI in 2.3.4

We just upgraded our dev site from 2.3.3 to 2.3.4 and I'm trying to run the bin/magento catalog:images:resize command in CLI in hopes that it will fix some image styling issues I'm trying to resolve (...
0
votes
0answers
25 views

Could not open input file: bin/magneto error after every command in magent2.3.3

I have freshly installed magento 2.3.3 but when i am trying to run indexer or any other command i am getting following errors. Could not open input file: bin/magneto I have tried so many commands ...
0
votes
1answer
49 views

Allowed memory size of 2097152 bytes exhausted (tried to allocate 8192 bytes) i

I am getting error while running the cli commands, I increased the memory_limit to 5G
0
votes
1answer
37 views

Unable to unserialize value. Error: Syntax error after upgrade 2.2.8 to 2.3.2

After the update process using the Composer has finished I am getting an Unable to unserialize value. Error: Syntax error error with any CLI command I try running (like upgrade or cache flush). I ...
1
vote
0answers
39 views

bin/magento inventory:reservation:list-inconsistencie | PHP Fatal error: Uncaught TypeError: Argument 1 passed to

I am getting this error when running bin/magento inventory:reservation:list-inconsistencie: PHP Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Inventory\Model\ResourceModel\...
0
votes
1answer
77 views

Magento 2 : how can we use of setup:db-schema:upgrade?

Can we add or update the database schema and if yes, so can anyone give example?
0
votes
0answers
32 views

Magento 2 : use of setup:db-data:upgrade?

I have some doubt for this command "setup:db-data:upgrade". How can we use this command? Can we add or update the database filed and if yes, so can anyone give example?
0
votes
1answer
23 views

When trying to upgrade I encounter the error “Cannot process definition to array for type time”

I'm getting the following error on Magento 2.3.2 when executing command: php bin/magento setup:upgrade Cannot process definition to array for type time I'm aware that this is usually caused by a ...
0
votes
1answer
25 views

Proper User for Ubuntu Nginx PHP-FPM when running php bin/magento and composer Command Line

So on the setup mentioned in the title, I want to confirm how the user should be for command line. Using the default setup there is a user "nginx" that is used for php-fpm and for nginx. Should that ...
2
votes
0answers
46 views

How do I execute Magento 2 CLI commands using a custom script?

I had created a custom script which update my database. After completion of database update, I want to execute the Magento CLI commands by adding custom functions in my custom script. The script ...
0
votes
0answers
68 views

How to export products using commandline

How to export product along with all attributes & images/video using commandline?
0
votes
1answer
30 views

Magento 2: CLI command is taking too much time to execute

I have installed the docker and my Magento project deployed on docker, the issue is CLI command is taking too much time to execute.
0
votes
1answer
64 views

“catalog:images:resize” on multistore, run on specific store only?

Surely this is possible Magento...💩 I have searched the internet for a while and read the docs here and here. I have a multistore setup. One of the stores has billions of products. One of the ...
1
vote
1answer
72 views

Create new customer using CLI like admin

There is the way to create admin user using CLI php bin/magento admin:user:create. Is there the same way to create the new customer for front-end access ?
0
votes
1answer
202 views

Magento cloud ssh denied for db:dump

I need to install an existing Magento Cloud project locally using cli but facing issues with database dump. Indeed here's the error I get : Hello xxxxxxx (UUID: xxxxxxx), you successfully connected,...
0
votes
1answer
403 views

CLI command to change env.php 'downloadable_domains'

Is there a CLI or rest interface that can modify the downloadable_domains section in env.php, or do I have to just manually run a sed or awk on the file during my deployment process Thanks (BTW, ...
1
vote
2answers
105 views

Magento 2 I want to run below command line for every minutes

I'm using Magento 2.3, Here when create bulk action from product grid schedule not started and updated. I got solution for the above issue when I run this command above issue fixed. So I want to run ...
0
votes
1answer
147 views

Fatal error: Uncaught Error: Class 'Cli' not found in bin\magento:30

I wanted to install a new extension in my store and I keep on getting this error in CLI. An exception was raised while creating "Application"; no instance returned#0 Sites\XXXXX\vendor\zendframework\...
0
votes
3answers
109 views

upgrading magento project from Magento 2.1.12 CE to Magento 2.3.2 CE setup:upgrade doesnt work

Dear Magento developers, I am trying to to upgrade Magento 2.1.12 CE To Magento 2.3.2 CE I followed official dev docs instructions https://devdocs.magento.com/guides/v2.3/comp-mgr/cli/cli-upgrade....
1
vote
1answer
272 views

Magerun not recognized on command line

I am unable to run magerun from the CLI on one of my Commerce cloud sites. How do I fix? here is the error: var/magerun db:dump --compression="gzip" ./var/mg_integration_before_sync.sql.gz PHP ...
0
votes
1answer
163 views

Magento 2.3.1 Product EAV index throws error with GTID consistency

when I run reindex Command After Below type error showing SQLSTATE[HY000]: General error: 1787 Statement violates GTID consistency: CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can only be ...
0
votes
0answers
211 views

Fatal error: Uncaught Error: Call to undefined function Magento\Framework\Event\mb_strtolower() in magento 2

when i run cli commends I'm getting error Fatal error: Uncaught Error: Call to undefined function Magento\Framework\Event\mb_strtolower() in /home/project/public_html/vendor/magento/framework/...
0
votes
0answers
164 views

Magento 2.3 - Fixing “Cannot redeclare __()” error

Getting error PHP Fatal error: Cannot redeclare () (previously declared in /vendor/magento/framework/Phrase/.php:15) in app/functions.php on line 22 This error is coming while running ...
1
vote
2answers
238 views

Magento 2 - Area code not set when running script via command line CLI

I have created module for exporting my product data to script outside of Magento2. This is my Data.php <?php namespace Oktarin\Nabavanet\Helper; class Data extends \Magento\Framework\App\Helper\...
1
vote
0answers
167 views

magento dev:urn-catalog:generate command fails to detect secret file

I'm running the following command "magento dev:urn-catalog:generate .idea/misc.xml " to use the functionality of Magento 2 to automatically resolve all my URN's so PhpStorm will stop giving me ...
3
votes
0answers
41 views

Fatal Error in Magento Command Line

Trying to do a module check from the command line gets me a Fatal Error. I'm using XAMPP to run Magento 2.3
0
votes
2answers
176 views

Set production mode magento 2.3

I want to switch to production mode but I can not find information about the exact commands that I have to use. I know that I must use this command: php bin/magento deploy:mode:set production But, ...
1
vote
1answer
421 views

Magento 2 - Import Product .csv via CLI

Actually, the desired requirement is quite simple. I would like to control and execute the import from the backend of the Magento 2 system via the CLI. This question was asked some time ago (2016) ...
2
votes
2answers
69 views

Installing extension via Composer

I have tried to install the extension via Composer and successfully installed. After installing, I can see the extension menu in the admin panel. However, I can't see any files in the app/code ...
2
votes
2answers
36 views

While trying to Reindexing through the command prompt generate error

Command I used : php bin/magento indexer:reindex
2
votes
1answer
348 views

How to run command CLI in Magento 2

I'm facing the same problem as MagentoProblem this link. It is about messy frontend and backend of Magento 2. This happened after i set https://(My_Domain_Name).com into Configuration > Web > Base ...
1
vote
1answer
42 views

Magento\Catalog\Helper\Image returns unsecure product image url in custom CLI command

I am using Magento's image helper class to try to get a product's image url in a CLI command: $this->image->init($product, 'product_page_main_image_default')->getUrl(). When I use this code ...
3
votes
2answers
389 views

Magento 2 - Custom shell command not working

I want to execute some code using custom command like: php bin/magento mycommand:dothis To enable this command I have added this code in di.xml <type name="Magento\Framework\Console\CommandList"&...
1
vote
0answers
78 views

Upgrade from Magento 2.2.6 to 2.3.1 CLI Command Error

When upgrading from Magento CE 2.2.6 to Magento CE 2.3.1, I am following the command line upgrade as explained here. All was well and the commands ran just as they should have until I ran the ...
1
vote
0answers
107 views

Magento 2.3: How to configure magento CLI commands to use custom names for dangerous redis commands

Environment OS: Ubuntu 18.04 LTS Server: Apache 2.4 Database: MySQL v14.14 distribution 5.7.25 PHP: 7.2 Redis: 5.0.4 Issue Following the digitalocean tutorial referenced ...
0
votes
1answer
100 views

Magento 2 circular dependancy error on upgrade

I'm currently running a website on Magento 2.2.7 When we add any new module and run the php bin/magento setup:upgrade command the admin panel immediately stops working and gives us an error beginning ...
2
votes
1answer
30 views

Magento 2 : How can we identify phpexecutable or not?

I'm working on creating custom console in which i have to add code that will check php is executable using below class. If PHP executable then which PHP version is executable. SyncCommand.php ...
1
vote
2answers
210 views

Command line user does not have read and write permissions on generated directory. Please address this issue before using Magento command line

My Magento site is down and I see main.CRITICAL: Cannot write to the "/var/www/html/var/debug/db.log" file. Unable to write {"exception":"[object] (Magento\Framework\Exception\...
1
vote
2answers
165 views

Magento 2 - Syntax error on bin/magento support:backup:db

I am trying to get backup of DB using following command php -dmemory_limit=1G bin/magento support:backup:db It is giving me syntax error: sh: 2: Syntax error: word unexpected (expecting ")") Error: ...
0
votes
2answers
103 views

Area Code not set, caused by programatically creating shipment

While creating a module, the following error occurs after creating a custom cli command: Area code not set: Area code must be set before starting a session. I have already stated the area code in ...
2
votes
1answer
95 views

Getting a CLI error when trying to compile

I am getting this error on terminal: PHP Fatal error: Class 'Cli' not found in /opt/bitnami/apache2/htdocs/bin/magento on line 31 when trying to run these commands: sudo php bin/magento setup:...
1
vote
0answers
17 views

Magento2 2.3 Update Error Requirements not satisfied

When i try to run "composer update" i am getting following errors. PHP 7.1.20 Your requirements could not be resolved to an installable set of packages. Problem 1 - Installation request for ...
3
votes
1answer
438 views

Magento 2.2.5 After Upgrade To 2.3 CLI commands don't work

I upgraded magento version by documentation, after upgrade this happens: When running php bin/magento cache:flush or any other bin/magento command error appears There are no commands defined in the "...
2
votes
1answer
120 views

How I can solve the di:compile error in Magento 2?

When I run setup:di:compile I got error Errors during compilation: Vendor\CustomRegistration\Model\Customer\DataProvider Incompatible argument type: Required type: bool. Actual type: \Vendor\...
0
votes
1answer
28 views

Error related to Framework in Magento 2 SSH CLI

I'm currently running a Magento 2 (2.2.7) site and I've been getting the following error in the CLI when I enter certain commands (usually to do with enabling/disabling modules). The directory "/...

1
2 3 4 5