Author Topic: New CWP Installation Error: The encoded file has expired  (Read 169 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
New CWP Installation Error: The encoded file has expired
« on: June 16, 2024, 04:10:42 AM »
I am unable to use CWP at all on new servers. This is a fresh install of AlmaLinux 8.10 and a fresh install of CWP.
https://SERVER-IP:2087 displays a blank page only

The issue is with PHP and ionCube:

tail -n4 /usr/local/cwpsrv/logs/error_log
Code: [Select]
2024/06/15 23:54:02 [error] 820#0: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error:  <br>The encoded file <b>/usr/local/cwpsrv/htdocs/admin/index.php</b> has expired. in Unknown on line 0" while reading response header from upstream, client: REMOVED, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/usr/local/cwp/php71/var/sockets/cwpsrv.sock:", host: "SERVER-IP:2087"
2024/06/15 23:54:18 [error] 820#0: *4 FastCGI sent in stderr: "PHP message: PHP Fatal error:  <br>The encoded file <b>/usr/local/cwpsrv/htdocs/admin/index.php</b> has expired. in Unknown on line 0" while reading response header from upstream, client: REMOVED, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/usr/local/cwp/php71/var/sockets/cwpsrv.sock:", host: "SERVER-IP:2087"
2024/06/15 23:54:50 [error] 820#0: *9 open() "/usr/local/cwpsrv/htdocs/admin/favicon.ico" failed (2: No such file or directory), client: REMOVED, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "SERVER-IP:2087"

I have already tried to execute /scripts/update_ioncube. This script completes successfully.
Code: [Select]
[root@server htdocs]# sh /scripts/update_ioncube restart
[root@server htdocs]#



sh /scripts/update_cwp
Code: [Select]
PHP Fatal error: 
The encoded file /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php has expired.
 in Unknown on line 0

php -v
Code: [Select]
PHP 5.6.37 (cli) (built: Jul 20 2018 06:10:33)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with the ionCube PHP Loader + ionCube24 v13.0.2, Copyright (c) 2002-2023, by ionCube Ltd.

php -i
Code: [Select]
Configure Command =>  './configure'  '--with-zlib' '--enable-soap' '--enable-exif' '--with-config-file-path=/usr/local/php' '--with-config-file-scan-dir=/usr/local/php/php.d' '--enable-phar' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-iconv' '--with-mysql' '--with-mysqli' '--with-mysql=mysqlnd' '--with-mysqli=mysqlnd' '--with-mcrypt' '--with-imap' '--with-imap-ssl' '--with-gettext' '--with-xmlrpc' '--with-pdo-mysql=mysqlnd' '--enable-posix' '--enable-ftp' '--with-openssl' '--enable-mbstring' '--with-jpeg-dir=/usr' '--with-freetype-dir=/usr' '--with-kerberos' '--with-xsl' '--with-bz2' '--enable-zip' '--with-gd' '--with-libdir=lib64' '--enable-sockets' '--with-pcre-regex' '--with-mysql-sock=/var/lib/mysql/mysql.sock'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /usr/local/php
Loaded Configuration File => /usr/local/php/php.ini
Scan this dir for additional .ini files => /usr/local/php/php.d
Additional .ini files parsed => /usr/local/php/php.d/ioncube.ini

PHP API => 20131106
PHP Extension => 20131226
Zend Extension => 220131226
Zend Extension Build => API220131226,NTS
PHP Extension Build => API20131226,NTS
Debug Build => no
Thread Safety => disabled
Zend Signal Handling => disabled
Zend Memory Manager => enabled
Zend Multibyte Support => provided by mbstring
IPv6 Support => enabled
DTrace Support => disabled

Registered PHP Streams => https, ftps, compress.zlib, compress.bzip2, php, file, glob, data, http, ftp, phar, zip
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3, sslv2, tls, tlsv1.0, tlsv1.1, tlsv1.2
Registered Stream Filters => zlib.*, bzip2.*, convert.iconv.*, mcrypt.*, mdecrypt.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with the ionCube PHP Loader + ionCube24 v13.0.2, Copyright (c) 2002-2023, by ionCube Ltd.

Offline
*
[SOLVED] Re: New CWP Installation Error: The encoded file has expired
« Reply #1 on: June 16, 2024, 08:38:18 AM »
I was able to resolve this by editing cwp-el8-latest and re-installing:

Changed all URL's from "static.cdn-cwp.com/files/cwp/el7" to "static.cdn-cwp.com/files/cwp/el8"
Changed "static.cdn-cwp.com/files/cwp/el8/cwp-el7-0.9.8.????.zip" to "static.cdn-cwp.com/files/cwp/el8/cwp-el7-0.9.8.1179.zip"

I've also made some other tweaks to the installer file. Most notably: fixed expression/arithmatic errors nears lines ~80 thru ~90, added logic to the php-fpm installer to install the latest version (as of Jun-15-2024) of PHP, increased cert bits from 2048 to 4096, changed cert details, disabled pure-ftpd because FTP is lame. My changes can be seen by searching within the installer file for the text "zfk" - each change has been notated.
You can download it here. Pastebin.com will not allow me to provide the installer sourcecode.... sorry.

Offline
*
Re: New CWP Installation Error: The encoded file has expired
« Reply #2 on: June 17, 2024, 08:10:47 AM »
Read this please....


https://wiki.centos-webpanel.com/cwp-expired-error-500

Please Atention:

Don't forget to change the version from this example 0.9.8.1160 to the latest version which you can find on this link:

https://control-webpanel.com/changelog

Make sure that you check after this if your automatic updates work.



Offline
****
Re: New CWP Installation Error: The encoded file has expired
« Reply #3 on: June 17, 2024, 06:33:05 PM »
Make sure you are using PHP 8.1 or newer for IonCube support and make sure it is compiled in when you build PHP. (You should change your CLI version of PHP from 5.6 to 8.1 or newer also.)