Drupal 7 on Quercus

135 views
Skip to first unread message

webde...@gmail.com

unread,
Jun 18, 2014, 6:24:46 PM6/18/14
to caucho-...@googlegroups.com
Hi everyone, I'm trying to get Drupal 7.28 running on quercus-4.0.39, and I'm running into some problems. This is on Tomcat 8.0.8.

Everything is normal until I get to the database configuration screen. I get this warning:

Notice: $settings_file_ownership_error is an undefined variable in install_check_requirements() (line 2313 of /usr/local/qrupal/apache-tomcat-8.0.8/webapps/ROOT/includes/bootstrap.inc).

I can ignore that warning and continue with my database (MySQL). It continues, but while it's processing I get:

otice: $settings_file_ownership_error is an undefined variable in install_check_requirements() (line 2313 of /usr/local/qrupal/apache-tomcat-8.0.8/webapps/ROOT/includes/bootstrap.inc).
Notice: $completed_task_found is an undefined variable in install_tasks_to_perform() (line 2313 of /usr/local/qrupal/apache-tomcat-8.0.8/webapps/ROOT/includes/bootstrap.inc).
Notice: $completed_task_found is an undefined variable in install_tasks_to_perform() (line 2313 of /usr/local/qrupal/apache-tomcat-8.0.8/webapps/ROOT/includes/bootstrap.inc).

and then after it's done I get a long error, with this:

Notice: $completed_task_found is an undefined variable in install_tasks_to_perform() (line 2313 of /usr/local/qrupal/apache-tomcat-8.0.8/webapps/ROOT/includes/bootstrap.inc).

repeating many times. However I can continue, so I set up the site.

I finish and again I have the same error about $completed_task, but it says, "Congratulations, you have installed Drupal!"

I continue on to my new site, and I get a notice:

Notice: $return is an undefined variable in drupal_deliver_page() (line 2313 of /usr/local/qrupal/apache-tomcat-8.0.8/webapps/ROOT/includes/bootstrap.inc).

And everything is page not found:

Page not found

The requested page "/" could not be found.
Powered by Drupal

Anyone have ideas on this? I'm happy to try any suggestions. I feel like it's close to working.

Thanks

webde...@gmail.com

unread,
Jun 19, 2014, 4:12:39 PM6/19/14
to caucho-...@googlegroups.com, webde...@gmail.com
I have made some progress in this. For whatever reason, while installing the site under Tomcat / Quercus, it creates the tables in MySQL, but does not populate them with the right initial data so no nodes are found. I installed Drupal under regular PHP, it correctly populated the tables, and then it seems to have worked. There are still some warnings, like:

Warning: required argument missing in call_user_func_array() (line 2313 of /usr/local/qrupal/apache-tomcat-8.0.8/webapps/ROOT/includes/bootstrap.inc).

which I need to figure out. Overall it does seem to work, and will be a great option for us if I can get it at a production level.

Nam Nguyen

unread,
Jun 19, 2014, 5:13:40 PM6/19/14
to caucho-...@googlegroups.com
Hi webdev4499,

There is a Drupal7 function that needs to be patched before it can
install successfully on Quercus. I think the notices you are seeing is
a cosmetic issue, rather than a bug.

-- Nam


Patch:

function drupal_parse_info_format($data) {
$info = array();
$constants = get_defined_constants();

if (preg_match_all('
@^\s* # Start at the beginning of a line,
ignoring leading whitespace
((?:
[^=;\[\]]| # Key names cannot contain equal
signs, semi-colons or square brackets,
\[[^\[\]]*\] # unless they are balanced and not
nested
)+?)
\s*=\s* # Key/value pairs are separated by
equal signs (ignoring white-space)
(?:
("(?:[^"]|(?<=\\\\)")*")| # Double-quoted string, which may
contain slash-escaped quotes/slashes
(\'(?:[^\']|(?<=\\\\)\')*\')| # Single-quoted string, which may
contain slash-escaped quotes/slashes
([^\r\n]*?) # Non-quoted string
)\s*$ # Stop at the next end of a line,
ignoring trailing whitespace
@msx', $data, $matches, PREG_SET_ORDER)) {
foreach ($matches as $match) {
// Fetch the key and value string.
$i = 0;
foreach (array('key', 'value1', 'value2', 'value3') as $var) {
$$var = isset($match[++$i]) ? $match[$i] : '';
}
$value = stripslashes(substr($value1, 1, -1)) .
stripslashes(substr($value2, 1, -1)) . $value3;

// Parse array syntax.
$keys = preg_split('/\]?\[/', rtrim($key, ']'));
$last = array_pop($keys);
$parent = &$info;

// Create nested arrays.
foreach ($keys as $key) {
if ($key == '') {
$key = count($parent);
}
if (!isset($parent[$key]) || !is_array($parent[$key])) {
$parent[$key] = array();
}
$parent = &$parent[$key];
}

// Handle PHP constants.
if (isset($constants[$value])) {
$value = $constants[$value];
}

// Insert actual value.
if ($last == '') {
$last = count($parent);
}
$parent[$last] = $value;
}
}

return drupal_quercus_copy_array($info);
}

function drupal_quercus_copy_array($array)
{
$copy = array();

if (! is_array($array)) {
return $array;
}

foreach ($array as $key => $value) {
$copy[$key] = drupal_quercus_copy_array($value);
}

return $copy;

webde...@gmail.com

unread,
Jun 20, 2014, 7:21:20 PM6/20/14
to caucho-...@googlegroups.com, n...@caucho.com
Thanks Nam. I tried that, and it's the same behavior. I hope this can be fixed in either Quercus or Drupal, but for now, I guess I need to use PHP to install and then I can run it on Quercus. It seems like it's very close to working, but not quite.

ser...@gmail.com

unread,
Dec 15, 2014, 2:01:05 PM12/15/14
to caucho-...@googlegroups.com, n...@caucho.com, webde...@gmail.com

Hi I have the same problem... any news on this?
Where do I have to test the patch, in case?

thanks in advance,
Alfredo
Reply all
Reply to author
Forward
0 new messages