# Mautic 3 - Pretty Fresh Install - Won't run bin/console commands

**URL:** <https://forum.mautic.org/t/mautic-3-pretty-fresh-install-wont-run-bin-console-commands/17392>\
**Category:** Mautic 3 - Install/Upgrade Support\
**Created:** [December 13, 2020, 11:17pm UTC](https://forum.mautic.org/t/mautic-3-pretty-fresh-install-wont-run-bin-console-commands/17392 "2020-12-13T23:17:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mita.michael](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mita.michael/32/4846_2.png) [@mita.michael](https://forum.mautic.org/u/mita.michael)\
**Post date:** [December 13, 2020, 11:17pm UTC](https://forum.mautic.org/t/mautic-3-pretty-fresh-install-wont-run-bin-console-commands/17392/1 "2020-12-13T23:17:06Z")

</div>

**Your software** Digital Ocean Droplet Apache2/ubuntu 20.04  
_My PHP version is_ : 7.3  
_My MySQL/MariaDB version is_ (delete as applicable): MariaDB version 5.7

**Updating/Installing Errors**  
_I am_ (delete as applicable): Updating  
_Upgrading/installing via_ (delete as applicable) : Command Line

_These errors are showing in the installer_ :

When I tried to install the update:  
`PHP Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in /var/www/html/vendor/composer/autoload_static.php on line 4461`

After I Installed the update (through web) and tried to run bin/console commands:

```
In AbstractMySQLDriver.php line 106: 
An exception occurred in driver: could not find driver

In PDOConnection.php line 31:
could not find driver

In PDOConnection.php line 27:
could not find driver

 // Clearing the cache for the prod environment with debug false                                                        

In XmlUtils.php line 50:
                              
  Extension DOM is required.  

```

_These errors are showing in the Mautic log (one of the errors others are also about DriverExceptionAbstractMySQLDriver.php)_ :

```
mautic.NOTICE: Doctrine\DBAL\Exception\DriverException: An exception occurred in driver: could not find driver (uncaught exception) at /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 106 while running console command `mautic:campaigns:rebuild` [] []
[2020-12-13 16:36:01] mautic.WARNING: Command `mautic:campaigns:rebuild` exited with status code 1 [] []

```

_These errors are showing in the upgrade\_log.txt file (located in the root of your Mautic instance when an upgrade has been attempted - ensure you remove or redact any sensitive data such as domain names in the file path)_ :

No upgrade-log.txt

**Your problem**  
_My problem is_ :

Can’t execute commands without an error from console

_Steps I have tried to fix the problem_ :

Hi and thank you for mautic. I am pretty new to unix and so might have overlooked something but I do try and google/forum hard in search for an answer

It’s a fresh install

Initially I run into

> PHP Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in /var/www/html/vendor/composer/autoload\_static.php on line 4461

Even though I had setup the` apache2/php.ini` to 512MB before mautic was installed I changed it to 1024MB just to be safe, and I also changed the php.ini for the php7.3/cli for whatever reason. I also saw some recommendations for `maximum_execution_time = 600` to be greater than 240 which was also modified.

I could only clean my cache manually with `rm -R /var/cache/*` and I did that at every opportunity.

Alas, It did not make any difference.

I then managed to upgrade from 3.1.2 → 3.2. via the web environment, thats when I assumed the error disappeared. When I tried to run some commands ( cron wasn’t working) I realised the `PHP fatal error` was still there. Again I cleaned the cache with `rm -R /var/cache/*` but this time got the new set of errors about drivers (shown above) after reboot. I also installed `composer` globally and then tried to `composer install ` in the mautic root folder (suggested in one of the threads) but then it didn’t execute obviously cause I don’t know how the composer works. So I yeah I am kind stuck. Nothing…

I am just thinking it be quicker to reinstall on a fresh droplet

---

<div class="post-metadata">

**Author:** ![vgpastor](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/vgpastor/32/4089_2.png) [@vgpastor](https://forum.mautic.org/u/vgpastor)\
**Post date:** [December 16, 2020, 10:26am UTC](https://forum.mautic.org/t/mautic-3-pretty-fresh-install-wont-run-bin-console-commands/17392/2 "2020-12-16T10:26:18Z")

</div>

Hi  
The commands are executed directly from php so you need to update params of memory in /etc/php7.3/php.ini , apache2/php.ini only affect to php that execute inside apache2 environment.

The driver you need to isntall it’s mysql PDO you can use “sudo apt-get install php-mysql” or sudo apt-get install php7.3-mysql

Regards!

---

<div class="post-metadata">

**Author:** ![mita.michael](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mita.michael/32/4846_2.png) [@mita.michael](https://forum.mautic.org/u/mita.michael)\
**Post date:** [December 16, 2020, 3:05pm UTC](https://forum.mautic.org/t/mautic-3-pretty-fresh-install-wont-run-bin-console-commands/17392/3 "2020-12-16T15:05:35Z")

</div>

Hiya,

Thanks for your suggestions, yeah I mentioned I’ve done all that.

Anyway, my friend an I figured out what it was, somehow some components of php7.4 were installed and that was causing all the problems above. I don’t know how that happened under the radar. After I purged the all versions of php and reinstalled it worked. I had to reapply a2enmod rewrite ,permissions again as the php pages werent accessible past the login screen.

Thanks
