# Cron Jobs Not Working, False PHP Warning?

**URL:** <https://forum.mautic.org/t/cron-jobs-not-working-false-php-warning/34680>\
**Category:** Product Support\
**Created:** [January 8, 2025, 10:56am UTC](https://forum.mautic.org/t/cron-jobs-not-working-false-php-warning/34680 "2025-01-08T10:56:49Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![malik](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/malik/32/433_2.png) [@malik](https://forum.mautic.org/u/malik)\
**Post date:** [January 8, 2025, 10:56am UTC](https://forum.mautic.org/t/cron-jobs-not-working-false-php-warning/34680/1 "2025-01-08T10:56:49Z")

</div>

**Your software**  
My Mautic version is:  
My PHP version is: 8.3.12  
My Database type and version is: 10.11.10-MariaDB

**Your problem**  
My problem is: Cron Jobs are set properly but not working.

These errors are showing in the log:

#1) When I try to run the Cron Job command from VPS terminal, it gives me the following error

PHP Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version “\>= 8.1.0”. You are running 8.0.30. in /home/marketic.co/hi/vendor/composer/platform\_check.php on line 24

_ **- \> But the Mautic System Info confirms the PHP Version 8.3.12** _

#2) Mautic Log file shows an error but it’s not related to Cron Jobs I guess, It was related to Inbox Monitoring setting (I have already fixed it).

I’m using CyberPanel on VPS

mautic.NOTICE: PHP Notice - PHP Request Shutdown: [CLOSED] IMAP connection broken (server response) (errflg=2) - in file Unknown - at line 0 {“hostname”:“[panel.DOMAIN.com](http://panel.DOMAIN.com)”,“pid”:142071}

Steps I have tried to fix the problem:

#1) Double-checked PHP version, it’s fine  
#2) Cron Job Codes are fine as well

Please suggest, thank you!

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [January 8, 2025, 1:04pm UTC](https://forum.mautic.org/t/cron-jobs-not-working-false-php-warning/34680/2 "2025-01-08T13:04:50Z")

</div>

What happens if you downgrade to 8.2?

---

<div class="post-metadata">

**Author:** ![malik](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/malik/32/433_2.png) [@malik](https://forum.mautic.org/u/malik)\
**Post date:** [January 9, 2025, 7:50am UTC](https://forum.mautic.org/t/cron-jobs-not-working-false-php-warning/34680/3 "2025-01-09T07:50:28Z")

</div>

Changed my PHP to 8.2 (and 8.1 as well), restarted PHP & VPS as well, still the same error

**Command Used:**

`/usr/bin/php /home/mautic-path/bin/console mautic:campaigns:trigger`

**Error:**

`Your Composer dependencies require a PHP version ">= 8.1.0". You are running 8.0.30.`

`PHP Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0". You are running 8.0.30. in /home/mautic-path/vendor/composer/platform_check.php on line 24`

The vHost Conf & Mautic System Info shows 8.3 as well: path /usr/local/lsws/lsphp83/bin/lsphp

Aany idea?

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [January 9, 2025, 11:15am UTC](https://forum.mautic.org/t/cron-jobs-not-working-false-php-warning/34680/4 "2025-01-09T11:15:10Z")

</div>

Cannot be the case, that you are using php-cli on old version?  
Or your web server doesn’t have the right fpm tied in?

---

<div class="post-metadata">

**Author:** ![marcus42](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@marcus42](https://forum.mautic.org/u/marcus42)\
**Post date:** [January 9, 2025, 1:19pm UTC](https://forum.mautic.org/t/cron-jobs-not-working-false-php-warning/34680/5 "2025-01-09T13:19:44Z")

</div>

CyberPanel is only a website that is meant to facilitate your life when it comes to website, ftp, ssh, dns and email management. It won’t do anything nor impact the web app in any way, shape or form. Same is true for shell scripting.

And you’re most likely using the wrong PHP version, as your logs are reporting.

Doubting me? No worries, all good!

As the saying goes: Don’t trust. Verify.

How to Verify?

1. Drop to the shell
2. Type the following  
`php --version`

What happened?  
You are most likely running a bourne again shell during your shell session.  
You are most likely running a LiteSpeed WebServer in hyper text.

In other words, you assumed that your web server was using the same binary that your shell. And from there refused to doubt yourself…

How to use the proper version?  
You’ll have to check the CyberPanel user manual (the end-user one. This isn’t requiring any kind of privilege).

_Good to know…_

- It’s possible to install and use multiple PHP version, at the same time.
- There’s a difference between the web interpreter and the CLI interpreter (PHP is an interpreter).
- Web server management GUI like Webmin, cPanel, DirectAdmin, CyberPanel, etc…, are often installing multiple PHP version.

Hope it helped

---

<div class="post-metadata">

**Author:** ![rafafabio](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/rafafabio/32/13364_2.png) [@rafafabio](https://forum.mautic.org/u/rafafabio)\
**Post date:** [January 9, 2025, 8:35pm UTC](https://forum.mautic.org/t/cron-jobs-not-working-false-php-warning/34680/6 "2025-01-09T20:35:33Z")

</div>

@joeyk I studied a post where you were talking about postal server and creating your own SMTP server, I created one, but I have a question, where could I buy IPs to rotate the IPs on the postal server?

---

<div class="post-metadata">

**Author:** ![marcus42](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@marcus42](https://forum.mautic.org/u/marcus42)\
**Post date:** [January 9, 2025, 11:26pm UTC](https://forum.mautic.org/t/cron-jobs-not-working-false-php-warning/34680/7 "2025-01-09T23:26:57Z")

</div>

Your ISP is the only one who can provide you an extra CIDR

---

<div class="post-metadata">

**Author:** ![malik](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/malik/32/433_2.png) [@malik](https://forum.mautic.org/u/malik)\
**Post date:** [January 10, 2025, 11:38am UTC](https://forum.mautic.org/t/cron-jobs-not-working-false-php-warning/34680/8 "2025-01-10T11:38:38Z")

</div>

Yes it helped, and I have managed to install & assign PHP 8.3 to my Mautic instance.

Thank you for your suggestions.

BUT the cron jobs are still not running, here is the top error I got after running command

> An exception occurred while establishing a connection to figure out your platform version.  
> You can circumvent this by setting a ‘server\_version’ configuration value
> 
> For further information have a look at:  
> [BC break between 1.6.7 -\> 1.6.8 regarding driver selection · Issue #673 · doctrine/DoctrineBundle · GitHub](https://github.com/doctrine/DoctrineBundle/issues/673)

In ExceptionConverter.php line 117:  
An exception occurred in the driver: could not find driver

In Exception.php line 28:  
could not find driver

In Driver.php line 33:  
could not find driver

And here is the Mautic Log

`

`[2025-01-10T11:34:03.071165+00:00] mautic.ERROR: Doctrine\DBAL\Exception: An exception occurred while establishing a connection to figure out your platform version. You can circumvent this by setting a 'server_version' configuration value For further information have a look at: https://github.com/doctrine/DoctrineBundle/issues/673 (uncaught exception) at /home/mautic-path/vendor/doctrine/doctrine-bundle/ConnectionFactory.php line 183 while running console command `UNKNOWN` [stack trace] #0 /home/mautic-path/vendor/doctrine/doctrine-bundle/ConnectionFactory.php(157): Doctrine\Bundle\DoctrineBundle\ConnectionFactory->getDatabasePlatform() #1 /home/mautic-path/var/cache/prod/ContainerXW3KIGl/AppKernelProdContainer.php(4966): Doctrine\Bundle\DoctrineBundle\ConnectionFactory->createConnection() #2 /home/mautic-path/var/cache/prod/ContainerXW3KIGl/AppKernelProdContainer.php(4976): ContainerXW3KIGl\AppKernelProdContainer->getDoctrine_Dbal_DefaultConnectionService() #3 /home/mautic-path/var/cache/prod/ContainerXW3KIGl/AppKernelProdContainer.php(7803): ContainerXW3KIGl\AppKernelProdContainer->getDoctrine_Orm_DefaultEntityManagerService() #4 /home/mautic-path/var/cache/prod/ContainerXW3KIGl/AppKernelProdContainer.php(3890): ContainerXW3KIGl\AppKernelProdContainer->getMautic_Helper_IpLookupService() #5 /home/mautic-path/var/cache/prod/ContainerXW3KIGl/AppKernelProdContainer.php(7297): ContainerXW3KIGl\AppKernelProdContainer->getEmailModelService() #6 /home/mautic-path/var/cache/prod/ContainerXW3KIGl/AppKernelProdContainer.php(9768): ContainerXW3KIGl\AppKernelProdContainer->getMautic_Email_Fixture_EmailService() #7 /home/mautic-path/var/cache/prod/ContainerXW3KIGl/getDoctrine_FixturesLoadCommandService.php(20): ContainerXW3KIGl\AppKernelProdContainer->getDoctrine_Fixtures_LoaderService() #8 /home/mautic-path/var/cache/prod/ContainerXW3KIGl/AppKernelProdContainer.php(2369): ContainerXW3KIGl\getDoctrine_FixturesLoadCommandService::do() #9 /home/mautic-path/vendor/symfony/dependency-injection/Container.php(428): ContainerXW3KIGl\AppKernelProdContainer->load() #10 /home/mautic-path/vendor/symfony/dependency-injection/Argument/ServiceLocator.php(42): Symfony\Component\DependencyInjection\Container->getService() #11 /home/mautic-path/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php(45): Symfony\Component\DependencyInjection\Argument\ServiceLocator->get() #12 /home/mautic-path/vendor/symfony/console/Application.php(596): Symfony\Component\Console\CommandLoader\ContainerCommandLoader->get() #13 /home/mautic-path/vendor/symfony/console/Application.php(792): Symfony\Component\Console\Application->has() #14 /home/mautic-path/vendor/symfony/framework-bundle/Console/Application.php(142): Symfony\Component\Console\Application->all() #15 /home/mautic-path/vendor/symfony/console/Application.php(609): Symfony\Bundle\FrameworkBundle\Console\Application->all() #16 /home/mautic-path/vendor/symfony/console/Application.php(633): Symfony\Component\Console\Application->getNamespaces() #17 /home/mautic-path/vendor/symfony/console/Application.php(701): Symfony\Component\Console\Application->findNamespace() #18 /home/mautic-path/vendor/symfony/framework-bundle/Console/Application.php(116): Symfony\Component\Console\Application->find() #19 /home/mautic-path/vendor/symfony/console/Application.php(259): Symfony\Bundle\FrameworkBundle\Console\Application->find() #20 /home/mautic-path/vendor/symfony/framework-bundle/Console/Application.php(82): Symfony\Component\Console\Application->doRun() #21 /home/mautic-path/vendor/symfony/console/Application.php(171): Symfony\Bundle\FrameworkBundle\Console\Application->doRun() #22 /home/mautic-path/bin/console(16): Symfony\Component\Console\Application->run() #23 {main} [] {"hostname":"panel.malikmerchant.com","pid":5976}`

`

---

<div class="post-metadata">

**Author:** ![marcus42](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@marcus42](https://forum.mautic.org/u/marcus42)\
**Post date:** [January 10, 2025, 11:59am UTC](https://forum.mautic.org/t/cron-jobs-not-working-false-php-warning/34680/9 "2025-01-10T11:59:10Z")

</div>

It look like PHP is missing some extensions.

Please run this cmd to see what is loaded:

```auto
php -r "print_r(get_loaded_extensions());"

```

From there, see if you have your MySQL extension.

---

<div class="post-metadata">

**Author:** ![malik](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/malik/32/433_2.png) [@malik](https://forum.mautic.org/u/malik)\
**Post date:** [January 10, 2025, 12:18pm UTC](https://forum.mautic.org/t/cron-jobs-not-working-false-php-warning/34680/10 "2025-01-10T12:18:22Z")

</div>

This is the outcome after running the command

Array  
(  
[0] =\> Core  
[1] =\> date  
[2] =\> libxml  
[3] =\> openssl  
[4] =\> pcre  
[5] =\> zlib  
[6] =\> filter  
[7] =\> hash  
[8] =\> json  
[9] =\> pcntl  
[10] =\> random  
[11] =\> readline  
[12] =\> Reflection  
[13] =\> SPL  
[14] =\> session  
[15] =\> standard  
[16] =\> sockets  
[17] =\> bz2  
[18] =\> calendar  
[19] =\> ctype  
[20] =\> curl  
[21] =\> dom  
[22] =\> mbstring  
[23] =\> fileinfo  
[24] =\> ftp  
[25] =\> gd  
[26] =\> gettext  
[27] =\> iconv  
[28] =\> exif  
[29] =\> PDO  
[30] =\> Phar  
[31] =\> SimpleXML  
[32] =\> sodium  
[33] =\> sqlite3  
[34] =\> tokenizer  
[35] =\> xml  
[36] =\> xmlwriter  
[37] =\> xsl  
[38] =\> pdo\_sqlite  
[39] =\> xmlreader  
[40] =\> zip  
[41] =\> Zend OPcache  
)

---

<div class="post-metadata">

**Author:** ![marcus42](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@marcus42](https://forum.mautic.org/u/marcus42)\
**Post date:** [January 10, 2025, 12:41pm UTC](https://forum.mautic.org/t/cron-jobs-not-working-false-php-warning/34680/11 "2025-01-10T12:41:34Z")

</div>

PDO (29) is loaded… But not PDO\_MYSQL

Make sure to load it and you’ll be good to go.

---

<div class="post-metadata">

**Author:** ![markus.hohl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/markus.hohl/32/13560_2.png) [@markus.hohl](https://forum.mautic.org/u/markus.hohl)\
**Post date:** [February 4, 2025, 9:15am UTC](https://forum.mautic.org/t/cron-jobs-not-working-false-php-warning/34680/12 "2025-02-04T09:15:54Z")

</div>

I had the error too. It probably depends a little on the hoster. Mine uses its standard version for the cronjobs that I can start with php commands (is currently still php 7…). If I write php81 instead of php in the php command, it uses version 8.1. The error is gone and the cron runs without problems.
