Control Web Panel
Other => Other => Topic started by: zafer 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
-
Need more info about what your configuration is like and what you are trying to accomplish...
-
I'm trying to add a cron job, what information do you need?
-
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?
-
Why do you think your cron task doesn't work ? Do you get some errors or what ?
What does happen when you run:
php -q /home/uzman/public_html/coremio/cronjobs.php
/usr/local/bin/php -q /home/uzman/public_html/coremio/cronjobs.php
from shell (ssh) ?
-
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:
/opt/alt/php-fpm81/usr/bin/php -q /home/uzman/public_html/coremio/cronjobs.php
-
[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.
-
Make sure you run the script properly. In some cases scripts must be called over web using wget or curl e.g:
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:
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:
php -v
-
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 ~]#
-
as root in SSH do:
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:
php -q /home/uzman/public_html/coremio/cronjobs.php
UPDATE:
To install SourceGuarian Loaders do:
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
-
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.
-
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.