Mautic Community Forums

Console Command not working

I have Mautic v4.1.0 with PHP 7.4 and console commands are doing nothing. Also, I call -hep options and nothing happens.

Does anyone know how to deal with this?

This is a linux issue, not a Mautic issue. Did it work before? What is the exact command you try to execute?

I’m trying something like this and I’m not getting any response in the console.

php bin/console --help
php bin/console mautic:segments:update

Make sure this is the right php command.
Maybe you need php7.4 bin/console …
Are you in the mautic folder when you execute the command?

If I do the following command

php -v

Then I get

PHP 7.4.27 (cli) (built: Dec 30 2021 15:05:52) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with the ionCube PHP Loader + ionCube24 v10.4.5, Copyright (c) 2002-2020, by ionCube Ltd.

If I do that I get a command not found response.

Yes, I’m. When I don’t have the right path to console file I get something like this for example

Could not open input file: /home/llama/public_html/mautic/bin/consoe

In the bin/error_log file I’m seeing this now

[10-Jan-2022 20:01:02 UTC] PHP Fatal error:  Allowed memory size of 33554432 bytes exhausted (tried to allocate 20480 bytes) in /home/llama/public_html/mautic/app/bundles/UserBundle/Model/UserModel.php on line 390

I don’t know if this is related. But I have 256M memory_limit

@joeyk can you help me with this?

Well, this is more like a linux thing then Mautic, I’m not a Linux Genie.
However, you need to be sure, that you are editing the right php.ini file. You can see the ini in use in your Settings / System info in Mautic.
Also don’t forget to restart Apache / Nginx after you change the settings.

@joeyk What is the best config for php.ini?

This is what I have:

It is hard to give a good advice on this one. Which tutorial did you follow?
In mine I’m using 512M for memory usage.