标签 cPanel 下的文章

Unable to create account. Invalid value “paper_lantern” for the “cpmod” setting - jupiter

现象:hostbill 创建 cPanel 网页空间产品时,出错。提示信息如:Unable to create account. Invalid value “paper_lantern” for the “cpmod” setting。

原因:可能是WHM版本升级后,删除了旧的 paper lantern 主题模板,在产品设置那,将 Cpanel Theme 设置为新的主题名称 jupiter 即可。

参考:https://support.cpanel.net/hc/en-us/articles/6196316404119-Paper-Lantern-Deprecation-and-Removal-Schedule

cPanel - WHM - The SMTP restriction - 限制用户使用外部smtp发信

问题:cPanel用户无法通过php使用外部smtp服务器发信。

尝试:执行如 openssl s_client -connect smtp.gmail.com:465 的命令,显示cPanel/WHM本机的ssl证书,并不是gmail的。

解决:登录到WHM,禁用 The SMTP restriction 功能即可。

This feature prevents users from bypassing the mail server to send mail, a common practice used by spammers.
It will allow only the MTA, mailman, and root to connect to remote SMTP servers.

This control is also adjustable in Tweak Settings.

The SMTP restriction is enabled.

参考:https://docs.cpanel.net/whm/security-center/smtp-restrictions/

cPanel - WHM - Invalid command 'SetEnv' - <IfVersion

问题:新安装的cPanel/WHM 环境,访问Magento2程序网站返回500错误,日志里有如下的内容:

public_html/.htaccess: Invalid command 'SetEnv', perhaps misspelled or defined by a module not included in the server configuration
public_html/app/.htaccess: Invalid command '<IfVersion', perhaps misspelled or defined by a module not included in the server configuration

尝试:以root账户登录到WHM面板,通过EasyApache4,安装mod_envmod_version的apache组件。

参考:

cpanel - 用不同的版本的php命令 - /opt/cpanel/ea-php72/root/usr/bin/php - An exception was raised while creating "Request"

现象:在cPanel环境中执行magento2的命令,如 php bin/magento cache:flush提示出错:

An exception was raised while creating "Request"; no instance returned

尝试:用正确的php版本路径再次执行,如 /opt/cpanel/ea-php72/root/usr/bin/php bin/magento cache:flush

参考:

cPanel - 禁用 Network Manager 服务

现象:在本地的虚拟机里通过iso安装的centos7系统,安装 cPanel/WHM 时,提示错误

cPanel does not support NetworkManager enabled systems. The installation cannot proceed.

cpanel-local-nm-service.png

尝试:

1.systemctl stop NetworkManager # 停止 NetworkManager 服务
2.systemctl disable NetworkManager # 禁用 NetworkManager 服务
3.systemctl enable network.service # 启用 network 服务
4.systemctl start network.service # 启动 network 服务

参考:https://documentation.cpanel.net/display/CKB/How+to+Disable+Network+Manager