I cannot view, edit or clone custom rules. I can translate them, delete them or clone them. Default rules seem to behave fine. When I try to edit/view/clone custom rules, I see a 500 error. However, it seems to be inconsistent in-so-much-as about one time in ten editing/viewing works.

The host I use is Japanese, but the upshot of their error message is that "CGI or possible SSI is not behaving correctly."

Is it similar to this issue from a couple of years ago? https://drupal.org/node/1258284


cabralje’s picture

I am having the same problem.

jsquyres’s picture

I'm also seeing this behavior.

rabeto’s picture

I have had the same problem since i updated my rules module

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

matt.rad’s picture

I have now also had every page, as well as custom rules, return the same error for a few hours then go away. Has this happened to anyone else?

tgshannon’s picture

I'm also getting this problem. I was able to create a new rule but got an error when I added a condition in the second step. I couldn't figure out what when into the data selector field, and tried different options and would get the error. I then tried to edit a current rule and get the 500 internal error immediately.

fago’s picture

Please make sure clearing caches runs through properly and try to find additional errors in the server log. If that all does not help please report your PHP version and how its run (apache mod-php, cgi, fcgi, ..)

fago’s picture

Status: Active » Postponed (maintainer needs more info)
tgshannon’s picture

I cleared cache twice, and received the caches cleared message both times. Php version is 5.2.17 and php memory limit is 900M.

I'll have to get with the site owner and have her go through the server logs with support. The site is on a shared host, and is very slow at times. What server logs should she review with support?

error when trying to edit a rule:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@cololitnet.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

Apache/2.2.24 (Unix) mod_hive/3.6 mod_ssl/2.2.24 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/ mod_jk/1.2.35 Server at cololitnet.com Port 443

gejo’s picture

I'm getting this same error when trying to use Rules Forms Support module.
I've posted this issue there.

matt.rad’s picture

Using PHP Version 5.2.17/Apache

Caches clearing fine, and I am in the habit of clearing them frequently.

ataxia’s picture

I just upgraded Rules to 7.x-2.5, and now I can't edit any rules. This is a critical situation, as my customer needs updates by tomorrow. When I try to edit any rule, I get "ERROR 500 - INTERNAL SERVER ERROR".

This is the format of the URL that's causing the issue:

I noticed that on my dev site (on which I haven't updated Rules) the URL is shown in an overlay:

Also, the Recent Log Messages file is showing several Page Not Found errors with these Locations:

evanmwillhite’s picture

I too got a 500 error when I tried to clone and make inactive. I was able to successfully clone one (I think) but it is not appearing in the Rules UI. Here's the log entry for the 500 error:

PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'name' at row 1: INSERT INTO {rules_config} (name, label, plugin, active, weight, status, dirty, module, owner, access_exposed, data) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10); Array ( [:db_insert_placeholder_0] => clientname_license_send_license_key_email_clone_and_make_active_ [:db_insert_placeholder_1] => Send License Key Email (CLONE AND MAKE ACTIVE) [:db_insert_placeholder_2] => reaction rule [:db_insert_placeholder_3] => 0 [:db_insert_placeholder_4] => 10 [:db_insert_placeholder_5] => 1 [:db_insert_placeholder_6] => 0 [:db_insert_placeholder_7] => clientname_license [:db_insert_placeholder_8] => clientname_license [:db_insert_placeholder_9] => 0 [:db_insert_placeholder_10] => O:17:"RulesReactionRule":21:{s:9:"*parent";N;s:2:"id";N;s:12:"*elementId";i:1;s:6:"weight";s:2:"10";s:8:"settings";a:0:{}s:4:"name";s:65:"clientname_license_send_license_key_email_clone_and_make_active_";s:5:"label";s:46:"Send License Key Email (CLONE AND MAKE ACTIVE)";s:6:"plugin";s:13:"reaction rule";s:6:"active";i:0;s:6:"status";i:1;s:5:"dirty";b:0;s:6:"module";s:19:"clientname_license";s:5:"owner";s:19:"clientname_license";s:14:"access_exposed";b:0;s:4:"data";r:1;s:4:"tags";a:1:{i:0;s:12:"License Keys";}s:11:"*children";a:2:{i:0;O:11:"RulesAction":6:{s:9:"*parent";r:1;s:2:"id";N;s:12:"*elementId";i:5;s:6:"weight";i:0;s:8:"settings";a:6:{s:9:"to:select";s:20:"line-item:order:mail";s:7:"subject";s:53:"License Keys for product [line-item:commerce_product]";s:7:"message";s:49:"Here are your keys: [line-item:field_licenses] ";s:15:"language:select";s:14:"line-item:type";s:15:"subject:process";O:19:"RulesTokenEvaluator":2:{s:10:"*setting";b:1;s:12:"*processor";N;}s:15:"message:process";O:19:"RulesTokenEvaluator":2:{s:10:"*setting";b:1;s:12:"*processor";N;}}s:14:"*elementName";s:4:"mail";}i:1;O:11:"RulesAction":6:{s:9:"*parent";r:1;s:2:"id";N;s:12:"*elementId";i:6;s:6:"weight";i:1;s:8:"settings";a:2:{s:11:"data:select";s:30:"line-item:field-license-status";s:5:"value";s:17:"license_delivered";}s:14:"*elementName";s:8:"data_set";}}s:7:"*info";a:0:{}s:13:"*conditions";O:8:"RulesAnd":8:{s:9:"*parent";r:1;s:2:"id";N;s:12:"*elementId";i:2;s:6:"weight";i:0;s:8:"settings";a:0:{}s:11:"*children";a:2:{i:0;O:14:"RulesCondition":7:{s:9:"*parent";r:47;s:2:"id";N;s:12:"*elementId";i:3;s:6:"weight";i:0;s:8:"settings";a:2:{s:13:"entity:select";s:9:"line-item";s:5:"field";s:20:"field_license_status";}s:14:"*elementName";s:16:"entity_has_field";s:9:"*negate";b:0;}i:1;O:14:"RulesCondition":7:{s:9:"*parent";r:47;s:2:"id";N;s:12:"*elementId";i:4;s:6:"weight";i:1;s:8:"settings";a:3:{s:11:"data:select";s:30:"line-item:field-license-status";s:2:"op";s:2:"==";s:5:"value";s:16:"license_assigned";}s:14:"*elementName";s:7:"data_is";s:9:"*negate";b:0;}}s:7:"*info";a:0:{}s:9:"*negate";b:0;}s:9:"*events";a:1:{i:0;s:34:"clientname_license_trigger_emails";}s:16:"*eventSettings";a:0:{}} ) in drupal_write_record() (line 7166 of /var/www/clientname.com/includes/common.inc).

tgshannon’s picture

The following is the error reported by the arvixe support staff when duplicating problem.

[Sun Oct 13 18:43:40 2013] [error] [client] Premature end of script headers: index.php, referer: https://cololitnet.com/users/arvixe

jamiezeidler’s picture

I have the exact same issue as #11

jamiezeidler’s picture

If I disabled all my rules I was able to edit it. I then just enabled the rule I had issues and I was able to edit it with no issues. Maybe there was an issue with one of my other rules, strange. Will update if I come across anything else.

tgshannon’s picture

I deleted the two rules I had, and cleared the cache. I added a rule and when I tried to add a condition check I get the 500 error.

I also cloned the site on my localhost (mac) and do not get the error.

lot007’s picture

I had the same issue on a webserver running PHP 5.2
But the same site works very well on a webserver running PHP 5.3

When I put line 49-52 (rules/ui/ui.forms.inc) in comment the 500 error disappear.

function rules_ui_form_edit_rules_config($form, &$form_state, $rules_config, $base_path) {
  RulesPluginUI::$basePath = $base_path;
  $form_state += array('rules_element' => $rules_config);
  // Add the rule configuration's form.
  $rules_config->form($form, $form_state, array('show settings' => TRUE, 'button' => TRUE));
  $form['#validate'] = array('rules_ui_form_rules_config_validate');
  return $form;
tgshannon’s picture

Upgrading to php 5.4 fixed the problem for me. I later changed to php 5.3.27 because 5.4 was causing some problems that had patches available, but 5.3 was easier to go to at this time.

ataxia’s picture

RE: #11

Upgrading PHP to 5.3.27 fixed this problem for me.

oosthupj’s picture

I upgraded from Rules 7.x-2.3 to 7.x-2.6 and also got this 500 error. I had to revert as I had urgent rules to work on. Reverted back to Rules 7.x-2.3 and the 500 error is gone.

Using Php 5.2.17
I cannot change the php version as I am hosting my website at a hosting company not by myself.

peter.morlion’s picture

Same problem here. 7.x-2.6. However, I can edit 3 of my 4 rules. All rules have events, conditions and actions. Enabling or disabling doesn't help. The rule I can't edit is my most complex one (it has a lot of conditions, i.e. about 10).

mrtwo87’s picture

I was running into this issue as well. I also upgraded my PHP from 5.2 to 5.4 which fixed the problem.

**NOTE: I have shared hosting with Bluehost. I had upgraded the PHP to 5.4 a couple weeks prior to running into this issue. I know Bluehost was performing server maintenance a couple days ago and it must have reset my PHP back to 5.2 (only thing I can think of that changed). If you are on Bluehost, you can adjust your PHP configuration from your CPanel, in "PHP config" under the "Software/Services" heading.

Thanks for the helpful info everyone :)

matt.rad’s picture

Upgrading to PHP 5.4 sorted this out for me too.

In case it is helpful to someone else, I found that my shared host allowed me to set the version of PHP I was running on my site by adding
AddHandler php5.4-script .php
to .htaccess.

I can't vouch for this being the recommended approach, but it worked and only took a second to organize.

danwonac’s picture

Upgrading PHP was not an option for me.

Downgrading to rules 7.x-2.3 from any higher version resolved the issue (all higher versions produced 500 errors). I didn't try downgrading webform rules.

tparc’s picture

Issue summary: View changes

Maintainer(s), what more information is needed to resolve this?
This appears to be a major bug related to the latest version of rules and earlier versions of PHP. What has changed to have caused this?

fabul’s picture

Version: 7.x-2.5 » 7.x-2.6
Issue tags: +overlay

I can see this issue on production environment as well.
Unless Overlay Module is enabled, no overlay can be watched in the administration screen.
It works as if overlay wasn't enabled.
Wouldn't it be in consequence of PHP or Apache configuration ?

In development environment, Overlay works well and rules can be edited and cloned.

MostlyGhostly’s picture

I was having the same issue.

I upgraded PHP to 5.5 and it seems to be working fine now.

ivanhelguera’s picture

I do have the issue in php 5.5 (ubuntu 14.04)

milos.kroulik’s picture

In my case, the cause of problem was activated xdebug, with xdebug.max_nesting_level set too low. Adding following to .htaccess file worked for me:

php_value xdebug.max_nesting_level 256
manoloka’s picture

Same problem here happened all of the sudden, yesterday worked today Internal Server Error

I could get rid of the problem by downgrading all the way down to 7.x-2.3

Any ideas?

manoloka’s picture


I tried you solution but didn't work for me? Which .htaccess file you put it in? the root one? other?

Mine shows this now

<IfModule mod_php5.c>
  php_flag magic_quotes_gpc                 off
  php_flag magic_quotes_sybase              off
  php_flag register_globals                 off
  php_flag session.auto_start               off
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_flag mbstring.encoding_translation    off
  php_value xdebug.max_nesting_level 256
milos.kroulik’s picture

@manoloka Yes, it was the root one.