First of all, download PHP Event Calendar from the download page, and then 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 http://www.yoursite.com/phpEventCalendar, or http://localhost/phpEventCalendar, the PEC_PATH should be “/phpEventCalendar“.

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

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

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

and so forth.