Openemr 3.0 installation

sraj49 wrote on Friday, March 06, 2009:

Thanks Brady,

Here it is. I delete the data base. Recreated an empty data base by name openemr through cpanel and went through the set up again.

OpenEMR Setup

Welcome to OpenEMR. This utility will step you through the installation and configuration of OpenEMR for your practice.

Before proceeding, be sure that you have a properly installed and configured MySQL server available, and a PHP configured webserver.
Detailed installation instructions can be found in the ‘INSTALL’ manual file.
If you are upgrading from a previous version, do NOT use this script. Please read the ‘Upgrading’ section found in the ‘INSTALL’ manual file.
We will now ensure correct file and directory permissions before starting installation:

Ensuring following files are world-writable…
‘/home/mytwirle/public_html/openemr/library/sqlconf.php’ file is ready.
‘/home/mytwirle/public_html/openemr/interface/globals.php’ file is ready.
‘/home/mytwirle/public_html/openemr/gacl/gacl.ini.php’ file is ready.
‘/home/mytwirle/public_html/openemr/gacl/gacl.class.php’ file is ready.

Ensuring following directories have proper permissions…
‘/home/mytwirle/public_html/openemr/documents’ directory is ready.
‘/home/mytwirle/public_html/openemr/edi’ directory is ready.
‘/home/mytwirle/public_html/openemr/era’ directory is ready.
‘/home/mytwirle/public_html/openemr/custom/letter_templates’ directory is ready.
‘/home/mytwirle/public_html/openemr/gacl/admin/templates_c’ directory is ready.
‘/home/mytwirle/public_html/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/compiled’ directory is ready.
‘/home/mytwirle/public_html/openemr/interface/main/calendar/modules/PostCalendar/pntemplates/cache’ directory is ready.

All required files and directories have been verified. Click to continue installation.

OpenEMR Setup

Step 1

Now I need to know whether you want me to create the database on my own or if you have already created the database for me to use. For me to create the database, you will need to supply the MySQL root password.
NOTE: clicking on "Continue" may delete or cause damage to data on your system. Before you continue please backup your data.

Have setup create the database
I have already created the database

Step 2

Now you need to supply the MySQL server information and path information. Detailed instructions on each item can be found in the ‘INSTALL’ manual file.

MYSQL SERVER:
Server Host:        (If you run MySQL and Apache/PHP on the same computer, then leave this as ‘localhost’. If they are on separate computers, then enter the IP address of the computer running MySQL.)
Server Port:        (This is the MySQL port. The default port for MySQL is 3306.)
Database Name:        (This is the name of the OpenEMR database in MySQL - ‘openemr’ is the recommended)
Login Name:        (This is the name of the OpenEMR login name in MySQL - ‘openemr’ is the recommended)
Password:        (This is the Login Password for when PHP accesses MySQL - it should be at least 8 characters long and composed of both numbers and letters)

OPENEMR USER:
Initial User:        (This is the login name of user that will be created for you. Limit this to one word.)
Initial User’s Name:        (This is the real name of the ‘initial user’.)
Initial Group:        (This is the group that will be created for your users. This should be the name of your practice.)

OPENEMR PATHS:
Absolute Path:        (This is the full absolute directory path to openemr. The value here is automatically created, and should not need to be modified. Do not worry about direction of slashes; they will be automatically corrected.)
Relative HTML Path:        (Set this to the relative html path, ie. what you would type into the web browser after the server address to get to OpenEMR. For example, if you type 'http://127.0.0.1/clinic/openemr/ to load OpenEMR, set this to ‘/clinic/openemr’ without the trailing slash. Do not worry about direction of slashes; they will be automatically corrected.)

OpenEMR Setup

Step 3

Configuring OpenEMR…

Connecting to MySQL Server… OK.
Opening database…OK.
Creating initial tables… OK
Adding Initial User… OK

Writing SQL Configuration…
Successfully wrote SQL configuration.

Writing OpenEMR webserver paths to config file…
Successfully wrote OpenEMR webserver paths to config file

Next step will install and configure access controls (php-GACL).

OpenEMR Setup

Step 4

Installing and Configuring Access Controls (php-GACL)…

Writing php-GACL configuration settings to config files…
Finished writing php-GACL configuration settings to config files.

Configuration:
driver = mysql,
host = localhost,
user = mytwirle_sraj49,
database = mytwirle_openemr,
table prefix = gacl_Testing database connection…
Success! Connected to "mysql" database on "localhost".
Testing database type…
Success! Compatible database type "mysql" detected!
Making sure database "mytwirle_openemr" exists…
Success! Good, database "mytwirle_openemr" already exists!
Failed! Failed creating tables. Please enable DEBUG mode (set it to TRUE in $gacl_options near top of admin/gacl_admin.inc.php) to see the error and try again. You will most likely need to delete any tables already created.
Failed! Please fix the above errors and try again.

OpenEMR ACL Setup
All done configuring and installing access controls (php-GACL)!
Gave the ‘admin’ user (password is ‘pass’) administrator access.

Done installing and configuring access controls (php-GACL).
Next step will configure PHP.

I am pasting below the entire Php error log

[05-Mar-2009 23:06:47] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 62
[05-Mar-2009 23:13:11] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 65
[05-Mar-2009 23:28:32] PHP Parse error:  syntax error, unexpected T_ELSE in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 51
[05-Mar-2009 23:41:17] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 79
[05-Mar-2009 23:46:38] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 81
[06-Mar-2009 11:28:36] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘smarty/libssmarty/lib/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 65
[06-Mar-2009 13:02:38] PHP Warning:  include_once(gacl/gacl.class.php) [<a href=‘function.include-once’>function.include-once</a>]: failed to open stream: No such file or directory in /home/mytwirle/public_html/openemr/library/acl.inc on line 82
[06-Mar-2009 13:02:38] PHP Warning:  include_once() [<a href=‘function.include’>function.include</a>]: Failed opening ‘gacl/gacl.class.php’ for inclusion (include_path=‘get_include_path:/home/mytwirle/public_html/openemr/gacl/admin//smarty/libs/’) in /home/mytwirle/public_html/openemr/library/acl.inc on line 82
[06-Mar-2009 13:02:38] PHP Warning:  include_once(gacl/gacl_api.class.php) [<a href=‘function.include-once’>function.include-once</a>]: failed to open stream: No such file or directory in /home/mytwirle/public_html/openemr/library/acl.inc on line 296
[06-Mar-2009 13:02:38] PHP Warning:  include_once() [<a href=‘function.include’>function.include</a>]: Failed opening ‘gacl/gacl_api.class.php’ for inclusion (include_path=‘get_include_path:/home/mytwirle/public_html/openemr/gacl/admin//smarty/libs/’) in /home/mytwirle/public_html/openemr/library/acl.inc on line 296

Thank you for your kind assitance

Raj

sraj49 wrote on Friday, March 06, 2009:

Brady,

Addition to the above I am pasting the remaining steps. I am able to open , log in but I am not seeing Admin, Billing, New Patient and issues button in the Navigation panel on the left side.

Step 5

Configuration of PHP…

We recommend making the following changes to your PHP installation, which can normally be done by editing the php.ini configuration file:
Your php.ini file can be found at /usr/local/php52/lib/php.ini
To ensure proper functioning of OpenEMR you must make sure that settings in php.ini file include "display_errors = Off", "register_globals = Off", "magic_quotes_gpc = Off", "max_execution_time" set to at least 60, "max_input_time" set to at least 90, and "memory_limit" set to at least "128M".
In order to take full advantage of the patient documents capability you must make sure that settings in php.ini file include "file_uploads = On", that "upload_max_filesize" is appropriate for your use and that "upload_tmp_dir" is set to a correct value that will work on your system.

We recommend you print these instructions for future reference.

Next step will configure Apache web server.

Step 6

Configuration of Apache web server…

The "/home/mytwirle/public_html/openemr/documents", "/home/mytwirle/public_html/openemr/edi" and "/home/mytwirle/public_html/openemr/era" directories contain patient information, and it is important to secure these directories. This can be done by placing pertinent .htaccess files in these directories or by pasting the below to end of your apache configuration file:
  <Directory /home/mytwirle/public_html/openemr/documents>
      order deny,allow
      Deny from all
  </Directory>
  <Directory /home/mytwirle/public_html/openemr/edi>
      order deny,allow
      Deny from all
  </Directory>
  <Directory /home/mytwirle/public_html/openemr/era>
      order deny,allow
      Deny from all
  </Directory>

If you are having difficulty finding your apache configuration file, then refer to the ‘INSTALL’ manual for suggestions.

We recommend you print these instructions for future reference.

Click ‘continue’ for further instructions.

Congratulations! OpenEMR is now installed.

If applicable, please restore secure permissions on the four configuration files: /openemr/interface/globals.php, /openemr/library/sqlconf.php, /openemr/gacl/gacl.ini.php, and /openemr/gacl/gacl.class.php files. In linux, recommend changing file permissions with the ‘chmod 644 filename’ command.
Access controls (php-GACL) are installed for fine-grained security, and can be administered in OpenEMR’s admin->acl menu.
Reading openemr/includes/config.php and openemr/interface/globals.php is a good idea. These files contain many options to choose from including themes.
There’s much information and many extra tools bundled within the OpenEMR installation directory. Please refer to openemr/Documentation. Many forms and other useful scripts can be found at openemr/contrib.
To ensure a consistent look and feel through out the application using Firefox is recommended.
The OpenEMR project home page and wiki can be found at http://www.oemr.org
The OpenEMR forums can be found at http://sourceforge.net/projects/openemr
We pursue grants to help fund the future development of OpenEMR. To apply for these grants, we need to estimate how many times this program is installed and how many practices are evaluating or using this software. It would be awesome if you would email us at drbowen@charter.net if you have installed this software. The more details about your plans with this software, the better, but even just sending us an email stating you just installed it is very helpful.
We recommend you print these instructions for future reference.

The initial OpenEMR user is "admin" and the password is "pass". You should change this password!

Click here to start using OpenEMR.

Thanks

RAj

bradymiller wrote on Friday, March 06, 2009:

hey,

Thanks for the info. gonna try to figure it out.

> 2 Yes, I created an empty data base. 100 tables were created in
> the data base. From the error log lots of coorrection had to be 
> made and I had to crate three more tables making the totla 1003 
> tables. One of the issue was related to the variable characters if 
> there are more than one with length 240 I was not able to create 
> an index unless I reduce one field length to 90.

You mention a error log in above paragraph about the mysql stuff.  What log is this?

-brady

sraj49 wrote on Friday, March 06, 2009:

Thanks Brady,

After

In Step4 There was a message like this

"Failed! Failed creating tables. Please enable DEBUG mode (set it to TRUE in $gacl_options near top of admin/gacl_admin.inc.php) to see the error and try again. You will most likely need to delete any tables already created."

I was not able to write a code in admin/gacl_admin.inc.php. But I found a debig option in "gacl.ini.php" and I changed it to TRUE and then I got a list of sql modification includi creating 3 additional tables. I can recreate the log and sen it to you if you like.

Raj

bradymiller wrote on Friday, March 06, 2009:

hey,

Try this (not sure if this will work)
start fresh (drop database and delete web directory).

edit file openemr/gacl/admin/gacl_admin.inc.php:

On line 62:

Change:
require_once($gacl_options[‘smarty_dir’].’/Smarty.class.php’);

To:
require_once(dirname(__FILE__).$gacl_options[‘smarty_dir’].’/Smarty.class.php’);

Then cross fingers and install.

-brady

sraj49 wrote on Friday, March 06, 2009:

Brady,

Just to give you complete details about the Sql issues, eventhough it says OK when I enabled the debig as TRUE in gacl/gacl.ini.php in Step 4 I get an output like below. Afetr I create the 3 additial table as called for when I go to the next step of adding an Index then for some fields with more than one filed ( likesection_value, value) I get a Sql error that it is too long and I have to go back to the table and change either the secton_value field or value field, both are variable legth 240 and I have to change one of them as 90.

Step 4

Installing and Configuring Access Controls (php-GACL)…

Writing php-GACL configuration settings to config files…
Finished writing php-GACL configuration settings to config files.

Option: db_type
Valid Config options: db_type
Option: db_host
Valid Config options: db_host
Option: db_user
Valid Config options: db_user
Option: db_password
Valid Config options: db_password
Option: db_name
Valid Config options: db_name
Option: db_table_prefix
Valid Config options: db_table_prefix
Option: caching
Valid Config options: caching
Option: force_cache_expire
Valid Config options: force_cache_expire
Option: cache_dir
Valid Config options: cache_dir
Option: cache_expire_time
Valid Config options: cache_expire_time
Option: items_per_page
Valid Config options: items_per_page
Option: max_select_box_items
Valid Config options: max_select_box_items
Option: max_search_return_items
Valid Config options: max_search_return_items
Option: smarty_dir
ERROR: Config option: smarty_dir is not a valid option
Option: smarty_template_dir
ERROR: Config option: smarty_template_dir is not a valid option
Option: smarty_compile_dir
ERROR: Config option: smarty_compile_dir is not a valid option
Configuration:
driver = mysql,
host = localhost,
user = mytwirle_sraj49,
database = mytwirle_openemr,
table prefix = gacl_Testing database connection…
Success! Connected to “mysql” database on “localhost”.
Testing database type…
Success! Compatible database type “mysql” detected!
Making sure database “mytwirle_openemr” exists…
(mysql): show databases 
Success! Good, database “mytwirle_openemr” already exists!
(mysql): select version() 
(mysql): SHOW INDEX FROM gacl_phpgacl 
(mysql): SHOW COLUMNS FROM `gacl_phpgacl` 
(mysql): SHOW COLUMNS FROM `gacl_phpgacl` 
(mysql): SHOW INDEX FROM gacl_acl 
(mysql): SHOW COLUMNS FROM `gacl_acl` 
(mysql): SHOW COLUMNS FROM `gacl_acl` 
(mysql): SHOW INDEX FROM gacl_acl_sections 
(mysql): SHOW COLUMNS FROM `gacl_acl_sections` 
(mysql): SHOW COLUMNS FROM `gacl_acl_sections` 
(mysql): SHOW INDEX FROM gacl_aco 
(mysql): SHOW COLUMNS FROM `gacl_aco` 
(mysql): SHOW COLUMNS FROM `gacl_aco` 
(mysql): SHOW INDEX FROM gacl_aco_map 
1146: Table ‘mytwirle_openemr.gacl_aco_map’ doesn’t exist
(mysql): SHOW COLUMNS FROM `gacl_aco_map` 
1146: Table ‘mytwirle_openemr.gacl_aco_map’ doesn’t exist
(mysql): SHOW INDEX FROM gacl_aco_sections 
(mysql): SHOW COLUMNS FROM `gacl_aco_sections` 
(mysql): SHOW COLUMNS FROM `gacl_aco_sections` 
(mysql): SHOW INDEX FROM gacl_aro 
(mysql): SHOW COLUMNS FROM `gacl_aro` 
(mysql): SHOW COLUMNS FROM `gacl_aro` 
(mysql): SHOW INDEX FROM gacl_aro_map 
1146: Table ‘mytwirle_openemr.gacl_aro_map’ doesn’t exist
(mysql): SHOW COLUMNS FROM `gacl_aro_map` 
1146: Table ‘mytwirle_openemr.gacl_aro_map’ doesn’t exist
(mysql): SHOW INDEX FROM gacl_aro_sections 
(mysql): SHOW COLUMNS FROM `gacl_aro_sections` 
(mysql): SHOW COLUMNS FROM `gacl_aro_sections` 
(mysql): SHOW INDEX FROM gacl_axo 
(mysql): SHOW COLUMNS FROM `gacl_axo` 
(mysql): SHOW COLUMNS FROM `gacl_axo` 
(mysql): SHOW INDEX FROM gacl_axo_map 
1146: Table ‘mytwirle_openemr.gacl_axo_map’ doesn’t exist
(mysql): SHOW COLUMNS FROM `gacl_axo_map` 
1146: Table ‘mytwirle_openemr.gacl_axo_map’ doesn’t exist
(mysql): SHOW INDEX FROM gacl_axo_sections 
(mysql): SHOW COLUMNS FROM `gacl_axo_sections` 
(mysql): SHOW COLUMNS FROM `gacl_axo_sections` 
(mysql): SHOW INDEX FROM gacl_aro_groups 
(mysql): SHOW COLUMNS FROM `gacl_aro_groups` 
(mysql): SHOW COLUMNS FROM `gacl_aro_groups` 
(mysql): SHOW INDEX FROM gacl_groups_aro_map 
(mysql): SHOW COLUMNS FROM `gacl_groups_aro_map` 
(mysql): SHOW COLUMNS FROM `gacl_groups_aro_map` 
(mysql): SHOW INDEX FROM gacl_aro_groups_map 
(mysql): SHOW COLUMNS FROM `gacl_aro_groups_map` 
(mysql): SHOW COLUMNS FROM `gacl_aro_groups_map` 
(mysql): SHOW INDEX FROM gacl_axo_groups 
(mysql): SHOW COLUMNS FROM `gacl_axo_groups` 
(mysql): SHOW COLUMNS FROM `gacl_axo_groups` 
(mysql): SHOW INDEX FROM gacl_groups_axo_map 
(mysql): SHOW COLUMNS FROM `gacl_groups_axo_map` 
(mysql): SHOW COLUMNS FROM `gacl_groups_axo_map` 
(mysql): SHOW INDEX FROM gacl_axo_groups_map 
(mysql): SHOW COLUMNS FROM `gacl_axo_groups_map` 
(mysql): SHOW COLUMNS FROM `gacl_axo_groups_map` 
Here’s the SQL to do the build:
DELETE FROM gacl_phpgacl WHERE name=‘version’;

INSERT INTO gacl_phpgacl (name,value) VALUES (‘version’,‘3.3.7’);

DELETE FROM gacl_phpgacl WHERE name=‘schema_version’;

INSERT INTO gacl_phpgacl (name,value) VALUES (‘schema_version’,‘2.1’);

DROP INDEX gacl_enabled_acl ON gacl_acl;

DROP INDEX gacl_section_value_acl ON gacl_acl;

DROP INDEX gacl_updated_date_acl ON gacl_acl;

ALTER TABLE gacl_acl MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_acl MODIFY COLUMN allow INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_acl MODIFY COLUMN enabled INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_acl MODIFY COLUMN updated_date INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_acl ADD INDEX gacl_enabled_acl (enabled);

ALTER TABLE gacl_acl ADD INDEX gacl_section_value_acl (section_value);

ALTER TABLE gacl_acl ADD INDEX gacl_updated_date_acl (updated_date);

DROP INDEX gacl_value_acl_sections ON gacl_acl_sections;

DROP INDEX gacl_hidden_acl_sections ON gacl_acl_sections;

ALTER TABLE gacl_acl_sections MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_acl_sections MODIFY COLUMN order_value INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_acl_sections MODIFY COLUMN hidden INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_acl_sections ADD UNIQUE INDEX gacl_value_acl_sections (value);

ALTER TABLE gacl_acl_sections ADD INDEX gacl_hidden_acl_sections (hidden);

DELETE FROM gacl_acl_sections WHERE id=1 AND value=‘system’;

INSERT INTO gacl_acl_sections (id,value,order_value,name) VALUES (1,‘system’,1,‘System’);

DELETE FROM gacl_acl_sections WHERE id=2 AND value=‘user’;

INSERT INTO gacl_acl_sections (id,value,order_value,name) VALUES (2,‘user’,2,‘User’);

DROP INDEX gacl_hidden_aco ON gacl_aco;

ALTER TABLE gacl_aco MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_aco MODIFY COLUMN order_value INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_aco MODIFY COLUMN hidden INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_aco ADD UNIQUE INDEX gacl_section_value_value_aco (section_value, value);

ALTER TABLE gacl_aco ADD INDEX gacl_hidden_aco (hidden);

CREATE TABLE gacl_aco_map (
acl_id INTEGER NOT NULL DEFAULT 0,
section_value VARCHAR(230) NOT NULL DEFAULT ‘0’,
value VARCHAR(230) NOT NULL,
PRIMARY KEY (acl_id, section_value, value)
);

DROP INDEX gacl_value_aco_sections ON gacl_aco_sections;

DROP INDEX gacl_hidden_aco_sections ON gacl_aco_sections;

ALTER TABLE gacl_aco_sections MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_aco_sections MODIFY COLUMN order_value INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_aco_sections MODIFY COLUMN hidden INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_aco_sections ADD UNIQUE INDEX gacl_value_aco_sections (value);

ALTER TABLE gacl_aco_sections ADD INDEX gacl_hidden_aco_sections (hidden);

DROP INDEX gacl_hidden_aro ON gacl_aro;

ALTER TABLE gacl_aro MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_aro MODIFY COLUMN order_value INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_aro MODIFY COLUMN hidden INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_aro ADD UNIQUE INDEX gacl_section_value_value_aro (section_value, value);

ALTER TABLE gacl_aro ADD INDEX gacl_hidden_aro (hidden);

CREATE TABLE gacl_aro_map (
acl_id INTEGER NOT NULL DEFAULT 0,
section_value VARCHAR(230) NOT NULL DEFAULT ‘0’,
value VARCHAR(230) NOT NULL,
PRIMARY KEY (acl_id, section_value, value)
);

DROP INDEX gacl_value_aro_sections ON gacl_aro_sections;

DROP INDEX gacl_hidden_aro_sections ON gacl_aro_sections;

ALTER TABLE gacl_aro_sections MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_aro_sections MODIFY COLUMN order_value INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_aro_sections MODIFY COLUMN hidden INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_aro_sections ADD UNIQUE INDEX gacl_value_aro_sections (value);

ALTER TABLE gacl_aro_sections ADD INDEX gacl_hidden_aro_sections (hidden);

DROP INDEX gacl_hidden_axo ON gacl_axo;

ALTER TABLE gacl_axo MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_axo MODIFY COLUMN order_value INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_axo MODIFY COLUMN hidden INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_axo ADD UNIQUE INDEX gacl_section_value_value_axo (section_value, value);

ALTER TABLE gacl_axo ADD INDEX gacl_hidden_axo (hidden);

CREATE TABLE gacl_axo_map (
acl_id INTEGER NOT NULL DEFAULT 0,
section_value VARCHAR(230) NOT NULL DEFAULT ‘0’,
value VARCHAR(230) NOT NULL,
PRIMARY KEY (acl_id, section_value, value)
);

DROP INDEX gacl_value_axo_sections ON gacl_axo_sections;

DROP INDEX gacl_hidden_axo_sections ON gacl_axo_sections;

ALTER TABLE gacl_axo_sections MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_axo_sections MODIFY COLUMN order_value INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_axo_sections MODIFY COLUMN hidden INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_axo_sections ADD UNIQUE INDEX gacl_value_axo_sections (value);

ALTER TABLE gacl_axo_sections ADD INDEX gacl_hidden_axo_sections (hidden);

DROP INDEX gacl_value_aro_groups ON gacl_aro_groups;

DROP INDEX gacl_parent_id_aro_groups ON gacl_aro_groups;

DROP INDEX gacl_lft_rgt_aro_groups ON gacl_aro_groups;

ALTER TABLE gacl_aro_groups MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_aro_groups MODIFY COLUMN parent_id INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_aro_groups MODIFY COLUMN lft INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_aro_groups MODIFY COLUMN rgt INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_aro_groups ADD INDEX gacl_parent_id_aro_groups (parent_id);

ALTER TABLE gacl_aro_groups ADD UNIQUE INDEX gacl_value_aro_groups (value);

ALTER TABLE gacl_aro_groups ADD INDEX gacl_lft_rgt_aro_groups (lft, rgt);

DROP INDEX gacl_aro_id ON gacl_groups_aro_map;

ALTER TABLE gacl_groups_aro_map MODIFY COLUMN group_id INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_groups_aro_map MODIFY COLUMN aro_id INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_groups_aro_map ADD INDEX gacl_aro_id (aro_id);

ALTER TABLE gacl_aro_groups_map MODIFY COLUMN acl_id INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_aro_groups_map MODIFY COLUMN group_id INTEGER NOT NULL DEFAULT 0;

DROP INDEX gacl_value_axo_groups ON gacl_axo_groups;

DROP INDEX gacl_parent_id_axo_groups ON gacl_axo_groups;

DROP INDEX gacl_lft_rgt_axo_groups ON gacl_axo_groups;

ALTER TABLE gacl_axo_groups MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_axo_groups MODIFY COLUMN parent_id INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_axo_groups MODIFY COLUMN lft INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_axo_groups MODIFY COLUMN rgt INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_axo_groups ADD INDEX gacl_parent_id_axo_groups (parent_id);

ALTER TABLE gacl_axo_groups ADD UNIQUE INDEX gacl_value_axo_groups (value);

ALTER TABLE gacl_axo_groups ADD INDEX gacl_lft_rgt_axo_groups (lft, rgt);

DROP INDEX gacl_axo_id ON gacl_groups_axo_map;

ALTER TABLE gacl_groups_axo_map MODIFY COLUMN group_id INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_groups_axo_map MODIFY COLUMN axo_id INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_groups_axo_map ADD INDEX gacl_axo_id (axo_id);

ALTER TABLE gacl_axo_groups_map MODIFY COLUMN acl_id INTEGER NOT NULL DEFAULT 0;

ALTER TABLE gacl_axo_groups_map MODIFY COLUMN group_id INTEGER NOT NULL DEFAULT 0;
(mysql): DELETE FROM gacl_phpgacl WHERE name=‘version’ 
(mysql): INSERT INTO gacl_phpgacl (name,value) VALUES (‘version’,‘3.3.7’) 
(mysql): DELETE FROM gacl_phpgacl WHERE name=‘schema_version’ 
(mysql): INSERT INTO gacl_phpgacl (name,value) VALUES (‘schema_version’,‘2.1’) 
(mysql): DROP INDEX gacl_enabled_acl ON gacl_acl 
(mysql): DROP INDEX gacl_section_value_acl ON gacl_acl 
(mysql): DROP INDEX gacl_updated_date_acl ON gacl_acl 
(mysql): ALTER TABLE gacl_acl MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_acl MODIFY COLUMN allow INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_acl MODIFY COLUMN enabled INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_acl MODIFY COLUMN updated_date INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_acl ADD INDEX gacl_enabled_acl (enabled) 
(mysql): ALTER TABLE gacl_acl ADD INDEX gacl_section_value_acl (section_value) 
(mysql): ALTER TABLE gacl_acl ADD INDEX gacl_updated_date_acl (updated_date) 
(mysql): DROP INDEX gacl_value_acl_sections ON gacl_acl_sections 
(mysql): DROP INDEX gacl_hidden_acl_sections ON gacl_acl_sections 
(mysql): ALTER TABLE gacl_acl_sections MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_acl_sections MODIFY COLUMN order_value INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_acl_sections MODIFY COLUMN hidden INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_acl_sections ADD UNIQUE INDEX gacl_value_acl_sections (value) 
(mysql): ALTER TABLE gacl_acl_sections ADD INDEX gacl_hidden_acl_sections (hidden) 
(mysql): DELETE FROM gacl_acl_sections WHERE id=1 AND value=‘system’ 
(mysql): INSERT INTO gacl_acl_sections (id,value,order_value,name) VALUES (1,‘system’,1,‘System’) 
(mysql): DELETE FROM gacl_acl_sections WHERE id=2 AND value=‘user’ 
(mysql): INSERT INTO gacl_acl_sections (id,value,order_value,name) VALUES (2,‘user’,2,‘User’) 
(mysql): DROP INDEX gacl_hidden_aco ON gacl_aco 
(mysql): ALTER TABLE gacl_aco MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_aco MODIFY COLUMN order_value INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_aco MODIFY COLUMN hidden INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_aco ADD UNIQUE INDEX gacl_section_value_value_aco (section_value, value) 
1071: Specified key was too long; max key length is 1000 bytes
(mysql): ALTER TABLE gacl_aco ADD INDEX gacl_hidden_aco (hidden) 
(mysql): CREATE TABLE gacl_aco_map ( acl_id INTEGER NOT NULL DEFAULT 0, section_value VARCHAR(230) NOT NULL DEFAULT ‘0’, value VARCHAR(230) NOT NULL, PRIMARY KEY (acl_id, section_value, value) ) 
1071: Specified key was too long; max key length is 1000 bytes
(mysql): DROP INDEX gacl_value_aco_sections ON gacl_aco_sections 
(mysql): DROP INDEX gacl_hidden_aco_sections ON gacl_aco_sections 
(mysql): ALTER TABLE gacl_aco_sections MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_aco_sections MODIFY COLUMN order_value INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_aco_sections MODIFY COLUMN hidden INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_aco_sections ADD UNIQUE INDEX gacl_value_aco_sections (value) 
(mysql): ALTER TABLE gacl_aco_sections ADD INDEX gacl_hidden_aco_sections (hidden) 
(mysql): DROP INDEX gacl_hidden_aro ON gacl_aro 
(mysql): ALTER TABLE gacl_aro MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_aro MODIFY COLUMN order_value INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_aro MODIFY COLUMN hidden INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_aro ADD UNIQUE INDEX gacl_section_value_value_aro (section_value, value) 
1071: Specified key was too long; max key length is 1000 bytes
(mysql): ALTER TABLE gacl_aro ADD INDEX gacl_hidden_aro (hidden) 
(mysql): CREATE TABLE gacl_aro_map ( acl_id INTEGER NOT NULL DEFAULT 0, section_value VARCHAR(230) NOT NULL DEFAULT ‘0’, value VARCHAR(230) NOT NULL, PRIMARY KEY (acl_id, section_value, value) ) 
1071: Specified key was too long; max key length is 1000 bytes
(mysql): DROP INDEX gacl_value_aro_sections ON gacl_aro_sections 
(mysql): DROP INDEX gacl_hidden_aro_sections ON gacl_aro_sections 
(mysql): ALTER TABLE gacl_aro_sections MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_aro_sections MODIFY COLUMN order_value INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_aro_sections MODIFY COLUMN hidden INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_aro_sections ADD UNIQUE INDEX gacl_value_aro_sections (value) 
(mysql): ALTER TABLE gacl_aro_sections ADD INDEX gacl_hidden_aro_sections (hidden) 
(mysql): DROP INDEX gacl_hidden_axo ON gacl_axo 
(mysql): ALTER TABLE gacl_axo MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_axo MODIFY COLUMN order_value INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_axo MODIFY COLUMN hidden INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_axo ADD UNIQUE INDEX gacl_section_value_value_axo (section_value, value) 
1071: Specified key was too long; max key length is 1000 bytes
(mysql): ALTER TABLE gacl_axo ADD INDEX gacl_hidden_axo (hidden) 
(mysql): CREATE TABLE gacl_axo_map ( acl_id INTEGER NOT NULL DEFAULT 0, section_value VARCHAR(230) NOT NULL DEFAULT ‘0’, value VARCHAR(230) NOT NULL, PRIMARY KEY (acl_id, section_value, value) ) 
1071: Specified key was too long; max key length is 1000 bytes
(mysql): DROP INDEX gacl_value_axo_sections ON gacl_axo_sections 
(mysql): DROP INDEX gacl_hidden_axo_sections ON gacl_axo_sections 
(mysql): ALTER TABLE gacl_axo_sections MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_axo_sections MODIFY COLUMN order_value INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_axo_sections MODIFY COLUMN hidden INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_axo_sections ADD UNIQUE INDEX gacl_value_axo_sections (value) 
(mysql): ALTER TABLE gacl_axo_sections ADD INDEX gacl_hidden_axo_sections (hidden) 
(mysql): DROP INDEX gacl_value_aro_groups ON gacl_aro_groups 
(mysql): DROP INDEX gacl_parent_id_aro_groups ON gacl_aro_groups 
(mysql): DROP INDEX gacl_lft_rgt_aro_groups ON gacl_aro_groups 
(mysql): ALTER TABLE gacl_aro_groups MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_aro_groups MODIFY COLUMN parent_id INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_aro_groups MODIFY COLUMN lft INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_aro_groups MODIFY COLUMN rgt INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_aro_groups ADD INDEX gacl_parent_id_aro_groups (parent_id) 
(mysql): ALTER TABLE gacl_aro_groups ADD UNIQUE INDEX gacl_value_aro_groups (value) 
(mysql): ALTER TABLE gacl_aro_groups ADD INDEX gacl_lft_rgt_aro_groups (lft, rgt) 
(mysql): DROP INDEX gacl_aro_id ON gacl_groups_aro_map 
(mysql): ALTER TABLE gacl_groups_aro_map MODIFY COLUMN group_id INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_groups_aro_map MODIFY COLUMN aro_id INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_groups_aro_map ADD INDEX gacl_aro_id (aro_id) 
(mysql): ALTER TABLE gacl_aro_groups_map MODIFY COLUMN acl_id INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_aro_groups_map MODIFY COLUMN group_id INTEGER NOT NULL DEFAULT 0 
(mysql): DROP INDEX gacl_value_axo_groups ON gacl_axo_groups 
(mysql): DROP INDEX gacl_parent_id_axo_groups ON gacl_axo_groups 
(mysql): DROP INDEX gacl_lft_rgt_axo_groups ON gacl_axo_groups 
(mysql): ALTER TABLE gacl_axo_groups MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_axo_groups MODIFY COLUMN parent_id INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_axo_groups MODIFY COLUMN lft INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_axo_groups MODIFY COLUMN rgt INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_axo_groups ADD INDEX gacl_parent_id_axo_groups (parent_id) 
(mysql): ALTER TABLE gacl_axo_groups ADD UNIQUE INDEX gacl_value_axo_groups (value) 
(mysql): ALTER TABLE gacl_axo_groups ADD INDEX gacl_lft_rgt_axo_groups (lft, rgt) 
(mysql): DROP INDEX gacl_axo_id ON gacl_groups_axo_map 
(mysql): ALTER TABLE gacl_groups_axo_map MODIFY COLUMN group_id INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_groups_axo_map MODIFY COLUMN axo_id INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_groups_axo_map ADD INDEX gacl_axo_id (axo_id) 
(mysql): ALTER TABLE gacl_axo_groups_map MODIFY COLUMN acl_id INTEGER NOT NULL DEFAULT 0 
(mysql): ALTER TABLE gacl_axo_groups_map MODIFY COLUMN group_id INTEGER NOT NULL DEFAULT 0 
Failed! Failed creating tables. Please enable DEBUG mode (set it to TRUE in $gacl_options near top of admin/gacl_admin.inc.php) to see the error and try again. You will most likely need to delete any tables already created.
Failed! Please fix the above errors and try again.

Unable to create the access controls for OpenEMR. You have likely already run this script (acl_setup.php) successfully.
Other possible problems include php-GACL configuration file errors (gacl.ini.php or gacl.class.php).

Gave the ‘admin’ user (password is ‘pass’) administrator access.

Done installing and configuring access controls (php-GACL).
Next step will configure PHP.

I do not think I did the right thing. Advice me please.

Thanks

Raj

sraj49 wrote on Friday, March 06, 2009:

Hey I jst saw your message…Let me try that and get back to you…

Raj

sraj49 wrote on Friday, March 06, 2009:

Hey I did the modification suggested by you and in Step 4 after reverting to the original gacl.ini.php with debug = FALSE I get the following message:

OpenEMR Setup

Step 4

Installing and Configuring Access Controls (php-GACL)…

Writing php-GACL configuration settings to config files…
Finished writing php-GACL configuration settings to config files.

Fatal error: require_once() [function.require]: Failed opening required ‘/home/mytwirle/public_html/openemr/gacl/adminsmarty/libs/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 62

WIth the Debug enevbaled in gals/gacl.ini.php I get the follwing message in Step 4

Writing php-GACL configuration settings to config files…
Finished writing php-GACL configuration settings to config files.

Option: db_type
Valid Config options: db_type
Option: db_host
Valid Config options: db_host
Option: db_user
Valid Config options: db_user
Option: db_password
Valid Config options: db_password
Option: db_name
Valid Config options: db_name
Option: db_table_prefix
Valid Config options: db_table_prefix
Option: caching
Valid Config options: caching
Option: force_cache_expire
Valid Config options: force_cache_expire
Option: cache_dir
Valid Config options: cache_dir
Option: cache_expire_time
Valid Config options: cache_expire_time
Option: items_per_page
Valid Config options: items_per_page
Option: max_select_box_items
Valid Config options: max_select_box_items
Option: max_search_return_items
Valid Config options: max_search_return_items
Option: smarty_dir
ERROR: Config option: smarty_dir is not a valid option
Option: smarty_template_dir
ERROR: Config option: smarty_template_dir is not a valid option
Option: smarty_compile_dir
ERROR: Config option: smarty_compile_dir is not a valid option

Fatal error: require_once() [function.require]: Failed opening required ‘/home/mytwirle/public_html/openemr/gacl/adminsmarty/libs/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 62

I really appreciate your taking time to resolve this issue.

Raj

bradymiller wrote on Friday, March 06, 2009:

hey,

oops, minor thing, forgot the slash

start fresh (drop database and delete web directory).

edit file openemr/gacl/admin/gacl_admin.inc.php:

On line 62:

Change:
require_once($gacl_options[‘smarty_dir’].’/Smarty.class.php’);

To:
require_once(dirname(__FILE__).’/’.$gacl_options[‘smarty_dir’].’/Smarty.class.php’);

Then cross fingers and install again.

-brady

cfapress wrote on Friday, March 06, 2009:

Raj,

That last error you see about the missing file is due to a typo in <oemr>/gacl/gacl.ini.php

On line 42
smarty_dir              = "smarty/libs"

It should read
smarty_dir              = "/smarty/libs"

Or… another way to fix this is to correct <oemr>/gacl/admin/gacl_admin.inc.php so that it prefixes the ‘/’ character in the string concatenation on line 62. Right now, line 62 reads
require_once($gacl_options[‘smarty_dir’].’/Smarty.class.php’);

but it could be corrected to read
require_once("/".$gacl_options[‘smarty_dir’].’/Smarty.class.php’);

At least that is how I’m reading your error and the code. Perhaps Brady could take a look too.

Jason

sraj49 wrote on Friday, March 06, 2009:

Jason,

Good afternoon. I did the frist change ie. changing gacl.ini.php and Step and Step 4 are as pasted below:

Step 3

Configuring OpenEMR…

Connecting to MySQL Server… OK.
Opening database…OK.
Creating initial tables… OK
Adding Initial User… OK

Writing SQL Configuration…
Successfully wrote SQL configuration.

Writing OpenEMR webserver paths to config file…
Successfully wrote OpenEMR webserver paths to config file

Next step will install and configure access controls (php-GACL).

//The pasted data below are after revring to original gacl.ini.php and changing gacl/admin/gacl_admin.inc.php as suggested by you…

OpenEMR Setup

Step 3

Configuring OpenEMR…

Connecting to MySQL Server… OK.
Opening database…OK.
Creating initial tables… OK
Adding Initial User… OK

Writing SQL Configuration…
Successfully wrote SQL configuration.

Writing OpenEMR webserver paths to config file…
Successfully wrote OpenEMR webserver paths to config file

Next step will install and configure access controls (php-GACL).

OpenEMR Setup

Step 4

Installing and Configuring Access Controls (php-GACL)…

Writing php-GACL configuration settings to config files…
Finished writing php-GACL configuration settings to config files.

Fatal error: require_once() [function.require]: Failed opening required ‘/smarty/libs/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 62

All the files are as downloaded and copied on to the public_html folder on the server…

Thanks

Raj

bradymiller wrote on Friday, March 06, 2009:

Jason,
  I forgot the slash in the line I asked Raj to edit.

Raj,
  I think the above edit should resolve or at least resolve 1 of the 3 errors on your gacl debugging output:
Option: smarty_dir
ERROR: Config option: smarty_dir is not a valid option
Option: smarty_template_dir
ERROR: Config option: smarty_template_dir is not a valid option
Option: smarty_compile_dir
ERROR: Config option: smarty_compile_dir is not a valid option

If you still have errors with the template and compile, then that will be an easy fix also.

Once we get this sorted out, I’ll commit changes to CVS (after i test it a bit)

-brady

bradymiller wrote on Friday, March 06, 2009:

Raj,

This is getting confusing.  Below will deal with the “missing slash” problem. Don’t worry about gacl.ini.php .

To clarify again, try this (note we’ve added a ‘/’ in the command):
start fresh (drop database and delete web directory). 
edit file openemr/gacl/admin/gacl_admin.inc.php: 
On line 62: 

Change: 
require_once($gacl_options[‘smarty_dir’].’/Smarty.class.php’); 

To: 
require_once(dirname(__FILE__).’/’.$gacl_options[‘smarty_dir’].’/Smarty.class.php’); 

-brady

sraj49 wrote on Friday, March 06, 2009:

Dear Brady,

This is the corrected file with correction you suggested.

<?php
/*
* phpGACL - Generic Access Control List
* Copyright (C) 2002 Mike Benoit
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*
* For questions, help, comments, discussion, etc., please join the
* phpGACL mailing list. http://sourceforge.net/mail/?group_id=57103
*
* You may contact the author of phpGACL by e-mail at:
* ipso@snappymail.ca
*
* The latest version of phpGACL can be obtained from:
* http://phpgacl.sourceforge.net/
*
*/

require_once(dirname(__FILE__).’/…/gacl.class.php’);
require_once(dirname(__FILE__).’/…/gacl_api.class.php’);
require_once(dirname(__FILE__).’/gacl_admin_api.class.php’);

// phpGACL Configuration file.
if ( !isset($config_file) ) {
#    $config_file = ‘…/gacl.ini.php’;
    $config_file = dirname(__FILE__).’/…/gacl.ini.php’;
}

//Values supplied in $gacl_options array overwrite those in the config file.
if ( file_exists($config_file) ) {
    $config = parse_ini_file($config_file);

    if ( is_array($config) ) {
        if ( isset($gacl_options) ) {
            $gacl_options = array_merge($config, $gacl_options);
        } else {
            $gacl_options = $config;
        }
    }
    unset($config);
}

$gacl_api = new gacl_admin_api($gacl_options);

$gacl = &$gacl_api;

$db = &$gacl->db;

//Setup the Smarty Class.
require_once(dirname(__FILE__).’/’.$gacl_options[‘smarty_dir’].’/Smarty.class.php’);
$smarty = new Smarty;
$smarty->compile_check = TRUE;
$smarty->template_dir = $gacl_options[‘smarty_template_dir’];
$smarty->compile_dir = $gacl_options[‘smarty_compile_dir’];

/*
* Email address used in setup.php, please do not change.
*/
$author_email = ‘ipso@snappymail.ca’;

/*
* Don’t need to show notices, some of them are pretty lame and people get overly worried when they see them.
* Mean while I will try to fix most of these. :wink: Please submit patches if you find any I may have missed.
*/
error_reporting (E_ALL ^ E_NOTICE);

?>

I hope this is correct. I am still getting the same error as page 4 I sent you.

Step 4

Installing and Configuring Access Controls (php-GACL)…

Writing php-GACL configuration settings to config files…
Finished writing php-GACL configuration settings to config files.

Configuration:
driver = mysql,
host = localhost,
user = mytwirle_sraj49,
database = mytwirle_openemr,
table prefix = gacl_Testing database connection…
Success! Connected to "mysql" database on "localhost".
Testing database type…
Success! Compatible database type "mysql" detected!
Making sure database "mytwirle_openemr" exists…
Success! Good, database "mytwirle_openemr" already exists!
Failed! Failed creating tables. Please enable DEBUG mode (set it to TRUE in $gacl_options near top of admin/gacl_admin.inc.php) to see the error and try again. You will most likely need to delete any tables already created.
Failed! Please fix the above errors and try again.

OpenEMR ACL Setup
All done configuring and installing access controls (php-GACL)!
Gave the ‘admin’ user (password is ‘pass’) administrator access.

Done installing and configuring access controls (php-GACL).
Next step will configure PHP.

Should I eneble the Debug on gacl.inc.php file and try again. Isent you the sql corrections that came up.

Raj

sraj49 wrote on Friday, March 06, 2009:

I did not do anything with gacl.ini.php. I did the correction as you had suggested and cheked and sent you the message I am getting along with the corrected gacl/admin/gacl_admin.inc.php

bradymiller wrote on Friday, March 06, 2009:

hey,

Enable debug mode, the thing I’m interested in is the following stuff:
Option: smarty_dir 
ERROR: Config option: smarty_dir is not a valid option 
Option: smarty_template_dir 
ERROR: Config option: smarty_template_dir is not a valid option 
Option: smarty_compile_dir 
ERROR: Config option: smarty_compile_dir is not a valid option

Also need to see the php error log

It’s quite possible we’ll need to fix the paths in line 66 and 67 of the openemr/gacl/admin/gacl_admin.inc.php file, but lets first make sure were getting this one right.

-brady

sraj49 wrote on Friday, March 06, 2009:

Brady,

Can you please tell me how to enable the debug mode and in which file…

This is the php error log…

[05-Mar-2009 23:06:47] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 62
[05-Mar-2009 23:13:11] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 65
[05-Mar-2009 23:28:32] PHP Parse error:  syntax error, unexpected T_ELSE in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 51
[05-Mar-2009 23:41:17] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 79
[05-Mar-2009 23:46:38] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 81
[06-Mar-2009 11:28:36] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘smarty/libssmarty/lib/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 65
[06-Mar-2009 13:02:38] PHP Warning:  include_once(gacl/gacl.class.php) [<a href=‘function.include-once’>function.include-once</a>]: failed to open stream: No such file or directory in /home/mytwirle/public_html/openemr/library/acl.inc on line 82
[06-Mar-2009 13:02:38] PHP Warning:  include_once() [<a href=‘function.include’>function.include</a>]: Failed opening ‘gacl/gacl.class.php’ for inclusion (include_path=‘get_include_path:/home/mytwirle/public_html/openemr/gacl/admin//smarty/libs/’) in /home/mytwirle/public_html/openemr/library/acl.inc on line 82
[06-Mar-2009 13:02:38] PHP Warning:  include_once(gacl/gacl_api.class.php) [<a href=‘function.include-once’>function.include-once</a>]: failed to open stream: No such file or directory in /home/mytwirle/public_html/openemr/library/acl.inc on line 296
[06-Mar-2009 13:02:38] PHP Warning:  include_once() [<a href=‘function.include’>function.include</a>]: Failed opening ‘gacl/gacl_api.class.php’ for inclusion (include_path=‘get_include_path:/home/mytwirle/public_html/openemr/gacl/admin//smarty/libs/’) in /home/mytwirle/public_html/openemr/library/acl.inc on line 296
[06-Mar-2009 14:25:59] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘/home/mytwirle/public_html/openemr/gacl/adminsmarty/libs/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 62
[06-Mar-2009 14:28:26] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘/home/mytwirle/public_html/openemr/gacl/adminsmarty/libs/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 62
[06-Mar-2009 15:04:37] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘/smarty/libs/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 62
[06-Mar-2009 15:13:45] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘/smarty/libs/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 62
[06-Mar-2009 15:30:22] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘/smarty/libs/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 62
[06-Mar-2009 15:33:49] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘/smarty/libs/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 62
[06-Mar-2009 15:35:17] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘/smarty/libs/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 62

Thanks

Raj

bradymiller wrote on Friday, March 06, 2009:

hey,

I mean Debug TRUE in the gacl.ini.php file.

-brady

sraj49 wrote on Friday, March 06, 2009:

Brady,

I keptthe corrected Gacl/admin/gacl_admin.inc.php file as suggested by you , enabled the debug in gacl.ini.php and step 4 is as below.

OpenEMR Setup

Step 4

Installing and Configuring Access Controls (php-GACL)…

Writing php-GACL configuration settings to config files…
Finished writing php-GACL configuration settings to config files.

Option: db_type
Valid Config options: db_type
Option: db_host
Valid Config options: db_host
Option: db_user
Valid Config options: db_user
Option: db_password
Valid Config options: db_password
Option: db_name
Valid Config options: db_name
Option: db_table_prefix
Valid Config options: db_table_prefix
Option: caching
Valid Config options: caching
Option: force_cache_expire
Valid Config options: force_cache_expire
Option: cache_dir
Valid Config options: cache_dir
Option: cache_expire_time
Valid Config options: cache_expire_time
Option: items_per_page
Valid Config options: items_per_page
Option: max_select_box_items
Valid Config options: max_select_box_items
Option: max_search_return_items
Valid Config options: max_search_return_items
Option: smarty_dir
ERROR: Config option: smarty_dir is not a valid option
Option: smarty_template_dir
ERROR: Config option: smarty_template_dir is not a valid option
Option: smarty_compile_dir
ERROR: Config option: smarty_compile_dir is not a valid option
Configuration:
driver = mysql,
host = localhost,
user = mytwirle_sraj49,
database = mytwirle_openemr,
table prefix = gacl_Testing database connection…
Success! Connected to “mysql” database on “localhost”.
Testing database type…
Success! Compatible database type “mysql” detected!
Making sure database “mytwirle_openemr” exists…
(mysql): show databases 
Success! Good, database “mytwirle_openemr” already exists!
(mysql): select version() 
(mysql): SHOW INDEX FROM gacl_phpgacl 
1146: Table ‘mytwirle_openemr.gacl_phpgacl’ doesn’t exist
(mysql): SHOW COLUMNS FROM `gacl_phpgacl` 
1146: Table ‘mytwirle_openemr.gacl_phpgacl’ doesn’t exist
(mysql): SHOW INDEX FROM gacl_acl 
1146: Table ‘mytwirle_openemr.gacl_acl’ doesn’t exist
(mysql): SHOW COLUMNS FROM `gacl_acl` 
1146: Table ‘mytwirle_openemr.gacl_acl’ doesn’t exist
(mysql): SHOW INDEX FROM gacl_acl_sections 
1146: Table ‘mytwirle_openemr.gacl_acl_sections’ doesn’t exist
(mysql): SHOW COLUMNS FROM `gacl_acl_sections` 
1146: Table ‘mytwirle_openemr.gacl_acl_sections’ doesn’t exist
(mysql): SHOW INDEX FROM gacl_aco 
1146: Table ‘mytwirle_openemr.gacl_aco’ doesn’t exist
(mysql): SHOW COLUMNS FROM `gacl_aco` 
1146: Table ‘mytwirle_openemr.gacl_aco’ doesn’t exist
(mysql): SHOW INDEX FROM gacl_aco_map 
1146: Table ‘mytwirle_openemr.gacl_aco_map’ doesn’t exist
(mysql): SHOW COLUMNS FROM `gacl_aco_map` 
1146: Table ‘mytwirle_openemr.gacl_aco_map’ doesn’t exist
(mysql): SHOW INDEX FROM gacl_aco_sections 
1146: Table ‘mytwirle_openemr.gacl_aco_sections’ doesn’t exist
(mysql): SHOW COLUMNS FROM `gacl_aco_sections` 
1146: Table ‘mytwirle_openemr.gacl_aco_sections’ doesn’t exist
(mysql): SHOW INDEX FROM gacl_aro 
1146: Table ‘mytwirle_openemr.gacl_aro’ doesn’t exist
(mysql): SHOW COLUMNS FROM `gacl_aro` 
1146: Table ‘mytwirle_openemr.gacl_aro’ doesn’t exist
(mysql): SHOW INDEX FROM gacl_aro_map 
1146: Table ‘mytwirle_openemr.gacl_aro_map’ doesn’t exist
(mysql): SHOW COLUMNS FROM `gacl_aro_map` 
1146: Table ‘mytwirle_openemr.gacl_aro_map’ doesn’t exist
(mysql): SHOW INDEX FROM gacl_aro_sections 
1146: Table ‘mytwirle_openemr.gacl_aro_sections’ doesn’t exist
(mysql): SHOW COLUMNS FROM `gacl_aro_sections` 
1146: Table ‘mytwirle_openemr.gacl_aro_sections’ doesn’t exist
(mysql): SHOW INDEX FROM gacl_axo 
1146: Table ‘mytwirle_openemr.gacl_axo’ doesn’t exist
(mysql): SHOW COLUMNS FROM `gacl_axo` 
1146: Table ‘mytwirle_openemr.gacl_axo’ doesn’t exist
(mysql): SHOW INDEX FROM gacl_axo_map 
1146: Table ‘mytwirle_openemr.gacl_axo_map’ doesn’t exist
(mysql): SHOW COLUMNS FROM `gacl_axo_map` 
1146: Table ‘mytwirle_openemr.gacl_axo_map’ doesn’t exist
(mysql): SHOW INDEX FROM gacl_axo_sections 
1146: Table ‘mytwirle_openemr.gacl_axo_sections’ doesn’t exist
(mysql): SHOW COLUMNS FROM `gacl_axo_sections` 
1146: Table ‘mytwirle_openemr.gacl_axo_sections’ doesn’t exist
(mysql): SHOW INDEX FROM gacl_aro_groups 
1146: Table ‘mytwirle_openemr.gacl_aro_groups’ doesn’t exist
(mysql): SHOW COLUMNS FROM `gacl_aro_groups` 
1146: Table ‘mytwirle_openemr.gacl_aro_groups’ doesn’t exist
(mysql): SHOW INDEX FROM gacl_groups_aro_map 
1146: Table ‘mytwirle_openemr.gacl_groups_aro_map’ doesn’t exist
(mysql): SHOW COLUMNS FROM `gacl_groups_aro_map` 
1146: Table ‘mytwirle_openemr.gacl_groups_aro_map’ doesn’t exist
(mysql): SHOW INDEX FROM gacl_aro_groups_map 
1146: Table ‘mytwirle_openemr.gacl_aro_groups_map’ doesn’t exist
(mysql): SHOW COLUMNS FROM `gacl_aro_groups_map` 
1146: Table ‘mytwirle_openemr.gacl_aro_groups_map’ doesn’t exist
(mysql): SHOW INDEX FROM gacl_axo_groups 
1146: Table ‘mytwirle_openemr.gacl_axo_groups’ doesn’t exist
(mysql): SHOW COLUMNS FROM `gacl_axo_groups` 
1146: Table ‘mytwirle_openemr.gacl_axo_groups’ doesn’t exist
(mysql): SHOW INDEX FROM gacl_groups_axo_map 
1146: Table ‘mytwirle_openemr.gacl_groups_axo_map’ doesn’t exist
(mysql): SHOW COLUMNS FROM `gacl_groups_axo_map` 
1146: Table ‘mytwirle_openemr.gacl_groups_axo_map’ doesn’t exist
(mysql): SHOW INDEX FROM gacl_axo_groups_map 
1146: Table ‘mytwirle_openemr.gacl_axo_groups_map’ doesn’t exist
(mysql): SHOW COLUMNS FROM `gacl_axo_groups_map` 
1146: Table ‘mytwirle_openemr.gacl_axo_groups_map’ doesn’t exist
Here’s the SQL to do the build:
CREATE TABLE gacl_phpgacl (
name VARCHAR(230) NOT NULL,
value VARCHAR(230) NOT NULL,
PRIMARY KEY (name)
);

DELETE FROM gacl_phpgacl WHERE name=‘version’;

INSERT INTO gacl_phpgacl (name,value) VALUES (‘version’,‘3.3.7’);

DELETE FROM gacl_phpgacl WHERE name=‘schema_version’;

INSERT INTO gacl_phpgacl (name,value) VALUES (‘schema_version’,‘2.1’);

CREATE TABLE gacl_acl (
id INTEGER NOT NULL DEFAULT 0,
section_value VARCHAR(230) NOT NULL DEFAULT ‘system’,
allow INTEGER NOT NULL DEFAULT 0,
enabled INTEGER NOT NULL DEFAULT 0,
return_value TEXT,
note TEXT,
updated_date INTEGER NOT NULL DEFAULT 0,
PRIMARY KEY (id)
);

ALTER TABLE gacl_acl ADD INDEX gacl_enabled_acl (enabled);

ALTER TABLE gacl_acl ADD INDEX gacl_section_value_acl (section_value);

ALTER TABLE gacl_acl ADD INDEX gacl_updated_date_acl (updated_date);

CREATE TABLE gacl_acl_sections (
id INTEGER NOT NULL DEFAULT 0,
value VARCHAR(230) NOT NULL,
order_value INTEGER NOT NULL DEFAULT 0,
name VARCHAR(230) NOT NULL,
hidden INTEGER NOT NULL DEFAULT 0,
PRIMARY KEY (id)
);

ALTER TABLE gacl_acl_sections ADD UNIQUE INDEX gacl_value_acl_sections (value);

ALTER TABLE gacl_acl_sections ADD INDEX gacl_hidden_acl_sections (hidden);

DELETE FROM gacl_acl_sections WHERE id=1 AND value=‘system’;

INSERT INTO gacl_acl_sections (id,value,order_value,name) VALUES (1,‘system’,1,‘System’);

DELETE FROM gacl_acl_sections WHERE id=2 AND value=‘user’;

INSERT INTO gacl_acl_sections (id,value,order_value,name) VALUES (2,‘user’,2,‘User’);

CREATE TABLE gacl_aco (
id INTEGER NOT NULL DEFAULT 0,
section_value VARCHAR(240) NOT NULL DEFAULT ‘0’,
value VARCHAR(240) NOT NULL,
order_value INTEGER NOT NULL DEFAULT 0,
name VARCHAR(255) NOT NULL,
hidden INTEGER NOT NULL DEFAULT 0,
PRIMARY KEY (id)
);

ALTER TABLE gacl_aco ADD UNIQUE INDEX gacl_section_value_value_aco (section_value, value);

ALTER TABLE gacl_aco ADD INDEX gacl_hidden_aco (hidden);

CREATE TABLE gacl_aco_map (
acl_id INTEGER NOT NULL DEFAULT 0,
section_value VARCHAR(230) NOT NULL DEFAULT ‘0’,
value VARCHAR(230) NOT NULL,
PRIMARY KEY (acl_id, section_value, value)
);

CREATE TABLE gacl_aco_sections (
id INTEGER NOT NULL DEFAULT 0,
value VARCHAR(230) NOT NULL,
order_value INTEGER NOT NULL DEFAULT 0,
name VARCHAR(230) NOT NULL,
hidden INTEGER NOT NULL DEFAULT 0,
PRIMARY KEY (id)
);

ALTER TABLE gacl_aco_sections ADD UNIQUE INDEX gacl_value_aco_sections (value);

ALTER TABLE gacl_aco_sections ADD INDEX gacl_hidden_aco_sections (hidden);

CREATE TABLE gacl_aro (
id INTEGER NOT NULL DEFAULT 0,
section_value VARCHAR(240) NOT NULL DEFAULT ‘0’,
value VARCHAR(240) NOT NULL,
order_value INTEGER NOT NULL DEFAULT 0,
name VARCHAR(255) NOT NULL,
hidden INTEGER NOT NULL DEFAULT 0,
PRIMARY KEY (id)
);

ALTER TABLE gacl_aro ADD UNIQUE INDEX gacl_section_value_value_aro (section_value, value);

ALTER TABLE gacl_aro ADD INDEX gacl_hidden_aro (hidden);

CREATE TABLE gacl_aro_map (
acl_id INTEGER NOT NULL DEFAULT 0,
section_value VARCHAR(230) NOT NULL DEFAULT ‘0’,
value VARCHAR(230) NOT NULL,
PRIMARY KEY (acl_id, section_value, value)
);

CREATE TABLE gacl_aro_sections (
id INTEGER NOT NULL DEFAULT 0,
value VARCHAR(230) NOT NULL,
order_value INTEGER NOT NULL DEFAULT 0,
name VARCHAR(230) NOT NULL,
hidden INTEGER NOT NULL DEFAULT 0,
PRIMARY KEY (id)
);

ALTER TABLE gacl_aro_sections ADD UNIQUE INDEX gacl_value_aro_sections (value);

ALTER TABLE gacl_aro_sections ADD INDEX gacl_hidden_aro_sections (hidden);

CREATE TABLE gacl_axo (
id INTEGER NOT NULL DEFAULT 0,
section_value VARCHAR(240) NOT NULL DEFAULT ‘0’,
value VARCHAR(240) NOT NULL,
order_value INTEGER NOT NULL DEFAULT 0,
name VARCHAR(255) NOT NULL,
hidden INTEGER NOT NULL DEFAULT 0,
PRIMARY KEY (id)
);

ALTER TABLE gacl_axo ADD UNIQUE INDEX gacl_section_value_value_axo (section_value, value);

ALTER TABLE gacl_axo ADD INDEX gacl_hidden_axo (hidden);

CREATE TABLE gacl_axo_map (
acl_id INTEGER NOT NULL DEFAULT 0,
section_value VARCHAR(230) NOT NULL DEFAULT ‘0’,
value VARCHAR(230) NOT NULL,
PRIMARY KEY (acl_id, section_value, value)
);

CREATE TABLE gacl_axo_sections (
id INTEGER NOT NULL DEFAULT 0,
value VARCHAR(230) NOT NULL,
order_value INTEGER NOT NULL DEFAULT 0,
name VARCHAR(230) NOT NULL,
hidden INTEGER NOT NULL DEFAULT 0,
PRIMARY KEY (id)
);

ALTER TABLE gacl_axo_sections ADD UNIQUE INDEX gacl_value_axo_sections (value);

ALTER TABLE gacl_axo_sections ADD INDEX gacl_hidden_axo_sections (hidden);

CREATE TABLE gacl_aro_groups (
id INTEGER NOT NULL DEFAULT 0,
parent_id INTEGER NOT NULL DEFAULT 0,
lft INTEGER NOT NULL DEFAULT 0,
rgt INTEGER NOT NULL DEFAULT 0,
name VARCHAR(255) NOT NULL,
value VARCHAR(255) NOT NULL,
PRIMARY KEY (id, value)
);

ALTER TABLE gacl_aro_groups ADD INDEX gacl_parent_id_aro_groups (parent_id);

ALTER TABLE gacl_aro_groups ADD UNIQUE INDEX gacl_value_aro_groups (value);

ALTER TABLE gacl_aro_groups ADD INDEX gacl_lft_rgt_aro_groups (lft, rgt);

CREATE TABLE gacl_groups_aro_map (
group_id INTEGER NOT NULL DEFAULT 0,
aro_id INTEGER NOT NULL DEFAULT 0,
PRIMARY KEY (group_id, aro_id)
);

ALTER TABLE gacl_groups_aro_map ADD INDEX gacl_aro_id (aro_id);

CREATE TABLE gacl_aro_groups_map (
acl_id INTEGER NOT NULL DEFAULT 0,
group_id INTEGER NOT NULL DEFAULT 0,
PRIMARY KEY (acl_id, group_id)
);

CREATE TABLE gacl_axo_groups (
id INTEGER NOT NULL DEFAULT 0,
parent_id INTEGER NOT NULL DEFAULT 0,
lft INTEGER NOT NULL DEFAULT 0,
rgt INTEGER NOT NULL DEFAULT 0,
name VARCHAR(255) NOT NULL,
value VARCHAR(255) NOT NULL,
PRIMARY KEY (id, value)
);

ALTER TABLE gacl_axo_groups ADD INDEX gacl_parent_id_axo_groups (parent_id);

ALTER TABLE gacl_axo_groups ADD UNIQUE INDEX gacl_value_axo_groups (value);

ALTER TABLE gacl_axo_groups ADD INDEX gacl_lft_rgt_axo_groups (lft, rgt);

CREATE TABLE gacl_groups_axo_map (
group_id INTEGER NOT NULL DEFAULT 0,
axo_id INTEGER NOT NULL DEFAULT 0,
PRIMARY KEY (group_id, axo_id)
);

ALTER TABLE gacl_groups_axo_map ADD INDEX gacl_axo_id (axo_id);

CREATE TABLE gacl_axo_groups_map (
acl_id INTEGER NOT NULL DEFAULT 0,
group_id INTEGER NOT NULL DEFAULT 0,
PRIMARY KEY (acl_id, group_id)
);
(mysql): CREATE TABLE gacl_phpgacl ( name VARCHAR(230) NOT NULL, value VARCHAR(230) NOT NULL, PRIMARY KEY (name) ) 
(mysql): DELETE FROM gacl_phpgacl WHERE name=‘version’ 
(mysql): INSERT INTO gacl_phpgacl (name,value) VALUES (‘version’,‘3.3.7’) 
(mysql): DELETE FROM gacl_phpgacl WHERE name=‘schema_version’ 
(mysql): INSERT INTO gacl_phpgacl (name,value) VALUES (‘schema_version’,‘2.1’) 
(mysql): CREATE TABLE gacl_acl ( id INTEGER NOT NULL DEFAULT 0, section_value VARCHAR(230) NOT NULL DEFAULT ‘system’, allow INTEGER NOT NULL DEFAULT 0, enabled INTEGER NOT NULL DEFAULT 0, return_value TEXT, note TEXT, updated_date INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (id) ) 
(mysql): ALTER TABLE gacl_acl ADD INDEX gacl_enabled_acl (enabled) 
(mysql): ALTER TABLE gacl_acl ADD INDEX gacl_section_value_acl (section_value) 
(mysql): ALTER TABLE gacl_acl ADD INDEX gacl_updated_date_acl (updated_date) 
(mysql): CREATE TABLE gacl_acl_sections ( id INTEGER NOT NULL DEFAULT 0, value VARCHAR(230) NOT NULL, order_value INTEGER NOT NULL DEFAULT 0, name VARCHAR(230) NOT NULL, hidden INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (id) ) 
(mysql): ALTER TABLE gacl_acl_sections ADD UNIQUE INDEX gacl_value_acl_sections (value) 
(mysql): ALTER TABLE gacl_acl_sections ADD INDEX gacl_hidden_acl_sections (hidden) 
(mysql): DELETE FROM gacl_acl_sections WHERE id=1 AND value=‘system’ 
(mysql): INSERT INTO gacl_acl_sections (id,value,order_value,name) VALUES (1,‘system’,1,‘System’) 
(mysql): DELETE FROM gacl_acl_sections WHERE id=2 AND value=‘user’ 
(mysql): INSERT INTO gacl_acl_sections (id,value,order_value,name) VALUES (2,‘user’,2,‘User’) 
(mysql): CREATE TABLE gacl_aco ( id INTEGER NOT NULL DEFAULT 0, section_value VARCHAR(240) NOT NULL DEFAULT ‘0’, value VARCHAR(240) NOT NULL, order_value INTEGER NOT NULL DEFAULT 0, name VARCHAR(255) NOT NULL, hidden INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (id) ) 
(mysql): ALTER TABLE gacl_aco ADD UNIQUE INDEX gacl_section_value_value_aco (section_value, value) 
1071: Specified key was too long; max key length is 1000 bytes
(mysql): ALTER TABLE gacl_aco ADD INDEX gacl_hidden_aco (hidden) 
(mysql): CREATE TABLE gacl_aco_map ( acl_id INTEGER NOT NULL DEFAULT 0, section_value VARCHAR(230) NOT NULL DEFAULT ‘0’, value VARCHAR(230) NOT NULL, PRIMARY KEY (acl_id, section_value, value) ) 
1071: Specified key was too long; max key length is 1000 bytes
(mysql): CREATE TABLE gacl_aco_sections ( id INTEGER NOT NULL DEFAULT 0, value VARCHAR(230) NOT NULL, order_value INTEGER NOT NULL DEFAULT 0, name VARCHAR(230) NOT NULL, hidden INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (id) ) 
(mysql): ALTER TABLE gacl_aco_sections ADD UNIQUE INDEX gacl_value_aco_sections (value) 
(mysql): ALTER TABLE gacl_aco_sections ADD INDEX gacl_hidden_aco_sections (hidden) 
(mysql): CREATE TABLE gacl_aro ( id INTEGER NOT NULL DEFAULT 0, section_value VARCHAR(240) NOT NULL DEFAULT ‘0’, value VARCHAR(240) NOT NULL, order_value INTEGER NOT NULL DEFAULT 0, name VARCHAR(255) NOT NULL, hidden INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (id) ) 
(mysql): ALTER TABLE gacl_aro ADD UNIQUE INDEX gacl_section_value_value_aro (section_value, value) 
1071: Specified key was too long; max key length is 1000 bytes
(mysql): ALTER TABLE gacl_aro ADD INDEX gacl_hidden_aro (hidden) 
(mysql): CREATE TABLE gacl_aro_map ( acl_id INTEGER NOT NULL DEFAULT 0, section_value VARCHAR(230) NOT NULL DEFAULT ‘0’, value VARCHAR(230) NOT NULL, PRIMARY KEY (acl_id, section_value, value) ) 
1071: Specified key was too long; max key length is 1000 bytes
(mysql): CREATE TABLE gacl_aro_sections ( id INTEGER NOT NULL DEFAULT 0, value VARCHAR(230) NOT NULL, order_value INTEGER NOT NULL DEFAULT 0, name VARCHAR(230) NOT NULL, hidden INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (id) ) 
(mysql): ALTER TABLE gacl_aro_sections ADD UNIQUE INDEX gacl_value_aro_sections (value) 
(mysql): ALTER TABLE gacl_aro_sections ADD INDEX gacl_hidden_aro_sections (hidden) 
(mysql): CREATE TABLE gacl_axo ( id INTEGER NOT NULL DEFAULT 0, section_value VARCHAR(240) NOT NULL DEFAULT ‘0’, value VARCHAR(240) NOT NULL, order_value INTEGER NOT NULL DEFAULT 0, name VARCHAR(255) NOT NULL, hidden INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (id) ) 
(mysql): ALTER TABLE gacl_axo ADD UNIQUE INDEX gacl_section_value_value_axo (section_value, value) 
1071: Specified key was too long; max key length is 1000 bytes
(mysql): ALTER TABLE gacl_axo ADD INDEX gacl_hidden_axo (hidden) 
(mysql): CREATE TABLE gacl_axo_map ( acl_id INTEGER NOT NULL DEFAULT 0, section_value VARCHAR(230) NOT NULL DEFAULT ‘0’, value VARCHAR(230) NOT NULL, PRIMARY KEY (acl_id, section_value, value) ) 
1071: Specified key was too long; max key length is 1000 bytes
(mysql): CREATE TABLE gacl_axo_sections ( id INTEGER NOT NULL DEFAULT 0, value VARCHAR(230) NOT NULL, order_value INTEGER NOT NULL DEFAULT 0, name VARCHAR(230) NOT NULL, hidden INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (id) ) 
(mysql): ALTER TABLE gacl_axo_sections ADD UNIQUE INDEX gacl_value_axo_sections (value) 
(mysql): ALTER TABLE gacl_axo_sections ADD INDEX gacl_hidden_axo_sections (hidden) 
(mysql): CREATE TABLE gacl_aro_groups ( id INTEGER NOT NULL DEFAULT 0, parent_id INTEGER NOT NULL DEFAULT 0, lft INTEGER NOT NULL DEFAULT 0, rgt INTEGER NOT NULL DEFAULT 0, name VARCHAR(255) NOT NULL, value VARCHAR(255) NOT NULL, PRIMARY KEY (id, value) ) 
(mysql): ALTER TABLE gacl_aro_groups ADD INDEX gacl_parent_id_aro_groups (parent_id) 
(mysql): ALTER TABLE gacl_aro_groups ADD UNIQUE INDEX gacl_value_aro_groups (value) 
(mysql): ALTER TABLE gacl_aro_groups ADD INDEX gacl_lft_rgt_aro_groups (lft, rgt) 
(mysql): CREATE TABLE gacl_groups_aro_map ( group_id INTEGER NOT NULL DEFAULT 0, aro_id INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (group_id, aro_id) ) 
(mysql): ALTER TABLE gacl_groups_aro_map ADD INDEX gacl_aro_id (aro_id) 
(mysql): CREATE TABLE gacl_aro_groups_map ( acl_id INTEGER NOT NULL DEFAULT 0, group_id INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (acl_id, group_id) ) 
(mysql): CREATE TABLE gacl_axo_groups ( id INTEGER NOT NULL DEFAULT 0, parent_id INTEGER NOT NULL DEFAULT 0, lft INTEGER NOT NULL DEFAULT 0, rgt INTEGER NOT NULL DEFAULT 0, name VARCHAR(255) NOT NULL, value VARCHAR(255) NOT NULL, PRIMARY KEY (id, value) ) 
(mysql): ALTER TABLE gacl_axo_groups ADD INDEX gacl_parent_id_axo_groups (parent_id) 
(mysql): ALTER TABLE gacl_axo_groups ADD UNIQUE INDEX gacl_value_axo_groups (value) 
(mysql): ALTER TABLE gacl_axo_groups ADD INDEX gacl_lft_rgt_axo_groups (lft, rgt) 
(mysql): CREATE TABLE gacl_groups_axo_map ( group_id INTEGER NOT NULL DEFAULT 0, axo_id INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (group_id, axo_id) ) 
(mysql): ALTER TABLE gacl_groups_axo_map ADD INDEX gacl_axo_id (axo_id) 
(mysql): CREATE TABLE gacl_axo_groups_map ( acl_id INTEGER NOT NULL DEFAULT 0, group_id INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (acl_id, group_id) ) 
Failed! Failed creating tables. Please enable DEBUG mode (set it to TRUE in $gacl_options near top of admin/gacl_admin.inc.php) to see the error and try again. You will most likely need to delete any tables already created.
Failed! Please fix the above errors and try again.

OpenEMR ACL Setup
All done configuring and installing access controls (php-GACL)!
Gave the ‘admin’ user (password is ‘pass’) administrator access.

Done installing and configuring access controls (php-GACL).
Next step will configure PHP.

THE PHP ERROR LOG is as below.

[05-Mar-2009 23:06:47] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 62
[05-Mar-2009 23:13:11] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 65
[05-Mar-2009 23:28:32] PHP Parse error:  syntax error, unexpected T_ELSE in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 51
[05-Mar-2009 23:41:17] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 79
[05-Mar-2009 23:46:38] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 81
[06-Mar-2009 11:28:36] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘smarty/libssmarty/lib/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 65
[06-Mar-2009 13:02:38] PHP Warning:  include_once(gacl/gacl.class.php) [<a href=‘function.include-once’>function.include-once</a>]: failed to open stream: No such file or directory in /home/mytwirle/public_html/openemr/library/acl.inc on line 82
[06-Mar-2009 13:02:38] PHP Warning:  include_once() [<a href=‘function.include’>function.include</a>]: Failed opening ‘gacl/gacl.class.php’ for inclusion (include_path=‘get_include_path:/home/mytwirle/public_html/openemr/gacl/admin//smarty/libs/’) in /home/mytwirle/public_html/openemr/library/acl.inc on line 82
[06-Mar-2009 13:02:38] PHP Warning:  include_once(gacl/gacl_api.class.php) [<a href=‘function.include-once’>function.include-once</a>]: failed to open stream: No such file or directory in /home/mytwirle/public_html/openemr/library/acl.inc on line 296
[06-Mar-2009 13:02:38] PHP Warning:  include_once() [<a href=‘function.include’>function.include</a>]: Failed opening ‘gacl/gacl_api.class.php’ for inclusion (include_path=‘get_include_path:/home/mytwirle/public_html/openemr/gacl/admin//smarty/libs/’) in /home/mytwirle/public_html/openemr/library/acl.inc on line 296
[06-Mar-2009 14:25:59] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘/home/mytwirle/public_html/openemr/gacl/adminsmarty/libs/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 62
[06-Mar-2009 14:28:26] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘/home/mytwirle/public_html/openemr/gacl/adminsmarty/libs/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 62
[06-Mar-2009 15:04:37] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘/smarty/libs/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 62
[06-Mar-2009 15:13:45] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘/smarty/libs/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 62
[06-Mar-2009 15:30:22] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘/smarty/libs/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 62
[06-Mar-2009 15:33:49] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘/smarty/libs/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 62
[06-Mar-2009 15:35:17] PHP Fatal error:  require_once() [<a href=‘function.require’>function.require</a>]: Failed opening required ‘/smarty/libs/Smarty.class.php’ (include_path=’.:/usr/local/php52/pear’) in /home/mytwirle/public_html/openemr/gacl/admin/gacl_admin.inc.php on line 62

Raj

sraj49 wrote on Friday, March 06, 2009:

Funny, the debugged lg says gacl_acl, gal_acl_sections etc do not exists but they are there in MySql… It also says create gacl_axo table whereas the table exists.

May be I am reading it wrong…You can guide me…

Raj