Author Topic: cronjop problem  (Read 2647 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
cronjop problem
« on: June 03, 2023, 10:47:51 AM »
Hello, I have tried all the possible options below, but unfortunately, I couldn't get cronjob to work. What should I do?
php -q /home/uzman/public_html/coremio/cronjobs.php
/usr/local/bin/php -q /home/uzman/public_html/coremio/cronjobs.php
/usr/local/bin/php-fpm8.1 -q /home/uzman/public_html/coremio/cronjobs.php
/usr/local/bin/php/fpm -q /home/uzman/public_html/coremio/cronjobs.php
/home/uzman/public_html/coremio/cronjobs.php

Offline
*****
Re: cronjop problem
« Reply #1 on: June 03, 2023, 10:53:46 PM »
Need more info about what your configuration is like and what you are trying to accomplish...

Offline
*
Re: cronjop problem
« Reply #2 on: June 04, 2023, 09:13:57 PM »
I'm trying to add a cron job, what information do you need?

Offline
*****
Re: cronjop problem
« Reply #3 on: June 05, 2023, 04:17:22 AM »
I'm still not sure what you're trying to accomplish -- are you adding a CMS PHP file (cronjobs.php) that should run periodically/daily? What is your normal PHP version?

Offline
**
Re: cronjop problem
« Reply #4 on: June 06, 2023, 12:53:56 PM »
Why do you think your cron task doesn't work ? Do you get some errors or what ?

What does happen when you run:

Code: [Select]
php -q /home/uzman/public_html/coremio/cronjobs.php
/usr/local/bin/php -q /home/uzman/public_html/coremio/cronjobs.php

from shell (ssh) ?

Offline
*****
Re: cronjop problem
« Reply #5 on: June 06, 2023, 02:17:58 PM »
Note that running just "php" from a shell session will likely run it under the default CWP php 7.2 version with its modules and environment. You would likely want to run your cronjobs.php via whatever is your default PHP version. So if you are running 8.0 under php-fpm, then it would be:
Code: [Select]
/opt/alt/php-fpm81/usr/bin/php -q /home/uzman/public_html/coremio/cronjobs.php

Offline
*
Re: cronjop problem
« Reply #6 on: June 07, 2023, 06:14:57 PM »
[root@server ~]# php -q /home/uzman/public_html/coremio/cronjobs.php
Failed loading /usr/local/ioncube/ioncube_loader_lin_8.1.so:  /usr/local/ioncube/ioncube_loader_lin_8.1.so: undefined symbol: file_globals
Failed loading /usr/local/sourceguardian/ixed.8.1.lin:  /usr/local/sourceguardian/ixed.8.1.lin: undefined symbol: compiler_globals

Script error: the ionCube Loader for PHP needs to be installed.

The ionCube Loader is the industry standard PHP extension for running protected PHP code,
and can usually be added easily to a PHP installation.

For Loaders please visit:

https://get-loader.ioncube.com

For an instructional video please see:

http://ioncu.be/LV



[root@server ~]# /usr/local/bin/php -q /home/uzman/public_html/coremio/cronjobs.php
Failed loading /usr/local/ioncube/ioncube_loader_lin_8.1.so:  /usr/local/ioncube/ioncube_loader_lin_8.1.so: undefined symbol: file_globals
Failed loading /usr/local/sourceguardian/ixed.8.1.lin:  /usr/local/sourceguardian/ixed.8.1.lin: undefined symbol: compiler_globals

Script error: the ionCube Loader for PHP needs to be installed.

The ionCube Loader is the industry standard PHP extension for running protected PHP code,
and can usually be added easily to a PHP installation.

For Loaders please visit:

https://get-loader.ioncube.com

For an instructional video please see:

http://ioncu.be/LV

The error message I received, thank you.





Offline
**
Re: cronjop problem
« Reply #7 on: June 07, 2023, 06:25:57 PM »
Make sure you run the script properly. In some cases scripts must be called over web using wget or curl e.g:
Code: [Select]
wget -O- http://www.example.com/coremio/cronjobs.php >> /dev/null
If you believe the script must be executed from the shell using php interpreter then install ioncube for php 8.1. When done, try to run your script again using:

Code: [Select]
php -q /home/uzman/public_html/coremio/cronjobs.php
Look here if you need instructions how to install ionCube:
https://forum.centos-webpanel.com/php/how-to-install-ioncube-loader-in-php-on-centos-linux/

If it doesn't help show us output of:

Code: [Select]
php -v
« Last Edit: June 07, 2023, 06:35:02 PM by cyberspace »

Offline
*
Re: cronjop problem
« Reply #8 on: June 07, 2023, 06:35:38 PM »
Failed loading /usr/local/ioncube/ioncube_loader_lin_8.1.so:  /usr/local/ioncube/ioncube_loader_lin_8.1.so: undefined symbol: file_globals
Failed loading /usr/local/sourceguardian/ixed.8.1.lin:  /usr/local/sourceguardian/ixed.8.1.lin: undefined symbol: compiler_globals
PHP 8.1.0 (cli) (built: Jun  2 2023 22:48:32) (ZTS)
Copyright (c) The PHP Group
Zend Engine v4.1.0, Copyright (c) Zend Technologies
    with Xdebug v3.1.4, Copyright (c) 2002-2022, by Derick Rethans
[root@server ~]#

Offline
**
Re: cronjop problem
« Reply #9 on: June 07, 2023, 06:49:38 PM »
as root in SSH do:

Code: [Select]
wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar -xvzf ioncube_loaders_lin_x86-64.tar.gz
cd ioncube
scp ioncube_loader_lin_8.1_ts.so /usr/local/ioncube/ioncube_loader_lin_8.1.so

try:

Code: [Select]
php -q /home/uzman/public_html/coremio/cronjobs.php
UPDATE:

To install SourceGuarian Loaders do:

Code: [Select]
wget --user-agent="https://www.sourceguardian.com/loaders/download/loaders.linux-x86_64.tar.gz
tar -xvzf loaders.linux-x86_64.tar.gz
scp ixed.8.1ts.lin /usr/local/sourceguardian/ixed.8.1.lin
« Last Edit: June 07, 2023, 06:57:59 PM by cyberspace »

Offline
*
Re: cronjop problem
« Reply #10 on: June 08, 2023, 09:46:17 AM »
Hello, I have tried all the possible options below, but unfortunately, I couldn't get cronjob to work. What should I do?
php -q /home/uzman/public_html/coremio/cronjobs.php
/usr/local/bin/php -q /home/uzman/public_html/coremio/cronjobs.php
/usr/local/bin/php-fpm8.1 -q /home/uzman/public_html/coremio/cronjobs.php
/usr/local/bin/php/fpm -q /home/uzman/public_html/coremio/cronjobs.php
/home/uzman/public_html/coremio/cronjobs.php

Try upgrading the PHP version of CWP.

Offline
*****
Re: cronjop problem
« Reply #11 on: June 11, 2023, 09:59:47 PM »
Saw "Xdebug v3.1.4, Copyright (c) 2002-2022, by Derick Rethans"

That's not a standard CWP PHP plugin, sounds like you have a PHP not compiled by CWP that us causing a problem.