Cron is not working due to LazyCollection

Your software
My Mautic version is: v3.3.1
My PHP version is: PHP Version 7.3.27
My Database type and version is: MariaDB 10.1

Your problem
My problem is: I try to execute the cron, but it’s not working.

These errors are showing in the log:
PHP Warning: Class ‘Tightenco\Collect\Support\LazyCollection’ not found in /home/mauticautenticonuevayork/www/vendor/tightenco/collect/src/Collect/Support/alias.php on line 19
PHP Parse error: syntax error, unexpected ‘=’ in /home/mauticautenticonuevayork/www/vendor/tightenco/collect/src/Collect/Support/LazyCollection.php on line 611

Steps I have tried to fix the problem: I read some topics related but they said that it’s necessary an updated version of the PHP and I have tried with 7.3 and 7.4. It’s a new installation on a dedicated external server.
Is there any other possible place to look?
Thanks a lot!

I have changed the database to MySQL 5.7 and PHP to 7.4.16
Apache error:
PHP Warning: Class ‘Tightenco\Collect\Support\LazyCollection’ not found in /home/mauticautenticonuevayork/www/vendor/tightenco/collect/src/Collect/Support/alias.php on line 19
PHP Parse error: syntax error, unexpected ‘=’ in /home/mauticautenticonuevayork/www/vendor/tightenco/collect/src/Collect/Support/LazyCollection.php on line 611

Hi @rcheesley and @joeyk
This is the updated thread with the problem. I wasn’t able to solve it yet.

Thanks,
Pedro.

I tried to install a fresh Mautic following all the steps with https and the result has been the same:

PHP Warning: Class ‘Tightenco\Collect\Support\LazyCollection’ not found in /home/mauticebvconsulting/www/vendor/tightenco/collect/src/Collect/Support/alias.php on line 19
PHP Parse error: syntax error, unexpected ‘=’ in /home/mauticebvconsulting/www/vendor/tightenco/collect/src/Collect/Support/LazyCollection.php on line 611

Have you seen this thread?

Are you 100% sure you have 7.3+ running?

1 Like

Hi @joeyk

I read the post and I tried to find references of the PHP version in my htaccess. I also run the command -v.

Captura de pantalla 2021-03-26 a las 16.13.13

In my hosting is also running with PHP 7.4.16:

Captura de pantalla 2021-03-26 a las 16.22.48

Where can I find this htaccess PHP option?