Hi,

I got following warning when importing an panel from another localhost testsite on the content-tab:

warning: is_file() [function.is-file]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home:/var/lib/php/session:/tmp:/var/www/html:/usr/share/horde:/usr/share/pear) in /home/public_html/includes/theme.inc on line 611.

The content tab is not shown correctly.

greetings,
Martijn

Comments

merlinofchaos’s picture

Can you cut & paste the panel you're important? (Feel free to cut relevant strings if you need privacy). I don't have any idea why a panel import would even be looking at files like this.

Summit’s picture

Hi,

here is the panel I tried to import:

$page = new stdClass();
$page->pid = 'new';
  $page->name = 'display_54';
  $page->title = 'informatie';
  $page->arguments = array (
  );
  $page->contexts = array (
  );
  $page->access = array (
  );
  $page->path = 'informatie';
  $page->css_id = 'informatie';
  $page->css = '';
  $page->no_blocks = '0';
  $page->menu = '1';
  $page->menu_tab = '0';
  $page->menu_tab_weight = '0';
  $page->menu_title = 'informatie';
  $page->menu_tab_default = '0';
  $page->menu_tab_default_parent_type = 'tab';
  $page->menu_parent_title = '';
  $page->menu_parent_tab_weight = '0';
$display = new stdClass();
$display->did = 'new';
$display->name = NULL;
$display->layout = 'twocol';
$display->layout_settings = array (
);
$display->panel_settings = array (
);
$display->content = array();
$display->panels = array();
$pane = new stdClass();
  $pane->panel = 'left';
  $pane->type = 'views';
  $pane->subtype = '';
  $pane->access = array (
  );
  $pane->configuration = array (
    'view' => 'informatie_',
    'type' => 'embed',
    'override_title' => 1,
    'override_title_text' => 'informatie',
    'use_pager' => 1,
    'pager_id' => '1',
    'nodes_per_page' => '10',
    'panel_args' => 1,
    'args' => '',
    'url' => '',
  );
$display->content['new-1'] = $pane;
$display->panels['left'][0] = 'new-1';
$pane = new stdClass();
  $pane->panel = 'right';
  $pane->type = 'block';
  $pane->subtype = '';
  $pane->access = array (
  );
  $pane->configuration = array (
    'module' => 'adsense',
    'delta' => '2',
    'override_title' => 0,
    'override_title_text' => '',
    'block_settings' => 
    array (
      'ad_format' => '336x280',
      'ad_group' => '1',
      'ad_channel' => '1',
    ),
  );
$display->content['new-2'] = $pane;
$display->panels['right'][0] = 'new-2';
$pane = new stdClass();
  $pane->panel = 'right';
  $pane->type = 'views';
  $pane->subtype = '';
  $pane->access = array (
  );
  $pane->configuration = array (
    'view' => 'populair_t',
    'type' => 'embed',
    'override_title' => 1,
    'override_title_text' => 'Populaire links,
    'use_pager' => 1,
    'pager_id' => '1',
    'nodes_per_page' => '10',
    'panel_args' => 1,
    'args' => '',
    'url' => '',
  );
$display->content['new-3'] = $pane;
$display->panels['right'][1] = 'new-3';
$pane = new stdClass();
  $pane->panel = 'right';
  $pane->type = 'block';
  $pane->subtype = '';
  $pane->access = array (
  );
  $pane->configuration = array (
    'module' => 'block',
    'delta' => '3',
    'override_title' => 1,
    'override_title_text' => 'Laatste informatie links',
    'block_settings' => 
    array (
      'info' => 'laatste links direct',
      'body' => '<?php
  $nlimit = 15;
  $result = db_query(db_rewrite_sql("SELECT n.title, w.lid, n.nid
  FROM {node} n
    INNER JOIN {links_node} wn ON n.nid = wn.nid
    INNER JOIN {links} w ON wn.lid = w.lid
  WHERE n.type = \'weblink\'
    AND n.status = 1
    AND n.moderate = 0
  ORDER BY n.created DESC
  LIMIT $nlimit"));
  
  while ($node = db_fetch_object($result)) {
    $items[] = l($node->title, \'links/goto/\' . $node->nid . \'/\');
  }
  $output .= theme(\'item_list\', $items);
  return $output;
  ?>',
      'format' => '2',
    ),
  );
$display->content['new-4'] = $pane;
$display->panels['right'][2] = 'new-4';
$page->display = $display;
$page->displays = array();

Thanks for looking into this!

greetings,
Martijn

merlinofchaos’s picture

It looks like the error you're seeing is somehow related to theme('image') -- which is quite odd and I don't understand why it might be connected.

This export is too old for me to import now, it seems; or at least, it claims it can't get an import.

It may be due to the PHP code -- you have some bare words in there that are bad form and not guaranteed to work everywhere. It's vaguely possible they might be interfering with the parser somehow, though that seems unlikely. But I have no other theories about what is going on here.

merlinofchaos’s picture

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

Hi Earl,

I will look into this again.
It is not a big issue, because it is only with import-export.
With the then newest .dev I will try the export-import again and report you back the result.
I think it is indeed php-code which is the problem.

Great Yearending!

Greetings,
Martijn

sun’s picture

Category: bug » support
Status: Postponed (maintainer needs more info) » Fixed

Marking as fixed for now.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

mstrelan’s picture

Title: open_basedir restriction in effect » Database column not large enough making it impossible to assign a layout to a panels page
Version: 5.x-2.x-dev » 6.x-3.x-dev
Category: support » bug
Priority: Normal » Critical
Status: Closed (fixed) » Needs review

This issue still exists in 6.x-3.x when you have a flexible layout with a machine name longer than 24 characters.

The field panels_layout.name is a varchar(255) yet panels_display.layout is a varchar(32). The latter needs enough room to prefix the layout name with a word like "flexible". Therefore the former needs to be restricted to 32 minus max_length_of_prefix or perhaps the latter could just reference the layout id rather than the layout name?

I am marking this as critical because it can corrupt existing pages. After experiencing this issue I deleted my page and tried to recreate it, but then ran in to duplicate entry issues because some of the old stuff wasn't removed, most likely because it was looking for the truncated machine name.

esmerel’s picture

Status: Needs review » Closed (fixed)

Please open a new issue - this one has been closed for over two years. These aren't even the same pieces of software anymore.

esmerel’s picture

Title: Database column not large enough making it impossible to assign a layout to a panels page » open_basedir restriction in effect
Version: 6.x-3.x-dev » 5.x-2.x-dev
Category: bug » support
Priority: Critical » Normal
mstrelan’s picture

If you're searching for this issue because you get it in Drupal 6 see #956394: Database column not large enough making it impossible to assign a layout to a panels page