First of all, acquire a copy of PHP Event Calendar from the download page. Extract the zip file somewhere on your web server.

Create Database

Before start using Event Calendar on your site, create calendar database by executing pec_db_mysql.sql script in MySQL.

pec install sample db

Configuration

Once database has been created, specify database connection information in conf.php file. The database table name is “php_event_calendar“.

define('PEC_DB_HOST','localhost'); // database host name or IP
define('PEC_DB_USER','root'); // database login name
define('PEC_DB_PASS',''); // database passworld
define('PEC_DB_TYPE','mysql'); // database type
define('PEC_DB_NAME','php_event_calendar'); // database table name
define('PEC_DB_CHARSET','');

define('PEC_PATH', '/phpEventCalendar'); // URL to PHP Event Calendar folder.

PEC_PATH

PEC_PATH represents the absolute URL to the PHP Event Calendar folder on your web server.

For instance, if the URL to get to the PHP Event Calendar is https://www.yoursite.com/phpEventCalendar, or https://localhost/phpEventCalendar, the PEC_PATH should be “/phpEventCalendar“.

define('PEC_PATH', '/phpEventCalendar');

if the URL to PHP Event Calendar is https://www.yoursite.com/admin/phpEventCalendar, or https://localhost/admin/phpEventCalendar, the PEC_PATH should be “/admin/phpEventCalendar“,

define('PEC_PATH', '/admin/phpEventCalendar');

and so forth.