phpGACL Database Setup Error

dr_smit wrote on Thursday, April 17, 2008:

http://localhost/phpgacl/setup.php  leads to:-

phpGACL Database Setup

Configuration:
driver = mysql,
host = localhost,
user = root,
database = gacl,
table prefix =
Testing database connection…
Success! Connected to "mysql" database on "localhost".
Testing database type…
Success! Compatible database type "mysql" detected!
Making sure database "gacl" exists…
Success! Good, database "gacl" 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.

Just when I thought installation was over… Please help as I am too eager to start using openenmr

cfapress wrote on Thursday, April 17, 2008:

I’m going to take a quick stab at this. Just because the gacl database exists doesn’t mean the username you’re using has permission to modify it. From your parameters listed it looks like you’re connected with the MySQL root user which “should” have full access to all databases in the system. Sometimes “should” can mean “doesn’t”.

If you’re familiar with granting MySQL permissions I suggest check out what the root user has access to.
If you’re not familiar, you may need to become so. Check out the MySQL documentation for granting permissions to databases:

GRANT ALL ON gacl.* TO ‘root’@‘localhost’;

http://dev.mysql.com/doc/refman/5.0/en/grant.html

Jason

dr_smit wrote on Friday, April 18, 2008:

Please excuse my dumbness but I failed to understand or follow the mysql doc and I am still struck…

dr_smit wrote on Saturday, April 19, 2008:

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 gather that I have to remove some table?

there is no DEBUG in $gacl_options in admin/gacl_admin.inc.php

please suggest what to do to get an understanding of the matter…

dr_smit wrote on Saturday, April 19, 2008:

4. Next, need to upgrade the php-GACL access controls. Download
      acl_upgrade_1.txt file, which is a php script. I wrote this script, and it
      seems to work alright. File can be found at:
      http://bradymd.com/acl_upgrade_1.txt (to download file, you may
      need to Right-Click the link and select ‘Save Link As…’)
      1. Enter below bolded instructions on command line as root user:
               #log into root
               su
               #copy upgrade script to openemr directory (note that the
                   ‘.txt’ is being changed to ‘.php’)
               mv /location/to/file/acl_upgrade_1.txt
                   /var/www/html/openemr/acl_upgrade_1.php
      2. Run php-gacl upgrade script via :
      http://localhost/openemr/acl_upgrade_1.php

Do I need to do all this if I am directly installing openemr-2.8.3?

bradymiller wrote on Saturday, April 19, 2008:

hey,

  Short answer is no.

  Brief Background:
    These instructions are specific to UPGRADING from 2.8.2 to 2.8.3 only. Note that the phpgacl UPGRADE script can now be found within OpenEMR in the current CVS version(/openemr/acl_upgrade.php)), which should be used if UPGRADING to CVS. For a NEW installation you ONLY need to run the /openemr/acl_install.php setup script.

-Brady

dr_smit wrote on Sunday, April 20, 2008:

thanks…
I have no understanding of Mysql Phpgacl… so my problem is like one in Greek or Latin to me
I tried
1.reinstalling phpgacl;
2.DROP DATABASE gacl; then CREATE DATABASE gacl;
Please help me out;
or suggest if I can proceed further with the above mentioned FAILED reports?
I am eager to start using openemr

bradymiller wrote on Sunday, April 20, 2008:

hey,

Couple quick questions:
1. Your operating system?
1. Versions of php and mysql?
2. Does OpenEMR work?

You should get much more information from the php error log (if mandriva, usually found at /var/log/httpd/error_log). I’d re-run the setup.php script and see what errors you get in the log. I’m guessing it will have to do with mysql access as CFAPress suggest. I wouldn’t go ahead with the FAILED report at this point; needs some troubleshooting first.

-Brady

dr_smit wrote on Sunday, April 20, 2008:

Mandriva 2008.0
php-5.2.4-2mdv2008.0
mysql-5.0.45-8.1mdv2008.0
apache-mpm-prefork-2.2.6-8.1mdv2008.0
postgresql8.2-8.2.6-0.1mdv2008.0
openemr-2.8.3
freeb-0.13

openemr works well expcept that I did not see any ADMINISTRATOR option nor could I log in as ‘admin’ with ‘pass’
but it gives administrative rights to me (may be because I changed admin to myself while installing openemr)

dr_smit wrote on Sunday, April 20, 2008:

in /var/log/hhtpd/error_log  I feel this is what that can point:-

[Sun Apr 20 08:13:33 2008] [notice] core dump file size limit raised to 4294967295 bytes
[Sun Apr 20 08:13:34 2008] [notice] Digest: generating secret for digest authentication …
[Sun Apr 20 08:13:34 2008] [notice] Digest: done
[Sun Apr 20 08:13:43 2008] [notice] Apache/2.2.6 (Mandriva Linux/PREFORK-8.1mdv2008.0) mod_ssl/2.2.6 OpenSSL/0.9.8e PHP/5.2.4 with Suhosin-Patch mod_perl/2.0.3 Perl/v5.8.8 configured – resuming normal operations
[Sun Apr 20 11:31:57 2008] [warn] child process 6568 still did not exit, sending a SIGTERM
[Sun Apr 20 11:31:57 2008] [warn] child process 6569 still did not exit, sending a SIGTERM
[Sun Apr 20 11:31:57 2008] [warn] child process 6571 still did not exit, sending a SIGTERM
[Sun Apr 20 11:31:57 2008] [warn] child process 6572 still did not exit, sending a SIGTERM
[Sun Apr 20 11:31:57 2008] [warn] child process 6573 still did not exit, sending a SIGTERM
[Sun Apr 20 11:31:57 2008] [warn] child process 6574 still did not exit, sending a SIGTERM
[Sun Apr 20 11:31:57 2008] [warn] child process 6575 still did not exit, sending a SIGTERM
[Sun Apr 20 11:31:57 2008] [warn] child process 6576 still did not exit, sending a SIGTERM

[Sun Apr 20 17:41:26 2008] [notice] core dump file size limit raised to 4294967295 bytes
[Sun Apr 20 17:41:27 2008] [notice] Digest: generating secret for digest authentication …
[Sun Apr 20 17:41:27 2008] [notice] Digest: done
[Sun Apr 20 17:41:35 2008] [notice] Apache/2.2.6 (Mandriva Linux/PREFORK-8.1mdv2008.0) mod_ssl/2.2.6 OpenSSL/0.9.8e PHP/5.2.4 with Suhosin-Patch mod_perl/2.0.3 Perl/v5.8.8 configured – resuming normal operations

dr_smit wrote on Monday, April 21, 2008:

i have my localhost as ‘smitdesk’---- I could proceed after granting root password to both smitdesk and localhost but this is where i got http://localhost/phpgacl/setup.php or http://smitdesk/phpgacl/setup.php  now results in:–

Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user ‘root’@‘localhost’ (using password: NO) in /var/www/html/phpgacl/adodb/drivers/adodb-mysql.inc.php on line 376
phpGACL Database Setup

Configuration:
driver = mysql,
host = localhost,
user = root,
database = gacl,
table prefix =
Testing database connection…
Failed! ERROR connecting to database,
are you sure you specified the proper host, user name, password, and database in admin/gacl_admin.inc.php?
Did you create the database, and give read/write permissions to "root" already?

dr_smit wrote on Monday, April 21, 2008:

I am dizzy now!!!

dr_smit wrote on Tuesday, April 22, 2008:

http://dev.mysql.com/doc/refman/5.0/en/access-denied.html

I think I will have to start from the beginning again and reinstall MYSQL

any suggestions?

bradymiller wrote on Wednesday, April 23, 2008:

hey,
Openemr creates it’s own user/password combo for mysql, which is why your openemr works.

Definitely looks like a mysql access issue. My mysql skill are minimal, especially on granting permissions, but since no one else is speaking up… If you have a mysql root password, you need to type it into file /phpgacl/gacl.ini.php . If you have no important data, then starting from scratch is always a good idea. My experience on Mandriva2008 is that mysql works right out of box with phpgacl.

-Brady

dr_smit wrote on Saturday, April 26, 2008:

on klicking – [install dB] at {16  Prior Authorization Form   registered} while installing freeb, i get:

ERROR: query failed: CREATE TABLE `form_prior_auth` ( `id` int(11) NOT NULL auto_increment, `pid` int(11) default NULL, `activity` tinyint(4) NOT NULL default ‘0’, `date` datetime NOT NULL default ‘0000-00-00 00:00:00’, `prior_auth_number` varchar(35) default NULL, `comments` varchar(255) default NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM (Table ‘form_prior_auth’ already exists)

dr_smit wrote on Sunday, April 27, 2008:

after many many many many errors and hurdles in re-installing every thing I have reached the same error point I started from:

Please help me, it’s becoming depressing now…

http://smitdesk/phpgacl/setup.php    leads to:

Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user ‘root’@‘localhost’ (using password: NO) in /var/www/html/phpgacl/adodb/drivers/adodb-mysql.inc.php on line 376
phpGACL Database Setup

Configuration:
driver = mysql,
host = localhost,
user = root,
database = gacl,
table prefix =
Testing database connection…
Failed! ERROR connecting to database,
are you sure you specified the proper host, user name, password, and database in admin/gacl_admin.inc.php?
Did you create the database, and give read/write permissions to "root" already?

the admin/gacl_admin.inc.php     reads as:

<?php
/*
* You may contact the author of phpGACL by e-mail at:
* ipso@snappymail.ca
*

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($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);

?>

my mysql has a root password-- where do I put it here??
I have tried with localhostname as ‘localhost’ and ‘smitdesk’ both but the end result is the same

in mysql I have done –  SET PASSWORD ‘root’@‘localhost’=PASSWORD(‘xxxxmysqlpasswordxxx’);

now what’s the error and remedy???

dr_smit wrote on Sunday, April 27, 2008:

I put the password for database in /gacl.ini.php and made some progress this was the furtherest that I have progressed in last 1 year trying to install openemr:

what next to be done?? now http://smitdesk/phpgacl/setup.php   leads to

phpGACL Database Setup

Configuration:
driver = mysql,
host = localhost,
user = root,
database = gacl,
table prefix =
Testing database connection…
Success! Connected to "mysql" database on "localhost".
Testing database type…
Success! Compatible database type "mysql" detected!
Making sure database "gacl" exists…
Success! Good, database "gacl" 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.

dr_smit wrote on Sunday, April 27, 2008:

Failed! Failed creating tables. Please enable DEBUG mode (set it to TRUE in $gacl_options near top of admin/gacl_admin.inc.php)

for some noob like I…

DEBUG option is located in gacl.ini.php and not in gacl_admin.inc.php

Setting Debug=true results in http://smitdesk/phpgacl/setup.php    showing the following errors I am yet to decipher… Help!! Help!!

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
phpGACL Database Setup

Configuration:
driver = mysql,
host = localhost,
user = root,
database = gacl,
table prefix =
Testing database connection…
Success! Connected to “mysql” database on “localhost”.
Testing database type…
Success! Compatible database type “mysql” detected!
Making sure database “gacl” exists…
(mysql): show databases   Success! Good, database “gacl” already exists!
(mysql): select version()   (mysql): SHOW INDEX FROM phpgacl   (mysql): SHOW COLUMNS FROM `phpgacl`   (mysql): SHOW COLUMNS FROM `phpgacl`   (mysql): SHOW INDEX FROM acl   (mysql): SHOW COLUMNS FROM `acl`   (mysql): SHOW COLUMNS FROM `acl`   (mysql): SHOW INDEX FROM acl_sections   (mysql): SHOW COLUMNS FROM `acl_sections`   (mysql): SHOW COLUMNS FROM `acl_sections`   (mysql): SHOW INDEX FROM aco   (mysql): SHOW COLUMNS FROM `aco`   (mysql): SHOW COLUMNS FROM `aco`   (mysql): SHOW INDEX FROM aco_map   1146: Table ‘gacl.aco_map’ doesn’t exist
(mysql): SHOW COLUMNS FROM `aco_map`   1146: Table ‘gacl.aco_map’ doesn’t exist
(mysql): SHOW INDEX FROM aco_sections   (mysql): SHOW COLUMNS FROM `aco_sections`   (mysql): SHOW COLUMNS FROM `aco_sections`   (mysql): SHOW INDEX FROM aro   (mysql): SHOW COLUMNS FROM `aro`   (mysql): SHOW COLUMNS FROM `aro`   (mysql): SHOW INDEX FROM aro_map   1146: Table ‘gacl.aro_map’ doesn’t exist
(mysql): SHOW COLUMNS FROM `aro_map`   1146: Table ‘gacl.aro_map’ doesn’t exist
(mysql): SHOW INDEX FROM aro_sections   (mysql): SHOW COLUMNS FROM `aro_sections`   (mysql): SHOW COLUMNS FROM `aro_sections`   (mysql): SHOW INDEX FROM axo   (mysql): SHOW COLUMNS FROM `axo`   (mysql): SHOW COLUMNS FROM `axo`   (mysql): SHOW INDEX FROM axo_map   1146: Table ‘gacl.axo_map’ doesn’t exist
(mysql): SHOW COLUMNS FROM `axo_map`   1146: Table ‘gacl.axo_map’ doesn’t exist
(mysql): SHOW INDEX FROM axo_sections   (mysql): SHOW COLUMNS FROM `axo_sections`   (mysql): SHOW COLUMNS FROM `axo_sections`   (mysql): SHOW INDEX FROM aro_groups   (mysql): SHOW COLUMNS FROM `aro_groups`   (mysql): SHOW COLUMNS FROM `aro_groups`   (mysql): SHOW INDEX FROM groups_aro_map   (mysql): SHOW COLUMNS FROM `groups_aro_map`   (mysql): SHOW COLUMNS FROM `groups_aro_map`   (mysql): SHOW INDEX FROM aro_groups_map   (mysql): SHOW COLUMNS FROM `aro_groups_map`   (mysql): SHOW COLUMNS FROM `aro_groups_map`   (mysql): SHOW INDEX FROM axo_groups   (mysql): SHOW COLUMNS FROM `axo_groups`   (mysql): SHOW COLUMNS FROM `axo_groups`   (mysql): SHOW INDEX FROM groups_axo_map   (mysql): SHOW COLUMNS FROM `groups_axo_map`   (mysql): SHOW COLUMNS FROM `groups_axo_map`   (mysql): SHOW INDEX FROM axo_groups_map   (mysql): SHOW COLUMNS FROM `axo_groups_map`   (mysql): SHOW COLUMNS FROM `axo_groups_map`   Here’s the SQL to do the build:
DELETE FROM phpgacl WHERE name=‘version’;

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

DELETE FROM phpgacl WHERE name=‘schema_version’;

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

DROP INDEX enabled_acl ON acl;

DROP INDEX section_value_acl ON acl;

DROP INDEX updated_date_acl ON acl;

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

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

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

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

ALTER TABLE acl ADD INDEX enabled_acl (enabled);

ALTER TABLE acl ADD INDEX section_value_acl (section_value);

ALTER TABLE acl ADD INDEX updated_date_acl (updated_date);

DROP INDEX value_acl_sections ON acl_sections;

DROP INDEX hidden_acl_sections ON acl_sections;

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

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

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

ALTER TABLE acl_sections ADD UNIQUE INDEX value_acl_sections (value);

ALTER TABLE acl_sections ADD INDEX hidden_acl_sections (hidden);

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

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

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

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

DROP INDEX hidden_aco ON aco;

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

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

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

ALTER TABLE aco ADD UNIQUE INDEX section_value_value_aco (section_value, value);

ALTER TABLE aco ADD INDEX hidden_aco (hidden);

CREATE TABLE 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 value_aco_sections ON aco_sections;

DROP INDEX hidden_aco_sections ON aco_sections;

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

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

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

ALTER TABLE aco_sections ADD UNIQUE INDEX value_aco_sections (value);

ALTER TABLE aco_sections ADD INDEX hidden_aco_sections (hidden);

DROP INDEX hidden_aro ON aro;

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

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

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

ALTER TABLE aro ADD UNIQUE INDEX section_value_value_aro (section_value, value);

ALTER TABLE aro ADD INDEX hidden_aro (hidden);

CREATE TABLE 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 value_aro_sections ON aro_sections;

DROP INDEX hidden_aro_sections ON aro_sections;

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

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

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

ALTER TABLE aro_sections ADD UNIQUE INDEX value_aro_sections (value);

ALTER TABLE aro_sections ADD INDEX hidden_aro_sections (hidden);

DROP INDEX hidden_axo ON axo;

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

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

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

ALTER TABLE axo ADD UNIQUE INDEX section_value_value_axo (section_value, value);

ALTER TABLE axo ADD INDEX hidden_axo (hidden);

CREATE TABLE 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 value_axo_sections ON axo_sections;

DROP INDEX hidden_axo_sections ON axo_sections;

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

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

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

ALTER TABLE axo_sections ADD UNIQUE INDEX value_axo_sections (value);

ALTER TABLE axo_sections ADD INDEX hidden_axo_sections (hidden);

DROP INDEX value_aro_groups ON aro_groups;

DROP INDEX parent_id_aro_groups ON aro_groups;

DROP INDEX lft_rgt_aro_groups ON aro_groups;

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

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

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

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

ALTER TABLE aro_groups ADD INDEX parent_id_aro_groups (parent_id);

ALTER TABLE aro_groups ADD UNIQUE INDEX value_aro_groups (value);

ALTER TABLE aro_groups ADD INDEX lft_rgt_aro_groups (lft, rgt);

DROP INDEX aro_id ON groups_aro_map;

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

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

ALTER TABLE groups_aro_map ADD INDEX aro_id (aro_id);

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

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

DROP INDEX value_axo_groups ON axo_groups;

DROP INDEX parent_id_axo_groups ON axo_groups;

DROP INDEX lft_rgt_axo_groups ON axo_groups;

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

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

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

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

ALTER TABLE axo_groups ADD INDEX parent_id_axo_groups (parent_id);

ALTER TABLE axo_groups ADD UNIQUE INDEX value_axo_groups (value);

ALTER TABLE axo_groups ADD INDEX lft_rgt_axo_groups (lft, rgt);

DROP INDEX axo_id ON groups_axo_map;

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

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

ALTER TABLE groups_axo_map ADD INDEX axo_id (axo_id);

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

ALTER TABLE axo_groups_map MODIFY COLUMN group_id INTEGER NOT NULL DEFAULT 0; (mysql): DELETE FROM phpgacl WHERE name=‘version’   (mysql): INSERT INTO phpgacl (name,value) VALUES (‘version’,‘3.3.7’)   (mysql): DELETE FROM phpgacl WHERE name=‘schema_version’   (mysql): INSERT INTO phpgacl (name,value) VALUES (‘schema_version’,‘2.1’)   (mysql): DROP INDEX enabled_acl ON acl   (mysql): DROP INDEX section_value_acl ON acl   (mysql): DROP INDEX updated_date_acl ON acl   (mysql): ALTER TABLE acl MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE acl MODIFY COLUMN allow INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE acl MODIFY COLUMN enabled INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE acl MODIFY COLUMN updated_date INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE acl ADD INDEX enabled_acl (enabled)   (mysql): ALTER TABLE acl ADD INDEX section_value_acl (section_value)   (mysql): ALTER TABLE acl ADD INDEX updated_date_acl (updated_date)   (mysql): DROP INDEX value_acl_sections ON acl_sections   (mysql): DROP INDEX hidden_acl_sections ON acl_sections   (mysql): ALTER TABLE acl_sections MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE acl_sections MODIFY COLUMN order_value INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE acl_sections MODIFY COLUMN hidden INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE acl_sections ADD UNIQUE INDEX value_acl_sections (value)   (mysql): ALTER TABLE acl_sections ADD INDEX hidden_acl_sections (hidden)   (mysql): DELETE FROM acl_sections WHERE id=1 AND value=‘system’   (mysql): INSERT INTO acl_sections (id,value,order_value,name) VALUES (1,‘system’,1,‘System’)   (mysql): DELETE FROM acl_sections WHERE id=2 AND value=‘user’   (mysql): INSERT INTO acl_sections (id,value,order_value,name) VALUES (2,‘user’,2,‘User’)   (mysql): DROP INDEX hidden_aco ON aco   (mysql): ALTER TABLE aco MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE aco MODIFY COLUMN order_value INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE aco MODIFY COLUMN hidden INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE aco ADD UNIQUE INDEX section_value_value_aco (section_value, value)   1071: Specified key was too long; max key length is 1000 bytes
(mysql): ALTER TABLE aco ADD INDEX hidden_aco (hidden)   (mysql): CREATE TABLE 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 value_aco_sections ON aco_sections   (mysql): DROP INDEX hidden_aco_sections ON aco_sections   (mysql): ALTER TABLE aco_sections MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE aco_sections MODIFY COLUMN order_value INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE aco_sections MODIFY COLUMN hidden INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE aco_sections ADD UNIQUE INDEX value_aco_sections (value)   (mysql): ALTER TABLE aco_sections ADD INDEX hidden_aco_sections (hidden)   (mysql): DROP INDEX hidden_aro ON aro   (mysql): ALTER TABLE aro MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE aro MODIFY COLUMN order_value INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE aro MODIFY COLUMN hidden INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE aro ADD UNIQUE INDEX section_value_value_aro (section_value, value)   1071: Specified key was too long; max key length is 1000 bytes
(mysql): ALTER TABLE aro ADD INDEX hidden_aro (hidden)   (mysql): CREATE TABLE 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 value_aro_sections ON aro_sections   (mysql): DROP INDEX hidden_aro_sections ON aro_sections   (mysql): ALTER TABLE aro_sections MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE aro_sections MODIFY COLUMN order_value INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE aro_sections MODIFY COLUMN hidden INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE aro_sections ADD UNIQUE INDEX value_aro_sections (value)   (mysql): ALTER TABLE aro_sections ADD INDEX hidden_aro_sections (hidden)   (mysql): DROP INDEX hidden_axo ON axo   (mysql): ALTER TABLE axo MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE axo MODIFY COLUMN order_value INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE axo MODIFY COLUMN hidden INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE axo ADD UNIQUE INDEX section_value_value_axo (section_value, value)   1071: Specified key was too long; max key length is 1000 bytes
(mysql): ALTER TABLE axo ADD INDEX hidden_axo (hidden)   (mysql): CREATE TABLE 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 value_axo_sections ON axo_sections   (mysql): DROP INDEX hidden_axo_sections ON axo_sections   (mysql): ALTER TABLE axo_sections MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE axo_sections MODIFY COLUMN order_value INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE axo_sections MODIFY COLUMN hidden INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE axo_sections ADD UNIQUE INDEX value_axo_sections (value)   (mysql): ALTER TABLE axo_sections ADD INDEX hidden_axo_sections (hidden)   (mysql): DROP INDEX value_aro_groups ON aro_groups   (mysql): DROP INDEX parent_id_aro_groups ON aro_groups   (mysql): DROP INDEX lft_rgt_aro_groups ON aro_groups   (mysql): ALTER TABLE aro_groups MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE aro_groups MODIFY COLUMN parent_id INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE aro_groups MODIFY COLUMN lft INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE aro_groups MODIFY COLUMN rgt INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE aro_groups ADD INDEX parent_id_aro_groups (parent_id)   (mysql): ALTER TABLE aro_groups ADD UNIQUE INDEX value_aro_groups (value)   (mysql): ALTER TABLE aro_groups ADD INDEX lft_rgt_aro_groups (lft, rgt)   (mysql): DROP INDEX aro_id ON groups_aro_map   (mysql): ALTER TABLE groups_aro_map MODIFY COLUMN group_id INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE groups_aro_map MODIFY COLUMN aro_id INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE groups_aro_map ADD INDEX aro_id (aro_id)   (mysql): ALTER TABLE aro_groups_map MODIFY COLUMN acl_id INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE aro_groups_map MODIFY COLUMN group_id INTEGER NOT NULL DEFAULT 0   (mysql): DROP INDEX value_axo_groups ON axo_groups   (mysql): DROP INDEX parent_id_axo_groups ON axo_groups   (mysql): DROP INDEX lft_rgt_axo_groups ON axo_groups   (mysql): ALTER TABLE axo_groups MODIFY COLUMN id INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE axo_groups MODIFY COLUMN parent_id INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE axo_groups MODIFY COLUMN lft INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE axo_groups MODIFY COLUMN rgt INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE axo_groups ADD INDEX parent_id_axo_groups (parent_id)   (mysql): ALTER TABLE axo_groups ADD UNIQUE INDEX value_axo_groups (value)   (mysql): ALTER TABLE axo_groups ADD INDEX lft_rgt_axo_groups (lft, rgt)   (mysql): DROP INDEX axo_id ON groups_axo_map   (mysql): ALTER TABLE groups_axo_map MODIFY COLUMN group_id INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE groups_axo_map MODIFY COLUMN axo_id INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE groups_axo_map ADD INDEX axo_id (axo_id)   (mysql): ALTER TABLE axo_groups_map MODIFY COLUMN acl_id INTEGER NOT NULL DEFAULT 0   (mysql): ALTER TABLE 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.

bradymiller wrote on Monday, April 28, 2008:

hey,
Not sure what to make of that output. This still seems like a mysql access issue. Let’s try some stuff in mysql to see if there’s an issue.

(first log into mysql)
mysql -u root -p YOURPASSWORD

should show:
mysql>

(lets simply show the databases)
SHOW databases;

should show something like: 
±-------------------+
| Database           |
±-------------------+
| information_schema |
| gacl               |
| mysql              |
| openemr            |
| test               |
| tmp                |
±-------------------+
6 rows in set (0.04 sec)

(now lets add a dummy database)
CREATE database dummy;

should show:
Query OK, 1 row affected (0.00 sec)

(now lets connect to the dummy database)
USE dummy;

should show:
Database changed

(now try to show the dummy tables, which should be empty at this point)
SHOW tables;

should show:
Empty set (0.0 sec)

(now lets try to add a table to your dummy database)
CREATE TABLE species (id INT NOT NULL AUTO_INCREMENT, species varchar(30) NOT NULL, primary key(id));

should show:
Query OK, 0 rows affected (0.01 sec)

(now lets try to show your newly created table)
SHOW tables;

should show:
±----------------+
| Tables_in_dummy |
±----------------+
| species         |
±----------------+
1 row in set (0.00 sec)

(now try to add some data into your table)
INSERT INTO species (species) values (‘Cat’);

should show:
Query OK, 1 row affected (0.00 sec)

(now make sure you were able to add the data)
SELECT * FROM species;

should show:
±—±--------+
| id | species |
±—±--------+
|  1 | Cat     |
±—±--------+
1 row in set (0.00 sec)

Were you able to reproduce this stuff in your mysql? (i am especially curious whether you were able to create the ‘species’ table and insert the ‘Cat’ data into it)

-Brady

dr_smit wrote on Monday, April 28, 2008:

works fine till this:

±—±--------+
| id | species |
±—±--------+
| 1 | Cat |
±—±--------+
1 row in set (0.00 sec)

          The error lies somewhere here I think:

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
phpGACL Database Setup

          and here:

1146: Table ‘gacl.aco_map’ doesn’t exist

          and here:

1071: Specified key was too long; max key length is 1000 bytes

          and here:

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