4 * Script that generates a default table for PGT/PGTiou storage. This script
5 * assumes a database with proper permissions exists and we are habe
6 * permissions to create a table.
7 * All database settings have to be set in the config.php file. Or the
8 * CAS_PGTStorage_Db() options:
9 * $db, $db_user, $db_password, $db_table, $driver_options
10 * have to filled out directly. Option examples can be found in the
15 * @file create_pgt_storage_table.php
16 * @category Authentication
18 * @author Joachim Fritschi <jfritschi@freenet.de>
19 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
20 * @link https://wiki.jasig.org/display/CASC/phpCAS
23 // Load the settings from the central config file
24 require_once 'config.php';
26 require_once $phpcas_path . '/CAS.php';
29 // Dummy client because we need a 'client' object
30 $client = new CAS_Client(CAS_VERSION_2_0, true, $cas_host, $cas_port, $cas_context, false);
32 // Set the torage object
33 $cas_obj = new CAS_PGTStorage_Db($client, $db, $db_user, $db_password, $db_table, $driver_options);
35 $cas_obj->createTable();
39 <title>phpCAS PGT db storage table creation</title>
40 <link rel="stylesheet" type='text/css' href='example.css'/>
45 echo 'Table <b>' . $db_table . '</b> successfully created in database <b>' . $db . '</b>';