Problem with CronJob

no one can offer a simple solution to this command.

PHP Warning: Module “mcrypt” is already loaded in Unknown on line 0
PHP Fatal error: Uncaught Error: Call to undefined function curl_init() in /home/componente-fotovoltaice/public_html/admin/controller/module/universal_import.php:2003
Stack trace:

fora start you need to install the php curl module, to remove this error … but you may find that this leads to another error. It appears you have installed PHP yourself and have missed some modules

We’ve told you to install the PHP curl module. You didn’t tell us your OS, so we can’t tell you exactly how, but it’s in the standard OS repositories for all supported operating systems, so it is very easy to install.

it’s Ubuntu 22.04 I guess

Ah, it wasn’t in the field we provide for the OS.

apt install php-curl

Unless you have installed other PHP versions (but if you followed our documentation for doing that, you would already have the curl module for that version).

Hello.

Please tell me how I will have to put another command in cron to peel a link. www.domain/poze/poz.php

You’ve lost me but ipen a terminal as root user and type the comaand @Joe supplied. Then retry your original cron job. The error is not the cron job the error is missing parts of php that you need for the original cron job to run

How do you peel a link ? Not come across this term

Ok, if I install all the additional modules to PHP, surely the CRON command will work?

I think it is like peeling a lemon. :man_shrugging:

you would think that by asking for advice anyone would take it and use it, and possibly understand it. instead the question just keeps changing.
:artificial_satellite:

As I am not native English … I thought it may be some obscure English coin of phrase

It will certainly continue to fail without them.

I think the only module missing is cron and @Joe gave you the command to install it.

Do that then let us know if it didn’t solve the problem. as @jimr1 has said it could be with the way it is being called.

I asked for important screenshots earlier and they would help. - please use the attach image in the post Screenshot 2023-12-23 133653


I attached the pictures above, why doesn’t that cron command work?

It is now clear from second image that you now have cron listed as a known module → good.

However the first image is showing a stack trace through the php code you are executing as a cron job.
It is even pointing you the error! I guess you are trying to run a SQL command on the database. What database - does it even exist - have you permission - does the code even work.


I solved it with sql, now I get this error.

@jimr1 answered this in #10. you have PHP module mcrypt installed but somewhere in anphp.ini you are calling extension=mcrypt.so

the .so stands for “Sodium” which is libsodium IIRC and are not the same.

I solved everything with CRON. The next question would be if on virtualmin we have the possibility to set the date until which the domain will be active?

That is Great News :clap:

Please start a new topic for new questions or it gets confusing. New topics can bring new people in to the knowledge base to answer a problem. Most see a topic solved as ahem “Solved” :):

1 Like

.so stands for “shared object”, it is the standard filename extension for shared libraries in Linux. (Try ls /usr/lib or ls /usr/lib64 to see what I mean.)

libsodium is not mcrypt, but it is a more modern implementation of some of the same types of functions found in mcrypt. e.g. it can be used for password hashing, signatures, etc. But, I see no evidence OP needs libsodium. (But if they did, it’d show up as a failure to load libsodium.so or similar.)