2 hours ago2 hr PHP-FPM may fail to start with this error:PHP Fatal error: Unable to start pcre module in Unknown on line 0One possible cause is conflicting PCRE libraries under /usr/local/lib. If diagnostics identify these libraries as the cause, quarantine them instead of permanently deleting them.Back up the libraries and check ApacheThe following command moves matching files into a backup directory. If Apache’s configuration test fails, it restores them automatically.Moving shared libraries may affect other applications when they start or restart. Keep the printed backup path.Copy all and paste in SSH terminal:( set -e backup=$(mktemp -d /root/libpcre-backup.XXXXXXXX) echo "Backup directory: $backup" find /usr/local/lib -maxdepth 1 -name 'libpcre*' \ -exec mv -t "$backup" {} + if ! /usr/local/apache/bin/httpd -t; then find "$backup" -maxdepth 1 -name 'libpcre*' \ -exec mv -t /usr/local/lib {} + echo "Apache check failed; files restored." exit 1 fi )Restart CWP PHP-FPM servicesAfter the Apache check passes, restart the running or failed PHP-FPM services. This briefly interrupts PHP requests on websites using those services.The command discovers installed services named php-fpm.service or php-fpmNN.service. It leaves inactive, non-failed services stopped.Copy all and paste in SSH terminal:systemctl list-unit-files -t service | awk '$1 ~ /^php-fpm[0-9]*\.service$/ {print $1}' | while IFS= read -r service; do if systemctl is-active -q "$service" || systemctl is-failed -q "$service"; then echo "Restarting $service" if systemctl restart "$service"; then systemctl is-active "$service" else echo "Restart failed: $service" SYSTEMD_PAGER=cat systemctl status -l "$service" fi fi doneVerify recoveryCheck the affected websites and PHP-FPM logs after restarting. Apache reporting Syntax OK alone does not confirm PHP-FPM recovery.If the same error remains or another application fails, restore the quarantined libraries using the printed backup directory and investigate the runtime library dependencies before making further changes.
Create an account or sign in to comment