This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Pages: [1] 2
1
Other / Re: The CWPpro version 0.9.8.1239 update destroyed sshd and .ssh.
« on: July 05, 2026, 08:48:02 PM »
Does anyone knows about how to fix the script "fix_cwpsrv_logs" that is damaged? The new update released today doesn't fix it.
2
Other / Re: The CWPpro version 0.9.8.1239 update destroyed sshd and .ssh.
« on: July 02, 2026, 07:07:17 PM »To regain access, add a key via the panel:
-> Send shell command
Script:Code: [Select]mkdir -p /root/.ssh && chmod 700 /root/.ssh && echo "__PASTE_HERE__" >> /root/.ssh/authorized_keys && chmod 600 /root/.ssh/authorized_keys
Great tip to recover inmediately the access without the need to enable password access. Let's hope that a new CWP update will repair ASAP all damage caused by the fear to being hacked. The script used is very aggressive and it's touching too many sensitive parts of the system on servers where no compromise has been detected.
3
Other / Re: The CWPpro version 0.9.8.1239 update destroyed sshd and .ssh.
« on: July 02, 2026, 07:00:41 PM »We are not running that 'fix'.
Happened to a couple of our AlmaLinux 9 boxes when we went thru them.
You have to go thru the GUI and File Manager to change SSH to allow passwords.
Thanks a lot for the info. But that is only to recover root access to the system and to restore the access with keys into authorized_keys. But the every day task running temp_hacker_check will destroy it again and again until a new CWP update is released. There is also a big issue with the script named "fix_cwpsrv_logs" as I've said before, because the content is truncated/wrong. Does anyone has the old content of this script or it has been changed for some reason?
Anyway, I wish the best luck to all with the work to recover from this little disaster
As I've been read there was many hacked servers but now also the ones that avoided the hack, are suffering from a bad patched update.
4
Other / Re: The CWPpro version 0.9.8.1239 update destroyed sshd and .ssh.
« on: July 02, 2026, 11:38:44 AM »On AlmaLinux 9 and still have the same issue. We thought it was an attack related to https://forum.centos-webpanel.com/centos-webpanel-bugs/i-think-there-is-a-very-serious-security-vulnerability-in-cwp-right-now/. Guess it's a new issues.
It's related with the fix released to mitigate the breach. The script temp_hacker_check is the cause of this issue and it deletes /root/.ssh/ completely.
5
Other / Re: The CWPpro version 0.9.8.1239 update destroyed sshd and .ssh.
« on: July 02, 2026, 11:10:47 AM »
I can confirm this issue. It happens on Alma Linux 9.8. I'm shocked 😲
There is also a big issue with a broken script from the scripts folder. The content of fix_cwpsrv_logs is truncated.
Please, fix this issue ASAP, it's urgent
There is also a big issue with a broken script from the scripts folder. The content of fix_cwpsrv_logs is truncated.
Please, fix this issue ASAP, it's urgent
6
Updates / Re: Roundcube vulnerability
« on: March 04, 2026, 10:36:01 AM »
Hi again. I've fixed and tweaked some issues. Now it works fine. However, due to CWP limited to PHP 7.4 (!!!!) Roundcube can't be updated beyond 1.6.11 so be careful if you select "stable" and not "lts" into the script settings:
Code: [Select]
#!/usr/bin/env bash
####################################################################################
# #
# The MIT License (MIT) #
# #
# Copyright (c) 2026 BeinHost.com #
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy #
# of this software and associated documentation files (the "Software"), to deal #
# in the Software without restriction, including without limitation the rights #
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell #
# copies of the Software, and to permit persons to whom the Software is #
# furnished to do so, subject to the following conditions: #
# #
# The above copyright notice and this permission notice shall be included in all #
# copies or substantial portions of the Software. #
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE #
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, #
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE #
# SOFTWARE. #
# #
####################################################################################
set -euo pipefail
IFS=$'\n\t'
########################################
# CONFIG
########################################
BASE_DIR="/usr/local/cwpsrv/var/services"
INSTALL_DIR="$BASE_DIR/roundcube"
PAGE_URL="https://roundcube.net/download/"
OWNER="cwpsvc:cwpsvc"
EMAIL="mail@domain.com" # set your email address here
ENABLE_NOTIFICATIONS=true # true/false to enable/disable notifications
SUBJECT_PREFIX="[Roundcube Updater]"
RC_VERSION="lts" # select between "lts" or "stable" or "beta"
CONNECT_TIMEOUT=10
MAX_TIMEOUT=30
cd "$BASE_DIR" || exit 1
########################################
# INITIAL CHECKS
########################################
required_cmds=(
curl
sha256sum
tar
mail
yes
awk
grep
sed
)
for cmd in "${required_cmds[@]}"; do
if ! command -v "$cmd" >/dev/null 2>&1; then
echo "Required command not found: $cmd"
exit 10
fi
done
exec 9>/var/lock/roundcube_updater.lock
flock -n 9 || { echo "Another update process is running."; exit 20; }
trap 'send_email "Update FAILED (unexpected)" "Server: $(hostname)\nAn unexpected error occurred.\nTime: $(date)"' ERR
########################################
# Send notification
########################################
send_email() {
if [ "$ENABLE_NOTIFICATIONS" = true ]; then
local subject="$1"
local body="$2"
# use mail command
echo -e "$body" | mail -s "$SUBJECT_PREFIX $subject" "$EMAIL"
fi
}
########################################
# Detect installed version
########################################
INI_FILE="$INSTALL_DIR/program/include/iniset.php"
if [[ ! -f "$INI_FILE" ]]; then
echo "Cannot detect installed version (iniset.php missing)."
exit 2
fi
installed_version=$(grep -oE "RCMAIL_VERSION',[[:space:]]*'[^']+'" \
"$INI_FILE" | sed -E "s/.*'([^']+)'.*/\1/")
installed_version=$(echo "$installed_version" | tr -d '\r\n[:space:]')
echo "Installed version: $installed_version"
########################################
# Detect latest version + checksum
########################################
echo "Fetching releases information..."
if ! page_content=$(curl -fsSL --connect-timeout $CONNECT_TIMEOUT --max-time $MAX_TIMEOUT "$PAGE_URL"); then
echo "Failed to fetch download page."
send_email "Update FAILED" "Server: $(hostname)\nStatus: Failed to retrieve Roundcube download page.\nURL: $PAGE_URL\nTime: $(date)"
exit 30
fi
block_id="$RC_VERSION"
version_block=$(echo "$page_content" | awk "/<h2 id=\"$block_id\">/,/<\/table>/")
if [[ -z "$version_block" ]]; then
echo "Failed to parse the releases block."
send_email "Update FAILED" "Server: $(hostname)\nStatus: Could not parse the release section from download page.\nURL: $PAGE_URL\nTime: $(date)"
exit 31
fi
row_complete=$(echo "$version_block" | awk '
BEGIN {RS="</tr>"; FS="\n"}
/roundcubemail-[0-9]+\.[0-9]+\.[0-9]+-complete\.tar\.gz/ {print $0 "</tr>"}' || true)
if [[ -z "$row_complete" ]]; then
echo "Failed to find the complete release row."
send_email "Update FAILED" "Server: $(hostname)\nStatus: Could not find the complete release row for $RC_VERSION.\nTime: $(date)"
exit 32
fi
download_url=$(echo "$row_complete" | grep -oE 'https://[^"]+-complete\.tar\.gz' | head -n1 || true)
latest_version=$(echo "$download_url" | sed -E 's/.*roundcubemail-([0-9]+\.[0-9]+\.[0-9]+)-complete\.tar\.gz/\1/' | tr -d '\r\n[:space:]' || true)
sha256_expected=$(echo "$row_complete" | grep -oP '<span class="copy-target[^"]*">\K[a-f0-9]{64}' || true)
if [[ -z "$download_url" || -z "$latest_version" || -z "$sha256_expected" ]]; then
echo "Failed to detect the latest release or its checksum."
send_email "Update failed" "Server: $(hostname)\nFailed to detect the latest release or checksum.\nTime: $(date)"
exit 3
fi
########################################
# Compare versions
########################################
version_gt() {
[ "$1" = "$2" ] && return 1
local IFS=.
local i ver1=($1) ver2=($2)
for ((i=${#ver1[@]}; i<${#ver2[@]}; i++)); do ver1[i]=0; done
for ((i=${#ver2[@]}; i<${#ver1[@]}; i++)); do ver2[i]=0; done
for ((i=0; i<${#ver1[@]}; i++)); do
if ((10#${ver1[i]} > 10#${ver2[i]})); then return 0; fi
if ((10#${ver1[i]} < 10#${ver2[i]})); then return 1; fi
done
return 1
}
#echo "Installed: [$installed_version]"
#echo "Latest: [$latest_version]"
if version_gt "$latest_version" "$installed_version"; then
echo "Update available."
elif version_gt "$installed_version" "$latest_version"; then
echo "Installed version is newer than latest available ($latest_version)."
send_email "Installed version newer than available" "Server: $(hostname)\nStatus: Installed Roundcube version ($installed_version) is newer than latest LTS ($latest_version).\nNo update performed.\nTime: $(date)"
exit 0
else
echo "Latest version:" "$latest_version"
echo "Already up to date."
send_email "No update needed" "Server: $(hostname)\nStatus: Roundcube is already up to date.\nInstalled version: $installed_version\nLatest available: $latest_version\nTime: $(date)"
exit 0
fi
########################################
# Confirmation only if not in CRON mode
########################################
if [ -t 0 ]; then
read -rp "Do you want to download and install the new Roundcube release $latest_version? [y/N]: " yn
case "$yn" in
[Yy]*) ;;
*) echo "Update cancelled by user."; exit 0 ;;
esac
fi
########################################
# Backup current installation
########################################
backup_dir="roundcube_backup_v${installed_version}_$(date +%F_%H%M%S)"
echo "Creating backup: $backup_dir"
cp -a "$INSTALL_DIR" "$backup_dir"
########################################
# Download release
########################################
filename=$(basename "$download_url")
echo "Downloading $filename"
if ! curl -fL --connect-timeout $CONNECT_TIMEOUT --max-time $MAX_TIMEOUT -o "$filename" "$download_url"; then
echo "Failed to download latest release."
send_email "Update FAILED" "Server: $(hostname)\nStatus: Failed to download the latest release package.\nURL: $PAGE_URL\nTime: $(date)"
exit 30
fi
########################################
# Verify SHA256
########################################
echo "Verifying checksum..."
sha256_actual=$(sha256sum "$filename" | awk '{print $1}')
if [[ "$sha256_actual" != "$sha256_expected" ]]; then
echo "Checksum verification FAILED!"
rm -f "$filename"
send_email "Update FAILED" "Server: $(hostname)\nStatus: Roundcube update failed!\nInstalled version: $installed_version\nLatest version: $latest_version\nBackup: $backup_dir\nReason: SHA256 mismatch or extraction failure\nTime: $(date)"
exit 4
fi
echo "Checksum OK."
########################################
# Extract + Install
########################################
echo "Extracting..."
if ! tar -xzf "$filename"; then
echo "Extraction failed."
send_email "Update FAILED" "Server: $(hostname)\nStatus: Extraction failed.\nVersion: $latest_version\nBackup: $backup_dir\nTime: $(date)"
exit 14
fi
src_dir="roundcubemail-$latest_version"
if [[ ! -d "$src_dir" ]]; then
echo "Extraction failed. Directory $src_dir not found."
exit 5
fi
echo "Running install script..."
if [ -t 0 ]; then
"$src_dir/bin/installto.sh" "$INSTALL_DIR"
else
yes | "$src_dir/bin/installto.sh" "$INSTALL_DIR"
fi
if [[ $? -ne 0 ]]; then
echo "Install failed"
send_email "Update FAILED" "Server: $(hostname)\nStatus: Installation script failed.\nRollback performed.\nTime: $(date)"
[[ -d "${INSTALL_DIR}_failed" ]] && mv "${INSTALL_DIR}_failed" "${INSTALL_DIR}_failed_$(date +%s)"
if ! mv "$INSTALL_DIR" "${INSTALL_DIR}_failed"; then
echo "Rollback failed (step 1)"
exit 7
fi
if ! mv "$backup_dir" "$INSTALL_DIR"; then
echo "Rollback failed (step 2)"
exit 8
fi
exit 6
fi
########################################
# Post-install verification
########################################
echo "Verifying installed version..."
if ! new_installed_version=$(grep -oE "RCMAIL_VERSION',[[:space:]]*'[^']+'" \
"$INI_FILE" | sed -E "s/.*'([^']+)'.*/\1/"); then
echo "Failed to detect installed version after update."
exit 13
fi
new_installed_version=$(echo "$new_installed_version" | tr -d '\r\n[:space:]')
if [[ "$new_installed_version" != "$latest_version" ]]; then
echo "Post-install verification FAILED!"
echo "Expected: $latest_version"
echo "Detected: $new_installed_version"
[[ -d "${INSTALL_DIR}_failed" ]] && mv "${INSTALL_DIR}_failed" "${INSTALL_DIR}_failed_$(date +%s)"
if ! mv "$INSTALL_DIR" "${INSTALL_DIR}_failed"; then
echo "Rollback failed (post-check step 1)"
exit 11
fi
if ! mv "$backup_dir" "$INSTALL_DIR"; then
echo "Rollback failed (post-check step 2)"
exit 12
fi
send_email "Update FAILED" "Server: $(hostname)\nStatus: Roundcube update failed during post-install verification.\nExpected version: $latest_version\nDetected version: $new_installed_version\nRollback performed.\nTime: $(date)"
exit 9
fi
echo "Post-install verification OK."
########################################
# Fix permissions
########################################
chown -R "$OWNER" "$INSTALL_DIR"
########################################
# Cleanup
########################################
rm -rf "$src_dir" "$filename"
echo "Update completed successfully!"
echo "Now running version: $latest_version"
send_email "Update successful" "Server: $(hostname)\nStatus: Roundcube updated successfully!\nPrevious version: $installed_version\nNew version: $latest_version\nBackup directory: $backup_dir\nTime: $(date)"
7
Updates / Re: Roundcube vulnerability
« on: March 04, 2026, 07:43:15 AM »
Thanks a lot for sharing the script. Very useful. However I've tried to enhance it. You can use this one, a more robust version attached here:
I hope it helps. Cheers!
Code: [Select]
#!/usr/bin/env bash
####################################################################################
# #
# The MIT License (MIT) #
# #
# Copyright (c) 2026 BeinHost.com #
# #
# Permission is hereby granted, free of charge, to any person obtaining a copy #
# of this software and associated documentation files (the "Software"), to deal #
# in the Software without restriction, including without limitation the rights #
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell #
# copies of the Software, and to permit persons to whom the Software is #
# furnished to do so, subject to the following conditions: #
# #
# The above copyright notice and this permission notice shall be included in all #
# copies or substantial portions of the Software. #
# #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE #
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, #
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE #
# SOFTWARE. #
# #
####################################################################################
set -euo pipefail
IFS=$'\n\t'
########################################
# CONFIG
########################################
BASE_DIR="/usr/local/cwpsrv/var/services"
INSTALL_DIR="$BASE_DIR/roundcube"
PAGE_URL="https://roundcube.net/download/"
OWNER="cwpsvc:cwpsvc"
EMAIL="mail@domain.com" # set your email address here
ENABLE_NOTIFICATIONS=true # true/false to enable/disable notifications
SUBJECT_PREFIX="[Roundcube Updater]"
RC_VERSION="lts" # select between "lts" or "stable"
CONNECT_TIMEOUT=10
MAX_TIMEOUT=30
cd "$BASE_DIR" || exit 1
########################################
# INITIAL CHECKS
########################################
required_cmds=(
curl
sha256sum
tar
mail
yes
awk
grep
sed
)
for cmd in "${required_cmds[@]}"; do
if ! command -v "$cmd" >/dev/null 2>&1; then
echo "Required command not found: $cmd"
exit 10
fi
done
exec 9>/var/lock/roundcube_updater.lock
flock -n 9 || { echo "Another update process is running."; exit 20; }
trap 'send_email "Update FAILED (unexpected)" "Server: $(hostname)\nAn unexpected error occurred.\nTime: $(date)"' ERR
########################################
# Send notification
########################################
send_email() {
if [ "$ENABLE_NOTIFICATIONS" = true ]; then
local subject="$1"
local body="$2"
# use mail command
echo -e "$body" | mail -s "$SUBJECT_PREFIX $subject" "$EMAIL"
fi
}
########################################
# Detect installed version
########################################
INI_FILE="$INSTALL_DIR/program/include/iniset.php"
if [[ ! -f "$INI_FILE" ]]; then
echo "Cannot detect installed version (iniset.php missing)."
exit 2
fi
installed_version=$(grep -oE "RCMAIL_VERSION',[[:space:]]*'[^']+'" \
"$INI_FILE" | sed -E "s/.*'([^']+)'.*/\1/")
installed_version=$(echo "$installed_version" | tr -d '\r\n[:space:]')
echo "Installed version: $installed_version"
########################################
# Detect latest version + checksum
########################################
echo "Fetching releases information..."
if ! page_content=$(curl -fsSL --connect-timeout $CONNECT_TIMEOUT --max-time $MAX_TIMEOUT "$PAGE_URL"); then
echo "Failed to fetch download page."
send_email "Update FAILED" "Server: $(hostname)\nStatus: Failed to retrieve Roundcube download page.\nURL: $PAGE_URL\nTime: $(date)"
exit 30
fi
block_id="$RC_VERSION"
version_block=$(echo "$page_content" | awk "/<h2 id=\"$block_id\">/,/<\/table>/")
if [[ -z "$version_block" ]]; then
echo "Failed to parse the releases block."
send_email "Update FAILED" "Server: $(hostname)\nStatus: Could not parse the release section from download page.\nURL: $PAGE_URL\nTime: $(date)"
exit 31
fi
download_url=$(echo "$version_block" \
| grep -oE 'https://[^"]+-complete\.tar\.gz' \
| head -n1)
latest_version=$(echo "$download_url" \
| sed -E 's/.*roundcubemail-([0-9]+\.[0-9]+\.[0-9]+)-complete\.tar\.gz/\1/')
latest_version=$(echo "$latest_version" | tr -d '\r\n[:space:]')
sha256_expected=$(echo "$version_block" \
| grep -oE '[a-f0-9]{64}' \
| head -n1)
if [[ -z "$download_url" || -z "$latest_version" || -z "$sha256_expected" ]]; then
echo "Failed to detect the latest release."
send_email "Update failed" "Server: $(hostname)\nFailed to detect the latest release.\nTime: $(date)"
exit 3
fi
########################################
# Compare versions
########################################
version_gt() {
[ "$1" = "$2" ] && return 1
local IFS=.
local i ver1=($1) ver2=($2)
for ((i=${#ver1[@]}; i<${#ver2[@]}; i++)); do ver1[i]=0; done
for ((i=${#ver2[@]}; i<${#ver1[@]}; i++)); do ver2[i]=0; done
for ((i=0; i<${#ver1[@]}; i++)); do
if ((10#${ver1[i]} > 10#${ver2[i]})); then return 0; fi
if ((10#${ver1[i]} < 10#${ver2[i]})); then return 1; fi
done
return 1
}
#echo "Installed: [$installed_version]"
#echo "Latest: [$latest_version]"
if version_gt "$latest_version" "$installed_version"; then
echo "Update available."
elif version_gt "$installed_version" "$latest_version"; then
echo "Installed version is newer than latest available."
send_email "Installed version newer than available" "Server: $(hostname)\nStatus: Installed Roundcube version ($installed_version) is newer than latest LTS ($latest_version).\nNo update performed.\nTime: $(date)"
exit 0
else
echo "Latest version:" "$latest_version"
echo "Already up to date."
send_email "No update needed" "Server: $(hostname)\nStatus: Roundcube is already up to date.\nInstalled version: $installed_version\nLatest available: $latest_version\nTime: $(date)"
exit 0
fi
########################################
# Confirmation only if not in CRON mode
########################################
if [ -t 0 ]; then
read -rp "Do you want to download and install the new Roundcube release $latest_version? [y/N]: " yn
case "$yn" in
[Yy]*) ;;
*) echo "Update cancelled by user."; exit 0 ;;
esac
fi
########################################
# Backup current installation
########################################
backup_dir="roundcube_backup_v${installed_version}_$(date +%F_%H%M%S)"
echo "Creating backup: $backup_dir"
cp -a "$INSTALL_DIR" "$backup_dir"
########################################
# Download release
########################################
filename=$(basename "$download_url")
echo "Downloading $filename"
if ! curl -fL --connect-timeout $CONNECT_TIMEOUT --max-time $MAX_TIMEOUT -o "$filename" "$download_url"; then
echo "Failed to download latest release."
send_email "Update FAILED" "Server: $(hostname)\nStatus: Failed to download the latest release package.\nURL: $PAGE_URL\nTime: $(date)"
exit 30
fi
########################################
# Verify SHA256
########################################
echo "Verifying checksum..."
sha256_actual=$(sha256sum "$filename" | awk '{print $1}')
if [[ "$sha256_actual" != "$sha256_expected" ]]; then
echo "Checksum verification FAILED!"
rm -f "$filename"
send_email "Update FAILED" "Server: $(hostname)\nStatus: Roundcube update failed!\nInstalled version: $installed_version\nLatest version: $latest_version\nBackup: $backup_dir\nReason: SHA256 mismatch or extraction failure\nTime: $(date)"
exit 4
fi
echo "Checksum OK."
########################################
# Extract + Install
########################################
echo "Extracting..."
if ! tar -xzf "$filename"; then
echo "Extraction failed."
send_email "Update FAILED" "Server: $(hostname)\nStatus: Extraction failed.\nVersion: $latest_version\nBackup: $backup_dir\nTime: $(date)"
exit 14
fi
src_dir="roundcubemail-$latest_version"
if [[ ! -d "$src_dir" ]]; then
echo "Extraction failed. Directory $src_dir not found."
exit 5
fi
echo "Running install script..."
if ! yes | "$src_dir/bin/installto.sh" "$INSTALL_DIR"; then
echo "Install failed"
send_email "Update FAILED" "Server: $(hostname)\nStatus: Installation script failed.\nRollback performed.\nTime: $(date)"
[[ -d "${INSTALL_DIR}_failed" ]] && mv "${INSTALL_DIR}_failed" "${INSTALL_DIR}_failed_$(date +%s)"
if ! mv "$INSTALL_DIR" "${INSTALL_DIR}_failed"; then
echo "Rollback failed (step 1)"
exit 7
fi
if ! mv "$backup_dir" "$INSTALL_DIR"; then
echo "Rollback failed (step 2)"
exit 8
fi
exit 6
fi
########################################
# Post-install verification
########################################
echo "Verifying installed version..."
if ! new_installed_version=$(grep -oE "RCMAIL_VERSION',[[:space:]]*'[^']+'" \
"$INI_FILE" | sed -E "s/.*'([^']+)'.*/\1/"); then
echo "Failed to detect installed version after update."
exit 13
fi
new_installed_version=$(echo "$new_installed_version" | tr -d '\r\n[:space:]')
if [[ "$new_installed_version" != "$latest_version" ]]; then
echo "Post-install verification FAILED!"
echo "Expected: $latest_version"
echo "Detected: $new_installed_version"
[[ -d "${INSTALL_DIR}_failed" ]] && mv "${INSTALL_DIR}_failed" "${INSTALL_DIR}_failed_$(date +%s)"
if ! mv "$INSTALL_DIR" "${INSTALL_DIR}_failed"; then
echo "Rollback failed (post-check step 1)"
exit 11
fi
if ! mv "$backup_dir" "$INSTALL_DIR"; then
echo "Rollback failed (post-check step 2)"
exit 12
fi
send_email "Update FAILED" "Server: $(hostname)
Status: Roundcube update failed during post-install verification.
Expected version: $latest_version
Detected version: $new_installed_version
Rollback performed.
Time: $(date)"
exit 9
fi
echo "Post-install verification OK."
########################################
# Fix permissions
########################################
chown -R "$OWNER" "$INSTALL_DIR"
########################################
# Cleanup
########################################
rm -rf "$src_dir" "$filename"
echo "Update completed successfully!"
echo "Now running version: $latest_version"
send_email "Update successful" "Server: $(hostname)\nStatus: Roundcube updated successfully!\nPrevious version: $installed_version\nNew version: $latest_version\nBackup directory: $backup_dir\nTime: $(date)"
I hope it helps. Cheers!
8
PHP Selector / Re: PECL extensions using PHP-FPM?
« on: October 24, 2023, 12:04:10 AM »In the CLI, you have to call the specific version of php-fpm you want, instead of just blindly calling php in the terminal. For example, call php 8.1 with no memory limit (as I often have to do with composer):Code: [Select]/opt/alt/php-fpm81/usr/bin/php -d memory_limit=-1
And for things that need to run as a specific user, instead of root:Code: [Select]sudo -u USERNAME /opt/alt/php-fpm81/usr/bin/php -d memory_limit=-1
Can't understand what this answer has to be with the PECL question.
NOTE: I second this question because PECL is not working for php-fpm installations
9
CentOS-WebPanel GUI / Re: CWP Invalid session on login
« on: August 24, 2023, 11:33:13 AM »
I believe that the issue could be solved easily if the CWP developers change the code to get the real IP. Because you can notice that at the bottom of the CWP dashboard where it says "Your IP" that it's wrong when using behind the CLoudFlare proxy. It can be observed for a moment, just before being logged out from the panel.
May be anybody knows how to suggest this to the CWP team, because it's really a very small change into the source code. But may be I'm wrong. Just my two cents trying to provide a solution
May be anybody knows how to suggest this to the CWP team, because it's really a very small change into the source code. But may be I'm wrong. Just my two cents trying to provide a solution
10
CentOS-WebPanel GUI / Re: CWP Invalid session on login
« on: August 24, 2023, 11:20:58 AM »
Very interested in this issue. I'm trying to solve the same problem, because the CloudFlare proxy changes the detected IP of the logged client, that's why it doesn't work. It could be solved if the real IP is passed to the CWP, so the cuestion is: How?
11
PHP Selector / Re: Build succeded on PHP-FPM Selector but version is not being updated
« on: October 04, 2022, 06:35:26 PM »
The last build log lines are this:
Code: [Select]
Build complete.
Don't forget to run 'make test'.
Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20200930/
Installing PHP CLI binary: /usr/local/bin/
Installing PHP CLI man page: /usr/local/php/man/man1/
Installing phpdbg binary: /usr/local/bin/
Installing phpdbg man page: /usr/local/php/man/man1/
Installing PHP CGI binary: /usr/local/bin/
Installing PHP CGI man page: /usr/local/php/man/man1/
Installing build environment: /usr/local/lib/php/build/
Installing header files: /usr/local/include/php/
Installing helper programs: /usr/local/bin/
program: phpize
program: php-config
Installing man pages: /usr/local/php/man/man1/
page: phpize.1
page: php-config.1
/usr/local/src/php-build/php-8.0.23/build/shtool install -c ext/phar/phar.phar /usr/local/bin/phar.phar
ln -s -f phar.phar /usr/local/bin/phar
Installing PDO headers: /usr/local/include/php/ext/pdo/
exe:/opt/alt/php-fpm80/usr/sbin/php-fpm
Build Completed
###################
12
PHP Selector / Re: PHP-FPM 8.0 not building.
« on: October 04, 2022, 05:19:52 PM »
Finally I managed to solve it by rebuilding openssl from sources and the PHP build completed successfuly. But my problem now is that after rebuild the new version is not being updated. System already shows the old one. Could Anyone help with this?
13
PHP Selector / Build succeded on PHP-FPM Selector but version is not being updated
« on: October 04, 2022, 05:16:44 PM »
Current PHP version was 8.0.20 and manually executed the build to update it to 8.0.23. After all process it finished with no errors at all but the change is not being reflected on the page. It still remains displaying 8.0.20 version as currently installed.
What else do I need to complete the update? I've tried restarting PHP-FPM and also apache with no success.
What else do I need to complete the update? I've tried restarting PHP-FPM and also apache with no success.
14
CentOS 7 Problems / Re: OpenSSL 1.1.1 use with php
« on: August 22, 2022, 05:48:15 PM »
I believe that your openssl lib path is wrong. It should be: /usr/local/opensslso
That's it.
That's it.
15
PHP Selector / Re: PHP-FPM 8.0 not building.
« on: August 02, 2022, 03:39:08 AM »
I'm having same issue. Disabling the Sodium module in configuration before build solves that error but it raises another one related with opcache and jit
In my case I'm trying to build php 8.1 without success
In my case I'm trying to build php 8.1 without success
Pages: [1] 2
