cron – PHP Event Calendar https://phpeventcalendar.com Modern Event Calendar For Your Website. Wed, 20 Nov 2024 04:55:05 +0000 en-US hourly 1 https://wordpress.org/?v=7.0.4 Warning after cron job execution “Notice: Undefined index: HTTP_HOST in pec.php…” https://phpeventcalendar.com/knowledge-base/warning-after-cron-job-execution-notice-undefined-index-http_host-in-pec-php/ Wed, 20 Nov 2024 04:51:50 +0000 https://phpeventcalendar.com/?p=1518 $_SERVER[‘HTTP_HOST‘] only exist when visit calendar via web page, so if you are trying to run cron jobs for event reminders, you will be using PHP CLI. If you getting the following warning

Warning after cron job execution “Notice: Undefined index: HTTP_HOST in pec.php…”

you will need to set the HTTP_HOST manually to point to your domain in pec.php

if ( defined( 'WP_CLI' ) && WP_CLI ) {
$_SERVER['HTTP_HOST'] = 'yourdomain.com';
}
]]>
Setup event reminder via email or in popup window https://phpeventcalendar.com/knowledge-base/setup-event-reminder-via-email-or-in-popup-window/ Wed, 20 Nov 2024 04:33:35 +0000 https://phpeventcalendar.com/?p=1503 When displaying ‘pop-up’ reminder window, keep in mind the pop-up work only when the calendar is the currently active tab. 

For the built-in email reminder that sends emails reminders (cron job required). See https://phpeventcalendar.com/docs/event-emailpopup-reminder/

To setup cron job, it is recommended to use cPanel Cron Job tool. See https://kb.iweb.com/hc/en-us/articles/230244168-Setting-up-cron-jobs-with-cPanel-. This tool is always included in host provider that uses cPanel.

When use PHPMailer, you are required set up an SMTP server in order to send out emails. See https://github.com/PHPMailer/PHPMailer

]]>