我的 PHP 容器运行 puppeteer 来生成 PDF。通过生成 PDF 文档,它还在我的容器内创建了两个核心转储文件。我不确定它们实际上来自哪里。
主机/服务器是 CentOS 7。
/var/log/messages通过遵循https://linux-audit.com/understand-and-configure-core-dumps-work-on-linux/ 的禁用核心转储部分,我已经完成了:
/etc/security/limits.conf* soft core 0
* hard core 0
Run Code Online (Sandbox Code Playgroud)
通过以下方式创建了一个 disable-core-dumps.sh: echo “ulimit -c 0 > /dev/null 2>&1” > /etc/profile.d/disable-coredumps.sh
将以下内容添加到 /etc/systemd/coredump.conf
[Coredump]
Storage=none
ProcessSizeMax=0
Run Code Online (Sandbox Code Playgroud)
并重新启动服务器和容器。
我也试过ulimit -c 0在容器内设置(高山)
以上技巧都不适合我。每次 puppeteer 生成 PDF 时,它总是会创建两个核心转储文件,如下所示:
* soft core 0
* hard core 0
Run Code Online (Sandbox Code Playgroud)
核心文件如下所示:
谁能帮我禁用核心转储?非常感谢。
我正在努力改变生成的时间戳列名称
php artisan migrate
Run Code Online (Sandbox Code Playgroud)
命令.
我已经做了以下更改.当我使用eloquent查询构建器时,它可以正确生成列名,但是当我使用上面的命令时,它仍然会生成"created_at","updated_at"和"deleted_at".谁能帮我吗?非常感谢.
/* vendor\framework\src\Illuminate\Database\Eloquent\Model.php */
/**
* The name of the "created at" column.
*
* @var string
*/
const CREATED_AT = 'datetime_created';
/**
* The name of the "updated at" column.
*
* @var string
*/
const UPDATED_AT = 'datetime_updated';
/**
* The name of the "deleted at" column.
*
* @var string
*/
const DELETED_AT = 'datetime_deleted';
Run Code Online (Sandbox Code Playgroud)
/* vendor\framework\src\Illuminate\Database\Schema\Blueprint.php */
/**
* Indicate that the timestamp columns should be dropped.
*
* @return void …Run Code Online (Sandbox Code Playgroud) 我有一个运行postfix + dovecot作为邮件服务器的VPS服务器.我已经创建了两个运行良好的帐户.两者都可以通过STARTTLS和SSL发送和接收电子邮件.
但是,当我今天添加第三个帐户时,它只能接收电子邮件但无法连接SMTP服务器.所以这不是密码错误的问题.SMTP设置与其他两个帐户相同.客户端的设置应该是正确的.
后缀日志说:
Aug 28 12:55:32 server postfix/smtpd[1645]: warning: SASL authentication failure: Password verification failed
Aug 28 12:55:32 server postfix/smtpd[1645]: warning: unknown[203.97.197.232]: SASL PLAIN authentication failed: authentication failure
Aug 28 12:55:35 server postfix/smtpd[1645]: warning: unknown[203.97.197.232]: SASL LOGIN authentication failed: authentication failure
Run Code Online (Sandbox Code Playgroud)
main.cf中的sasl和tls设置为:
smtpd_sasl_auth_enable = yes
smtpd_sasl_type = cyrus
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt …Run Code Online (Sandbox Code Playgroud) 我有一个 Auth.Attempt 事件处理程序类,我检测用户的登录尝试以决定锁定用户的帐户。但是,当我尝试使用闪现消息将用户重定向到登录页面时,我发现重定向不起作用,仍然继续下一步。我想在事件发生时中断该过程并给出我的自定义警告消息。谁能帮我吗?多谢。
我的事件处理程序:
namespace MyApp\Handlers\Security;
use DB;
use Session;
use Redirect;
class LoginHandler
{
/**
* Maximum attempts
* If user tries to login but failed more than this number, User account will be locked
*
* @var integer
*/
private $max_attemtps;
/**
* Maximum attempts per IP
* If an IP / Device tries to login but failed more than this number, the IP will be blocked
*
* @var integer
*/
private $ip_max_attempts;
public function __construct()
{ …Run Code Online (Sandbox Code Playgroud)