CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Adding ACL Roles...
Pages: [1]

Author Topic: Adding ACL Roles...  (Read 4152 times)

ccweaver

  • Guest
Adding ACL Roles...
July 05, 2007, 01:36:23 pm
Hi,

I'm a new Civicrm user. I'm working with Civicrm on drupal 5.1.

I'm trying to add a new ACL Role (Web Administrators) and when I went in the appropriate information for it, (label, description, weight, enabled), and then hit save, my site seems to hang and never process the command.

Any ideas what may be going on or if I have something misconfigured? My db settings seem to be correct since the other areas of Civicrm seem to be working.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Adding ACL Roles...
July 05, 2007, 02:22:26 pm

Please check your apache error logs and see if there is more information there. Most likely the web server is dying due to some reason. The error log might give you some more information

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

ccweaver

  • Guest
Re: Adding ACL Roles...
July 05, 2007, 07:20:51 pm
So, it seems the error I'm getting is: "Call to undefined function mysql_error() in in D:\Apache2\htdocs\drupal_website\modules\civicrm\CRM\Core\Error.php on line 160"

This seems pretty weird. Any idea what's going on? I tried resetting the password of the db again and still get the same problem.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Adding ACL Roles...
July 05, 2007, 08:38:34 pm

mysql_error is a standard php function:

http://www.php.net/mysql_error

Something is wierd with your php/mysql setup. I would also check the error logs again to make sure there is no memory errors above the below error

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

ccweaver

  • Guest
Re: Adding ACL Roles...
July 10, 2007, 01:33:27 pm
I still have not been able to fix this problem. I'm sure that my civicrm db settings are correct because I am able to do everything else with civicrm except this it seems. I have updated contact information, performed searches, added/removed contacts, etc. All these operations work fine. I just can't seem to add new permission roles.


Here's my backtrace:

backTrace

D:\Apache2\htdocs\drupal_website\modules\civicrm\CRM\Core\Error.php, backtrace, 147
, handle,
D:\Apache2\htdocs\drupal_website\modules\civicrm\packages\PEAR.php, call_user_func, 901
D:\Apache2\htdocs\drupal_website\modules\civicrm\packages\DB.php, PEAR_Error, 888
D:\Apache2\htdocs\drupal_website\modules\civicrm\packages\PEAR.php, DB_Error, 563
D:\Apache2\htdocs\drupal_website\modules\civicrm\packages\DB\common.php, raiseError, 1849
D:\Apache2\htdocs\drupal_website\modules\civicrm\packages\DB\mysqli.php, raiseError, 920
D:\Apache2\htdocs\drupal_website\modules\civicrm\packages\DB\mysqli.php, mysqliRaiseError, 395
D:\Apache2\htdocs\drupal_website\modules\civicrm\packages\DB\common.php, simpleQuery, 1162
D:\Apache2\htdocs\drupal_website\modules\civicrm\packages\DB\DataObject.php, query, 2344
D:\Apache2\htdocs\drupal_website\modules\civicrm\packages\DB\DataObject.php, _query, 1033
D:\Apache2\htdocs\drupal_website\modules\civicrm\CRM\Core\DAO.php, insert, 258
D:\Apache2\htdocs\drupal_website\modules\civicrm\CRM\Core\BAO\OptionValue.php, save, 120
D:\Apache2\htdocs\drupal_website\modules\civicrm\CRM\Core\OptionValue.php, add, 178
D:\Apache2\htdocs\drupal_website\modules\civicrm\CRM\Admin\Form\Options.php, addOptionValue, 157
D:\Apache2\htdocs\drupal_website\modules\civicrm\CRM\Core\StateMachine.php, postProcess, 166
D:\Apache2\htdocs\drupal_website\modules\civicrm\CRM\Core\QuickForm\Action\Next.php, perform, 63
D:\Apache2\htdocs\drupal_website\modules\civicrm\packages\HTML\QuickForm\Controller.php, perform, 195
D:\Apache2\htdocs\drupal_website\modules\civicrm\packages\HTML\QuickForm\Page.php, handle, 95
D:\Apache2\htdocs\drupal_website\modules\civicrm\CRM\Core\Controller.php, handle, 213
D:\Apache2\htdocs\drupal_website\modules\civicrm\CRM\Core\Page\Basic.php, run, 307
D:\Apache2\htdocs\drupal_website\modules\civicrm\CRM\Core\Page\Basic.php, edit, 159
D:\Apache2\htdocs\drupal_website\modules\civicrm\CRM\Admin\Page\Options.php, run, 171
D:\Apache2\htdocs\drupal_website\modules\civicrm\CRM\Core\Invoke.php, run, 613
D:\Apache2\htdocs\drupal_website\modules\civicrm\CRM\Core\Invoke.php, admin, 86
D:\Apache2\htdocs\drupal_website\modules\civicrm\drupal\civicrm.module, invoke, 288
, civicrm_invoke,
D:\Apache2\htdocs\drupal_website\includes\menu.inc, call_user_func_array, 418
D:\Apache2\htdocs\drupal_website\index.php, menu_execute_active_handler, 15


Fatal error: Call to undefined function mysql_error() in D:\Apache2\htdocs\drupal_website\modules\civicrm\CRM\Core\Error.php on line 160

ccweaver

  • Guest
Re: Adding ACL Roles...
July 10, 2007, 10:12:39 pm
Okay, this error showed up again in a completely different context. I was removing the relationship types that came with the system, and for some reason , civicrm throws an error when I try to delete the "Household Member Of" relationship. It's the same mysql error as before. What's weird is that I was able to delete the other 5 or 6 built in relationships just fine (i.e. sibling of, spouse of, employee of, etc).

Any ideas what's going on? Here's my backtrace:

backTrace

D:\Apache2\htdocs\drupal_website\modules\civicrm\CRM\Core\Error.php, backtrace, 147
, handle,
D:\Apache2\htdocs\drupal_website\modules\civicrm\packages\PEAR.php, call_user_func, 901
D:\Apache2\htdocs\drupal_website\modules\civicrm\packages\DB.php, PEAR_Error, 888
D:\Apache2\htdocs\drupal_website\modules\civicrm\packages\PEAR.php, DB_Error, 563
D:\Apache2\htdocs\drupal_website\modules\civicrm\packages\DB\common.php, raiseError, 1849
D:\Apache2\htdocs\drupal_website\modules\civicrm\packages\DB\mysqli.php, raiseError, 920
D:\Apache2\htdocs\drupal_website\modules\civicrm\packages\DB\mysqli.php, mysqliRaiseError, 395
D:\Apache2\htdocs\drupal_website\modules\civicrm\packages\DB\common.php, simpleQuery, 1162
D:\Apache2\htdocs\drupal_website\modules\civicrm\packages\DB\DataObject.php, query, 2344
D:\Apache2\htdocs\drupal_website\modules\civicrm\packages\DB\DataObject.php, _query, 1394
D:\Apache2\htdocs\drupal_website\modules\civicrm\CRM\Contact\BAO\RelationshipType.php, delete, 133
D:\Apache2\htdocs\drupal_website\modules\civicrm\CRM\Admin\Form\RelationshipType.php, del, 100
D:\Apache2\htdocs\drupal_website\modules\civicrm\CRM\Core\StateMachine.php, postProcess, 166
D:\Apache2\htdocs\drupal_website\modules\civicrm\CRM\Core\QuickForm\Action\Next.php, perform, 63
D:\Apache2\htdocs\drupal_website\modules\civicrm\packages\HTML\QuickForm\Controller.php, perform, 195
D:\Apache2\htdocs\drupal_website\modules\civicrm\packages\HTML\QuickForm\Page.php, handle, 95
D:\Apache2\htdocs\drupal_website\modules\civicrm\CRM\Core\Controller.php, handle, 213
D:\Apache2\htdocs\drupal_website\modules\civicrm\CRM\Core\Page\Basic.php, run, 307
D:\Apache2\htdocs\drupal_website\modules\civicrm\CRM\Core\Page\Basic.php, edit, 159
D:\Apache2\htdocs\drupal_website\modules\civicrm\CRM\Core\Invoke.php, run, 613
D:\Apache2\htdocs\drupal_website\modules\civicrm\CRM\Core\Invoke.php, admin, 86
D:\Apache2\htdocs\drupal_website\modules\civicrm\drupal\civicrm.module, invoke, 288
, civicrm_invoke,
D:\Apache2\htdocs\drupal_website\includes\menu.inc, call_user_func_array, 418
D:\Apache2\htdocs\drupal_website\index.php, menu_execute_active_handler, 15


Fatal error: Call to undefined function mysql_error() in D:\Apache2\htdocs\drupal_website\modules\civicrm\CRM\Core\Error.php on line 160

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Adding ACL Roles...
July 11, 2007, 01:29:20 am
This is a bug when deleting a relationship type. Can you file the issue in bug tracker. http://issues.civicrm.org

- kurund
Found this reply helpful? Support CiviCRM

ccweaver

  • Guest
Re: Adding ACL Roles...
July 11, 2007, 08:58:56 pm
--UPDATE--

So, I enabled the mysql extension on php for the time being. That worked out the problems with the mysql_error() function not being defined.

Then, it revealed this while trying to add "Webmaster" to the ACL roles list:

Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

       
Code: [Select]
=> -1
    [message] => DB Error: unknown error
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_option_value (option_group_id , label , value , is_default , weight , description , is_optgroup , is_active ) VALUES ( 8 , 'Webmaster' ,  3 ,  NULL ,  3 ,  NULL ,  NULL ,  1 )  [nativecode=1364 ** Field 'filter' doesn't have a default value]
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_option_value (option_group_id , label , value , is_default , weight , description , is_optgroup , is_active ) VALUES ( 8 , 'Webmaster' ,  3 ,  NULL ,  3 ,  NULL ,  NULL ,  1 )  [nativecode=1364 ** Field 'filter' doesn't have a default value]
    [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_option_value (option_group_id , label , value , is_default , weight , description , is_optgroup , is_active ) VALUES ( 8 , 'Webmaster' ,  3 ,  NULL ,  3 ,  NULL ,  NULL ,  1 )  [nativecode=1364 ** Field 'filter' doesn't have a default value]"]
)


The main part of this is the specific error itself, saying that "Field 'filter' doesn't have a default value." This seems to be the problem that was at the root of the error being thrown for me when I was trying to add. I don't understand why I have this error in my installation, but that the civicrm demo site does not. Can anyone shed some light on this?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Adding ACL Roles...
July 11, 2007, 09:55:21 pm

this is an issue with CiviCRM v1.7 and is filed and fixed in v1.8

http://issues.civicrm.org/jira/browse/CRM-2089

You can fix it in 1.7 by running the following sql statement in your civicrm database:

        ALTER TABLE civicrm_option_value
             MODIFY filter int(10) unsigned DEFAULT NULL;

Unfortunately only a few versions of mysql trigger that error, hence it has been not been detected for so long :( What version of mysql are you runnning?

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Adding ACL Roles...
July 11, 2007, 10:12:57 pm

I also made some changes in the one place where we used mysql_error, to check for its existence before calling the function. You should be able to use mysqli without any issues in v1.8 (or so i hope)

The appropriate change set is:

http://fisheye.civicrm.org/browse/CiviCRM/branches/v1.8/CRM/Core/Error.php?r1=10014&r2=10357

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

ccweaver

  • Guest
Re: Adding ACL Roles...
July 11, 2007, 10:23:34 pm
Hi,

I'm not sure if this is what you meant, but here's the info from a phpinfo() call with regards to the mysqli library:

Client API library version    5.0.37
Client API header version    5.0.36
MYSQLI_SOCKET    /tmp/mysql.sock

According to the file version information listed under mysqli.dll in my php/ext directory, it's version 5.2.3.3

Hope this helps. Thank you so much for all your help!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Adding ACL Roles...

This forum was archived on 2017-11-26.