# Cron not working - server version not found

**URL:** <https://forum.mautic.org/t/cron-not-working-server-version-not-found/32030>\
**Category:** Mautic 4 Install/Upgrade Support\
**Created:** [May 10, 2024, 8:16am UTC](https://forum.mautic.org/t/cron-not-working-server-version-not-found/32030 "2024-05-10T08:16:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![yochay11](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/yochay11/32/7301_2.png) [@yochay11](https://forum.mautic.org/u/yochay11)\
**Post date:** [May 10, 2024, 8:16am UTC](https://forum.mautic.org/t/cron-not-working-server-version-not-found/32030/1 "2024-05-10T08:16:02Z")

</div>

**Your software**  
_My PHP version is_ : 8.0  
_My MySQL/MariaDB version is_ 10.11.7-MariaDB-1:10.11.7+maria~ubu2204-log

Hi, for some reason out of the blue i starting getting an error not allowing me to run crons on mautic.

I am getting this error related to server\_version but i was not able to find a solution.  
It seems like inside mautic the server\_version is set.

**Does anyone have an idea about what i can do?**

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>
>
> After upgrading from 1.6.7 to 1.6.8, all our tests started failing. While invest…igating, found that DBAL driver is somehow not picked up correctly.
> All functional tests failing with:
> \`\`\`
> Doctrine\\DBAL\\Exception\\DriverException: An exception occured in driver: could not find driver
> \`\`\`
> 
> It suddenly tries to load pdo\_mysql instead of pdo\_pgsql.
> 
> Bisected this breakage to commit 99a62a7c4139c0ccb6969de5eff1447b1a6cbaf4.
> 
> This is what our DBAL config looks like:
> \`\`\`
> doctrine:
> dbal:
> default\_connection: xxx
> connections:
> xxx:
> server\_version: 9.4
> driver: "%database\_driver%"
> host: "%database\_host%"
> port: "%database\_port%"
> dbname: "%database\_name%"
> user: "%database\_user%"
> password: "%database\_password%"
> charset: UTF8
> mapping\_types:
> bit: boolean
> tsvector: string
> types:
> foo:
> class: X\\Y\\Types\\FooType # \<-- commented type
> \`\`\`

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/5/5918c8db919acc3eedb01e6e31dc91320e96263f.png)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/7/773573a12d38a340b3485d2cbfda3e61b89d8f2c.png)

---

<div class="post-metadata">

**Author:** ![yochay11](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/yochay11/32/7301_2.png) [@yochay11](https://forum.mautic.org/u/yochay11)\
**Post date:** [May 10, 2024, 9:24am UTC](https://forum.mautic.org/t/cron-not-working-server-version-not-found/32030/2 "2024-05-10T09:24:36Z")

</div>

Seems like this is an hard one, I have tried to reinstall mautic on new domain on the server but i am getting the same error.

No idea on how to fix it so far, other than creating new server and do it all from start.

---

<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:** [May 10, 2024, 10:17am UTC](https://forum.mautic.org/t/cron-not-working-server-version-not-found/32030/3 "2024-05-10T10:17:51Z")

</div>

I didn’t dig on the overall issue. But there is one major problem that was overlooked in your report.

Stop using root (the # snitched on you, users are “$” while root is “#”) and you’ll save yourself from the vast majority of the problems reported on this forum.

(again) There is NULL reason to use root for any web app (make it WordPress, Mautic or any other web app)

With that said, could you share more info on your configuration (like the loaded PHP module).

---

<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:** [May 10, 2024, 1:50pm UTC](https://forum.mautic.org/t/cron-not-working-server-version-not-found/32030/4 "2024-05-10T13:50:53Z")

</div>

My money is on outdated files in your vendor folder.  
Are you using composer?

---

<div class="post-metadata">

**Author:** ![yochay11](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/yochay11/32/7301_2.png) [@yochay11](https://forum.mautic.org/u/yochay11)\
**Post date:** [May 10, 2024, 2:09pm UTC](https://forum.mautic.org/t/cron-not-working-server-version-not-found/32030/5 "2024-05-10T14:09:34Z")

</div>

HI, thanks for both reply.  
@marcus42 to be honest i am not even sure what “$” and “#” means.

I am not that techy with the servers world.

@joeyk I am using cyberpanel to run mautic and to be able to have access to everything. So i am not 100% sure if that mean i use composer but i do see it on the vendor folder.

I am not 100% what happen or way but it woked and just stopped and causing problems.

I have tried to restore the older version 2 weeks ago (database and files) while it worked and that doesn’t fixed the problem.

It is possible that it’s somehow related to different php for apache and for cli but i wasn’t able to solve things out.

As a last resort i am trying to create new server with new cyberpanel install and try moving the site for there hoping it will work it out.

But if someone has other idea i will be happy to hear about as it will be good to have a solution if that happen again.

---

<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:** [May 10, 2024, 3:20pm UTC](https://forum.mautic.org/t/cron-not-working-server-version-not-found/32030/6 "2024-05-10T15:20:40Z")

</div>

In a nix terminal, the “#” represent the root user while the “$” represent a regular user.

Under no circumstances root should be involved in managing a web app.

The main reason is when an app generate content (i.e. cache). When generated by root, the web user may not temper/delete those files - which will cause trouble (i.e. 500 errors).

And according to your screenshot, we can see the “#” in your prompt without doing a su. Meaning that you just ran the console as root as not the proper user.

Hope it will help

---

<div class="post-metadata">

**Author:** ![yochay11](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/yochay11/32/7301_2.png) [@yochay11](https://forum.mautic.org/u/yochay11)\
**Post date:** [May 10, 2024, 3:38pm UTC](https://forum.mautic.org/t/cron-not-working-server-version-not-found/32030/7 "2024-05-10T15:38:23Z")

</div>

Thank you, appreciate the explanation (-:

Ok just an update for other that will face similar problem.  
I wasn’t abel to fix it yet but i have created new account and installed new cyberpanel and i was able to make the system work there.

It seems like the main different was that on terminal the php version was 8.1 (when running **php -v** ) and on the new install it was 8.0 while i am using mautic 4.

I have no idea why the cli version of php changed to 8.1 and while i was trying to use chatGPT to change it back to 8.0 is seems like even while i was able to do that it cause other problems and i wasn’t able to fix it.

I will keep the other server online for few days as a learning curve.  
If anyone has an idea of what can be done to fix that that would be great (i am really good with wordpress but i am far from being expert on terminal and server management)

Thanks again for this great comuunity

---

<div class="post-metadata">

**Author:** ![vishnumohan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/vishnumohan/32/1414_2.png) [@vishnumohan](https://forum.mautic.org/u/vishnumohan)\
**Post date:** [December 12, 2024, 3:07pm UTC](https://forum.mautic.org/t/cron-not-working-server-version-not-found/32030/8 "2024-12-12T15:07:50Z")

</div>

I fixed the issue installing PHP8.1 and disabling PHP8.0

sudo apt update  
sudo apt install php8.1 php8.1-cli php8.1-fpm php8.1-common php8.1-curl php8.1-mbstring php8.1-xml php8.1-mysql php8.1-zip -y  
sudo update-alternatives --set php /usr/bin/php8.1  
sudo systemctl disable php8.0-fpm  
sudo systemctl enable php8.1-fpm  
sudo systemctl start php8.1-fpm

and then it worked perfectly
