Suddenly an "open_basedir restriction in effect"

Having trouble installing serendipity?
Post Reply
mikkel_h
Regular
Posts: 15
Joined: Sun Apr 10, 2005 12:52 am
Contact:

Suddenly an "open_basedir restriction in effect"

Post by mikkel_h »

Hi.

Can someone explain why I get an open_basedir warning in http://www.mzh.dk (just above the calendar on the left hand side).

It used to work without problems, and I haven't changed any files or permissions ...
mikkel_h
Regular
Posts: 15
Joined: Sun Apr 10, 2005 12:52 am
Contact:

Re: Suddenly an "open_basedir restriction in effect"

Post by mikkel_h »

Yes, maybe they did. Is there anything I can do about it? I'm not sure I understand the error message.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Suddenly an "open_basedir restriction in effect"

Post by garvinhicking »

Hi!

Can you post the contents of that templates_c/ file? It seems as if it tries to do a file_exists() check on a directory outside the tree you are allowed to access. This can be related to missing graphic files in the "img/" subdirectory of your template...

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
mikkel_h
Regular
Posts: 15
Joined: Sun Apr 10, 2005 12:52 am
Contact:

Re: Suddenly an "open_basedir restriction in effect"

Post by mikkel_h »

garvinhicking wrote:Can you post the contents of that templates_c/ file?
Not sure what you are asking for ... templates_c is a folder, not a file. Do you want the contents of the "default^%%80^80B^80BE67B1%%plugin_calendar.tpl.php" file that is in the error message? Here it is (server path anonymised ...):

Code: Select all

<?php /* Smarty version 2.6.22, created on 2009-07-11 23:46:24
         compiled from file:/my/server/path/blog/templates/default/plugin_calendar.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'serendipity_getFile', 'file:/my/server/path/blog/templates/default/plugin_calendar.tpl', 5, false),array('modifier', 'formatTime', 'file:/my/server/path/blog/templates/default/plugin_calendar.tpl', 10, false),array('modifier', 'default', 'file:/my/server/path/blog/templates/default/plugin_calendar.tpl', 29, false),)), $this); ?>
<table style="width: 100%" cellspacing="0" cellpadding="0" class="serendipity_calendar">
    <tr>
        <td class="serendipity_calendarHeader">
<?php if ($this->_tpl_vars['plugin_calendar_head']['minScroll'] <= $this->_tpl_vars['plugin_calendar_head']['month_date']): ?>
            <a title="<?php echo @BACK; ?>
" href="<?php echo $this->_tpl_vars['plugin_calendar_head']['uri_previous']; ?>
"><img alt="<?php echo @BACK; ?>
" src="<?php echo serendipity_smarty_getFile(array('file' => "img/back.png"), $this);?>
" width="16" height="12" style="border: 0px" /></a>
<?php endif; ?>
        </td>

        <td colspan="5" class="serendipity_calendarHeader" style="text-align: center; vertical-align: bottom">
            <b><a style="white-space: nowrap" href="<?php echo $this->_tpl_vars['plugin_calendar_head']['uri_month']; ?>
"><?php echo ((is_array($_tmp=$this->_tpl_vars['plugin_calendar_head']['month_date'])) ? $this->_run_mod_handler('formatTime', true, $_tmp, "%B '%y", false) : serendipity_smarty_formatTime($_tmp, "%B '%y", false)); ?>
</a></b>
        </td>

        <td class="serendipity_calendarHeader" style="text-align: right">
<?php if ($this->_tpl_vars['plugin_calendar_head']['maxScroll'] >= $this->_tpl_vars['plugin_calendar_head']['month_date']): ?>
            <a title="<?php echo @FORWARD; ?>
" href="<?php echo $this->_tpl_vars['plugin_calendar_head']['uri_next']; ?>
"><img alt="<?php echo @FORWARD; ?>
" src="<?php echo serendipity_smarty_getFile(array('file' => "img/forward.png"), $this);?>
" width="16" height="12" style="border: 0px" /></a>
<?php endif; ?>
        </td>
    </tr>

    <tr>
    <?php $_from = $this->_tpl_vars['plugin_calendar_dow']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['dow']):
?>
        <td scope="col" abbr="<?php echo serendipity_smarty_formatTime($this->_tpl_vars['dow']['date'], "%A", false); ?>
" title="<?php echo serendipity_smarty_formatTime($this->_tpl_vars['dow']['date'], "%A", false); ?>
" class="serendipity_weekDayName" align="center"><?php echo serendipity_smarty_formatTime($this->_tpl_vars['dow']['date'], "%a", false); ?>
</td>
    <?php endforeach; endif; unset($_from); ?>
    </tr>

    <?php $_from = $this->_tpl_vars['plugin_calendar_weeks']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['week']):
?>
        <tr class="serendipity_calendar">
        <?php $_from = $this->_tpl_vars['week']['days']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['day']):
?>
            <td class="serendipity_calendarDay <?php echo $this->_tpl_vars['day']['classes']; ?>
"<?php if (isset ( $this->_tpl_vars['day']['properties']['Title'] )): ?> title="<?php echo $this->_tpl_vars['day']['properties']['Title']; ?>
"<?php endif; ?>><?php if (isset ( $this->_tpl_vars['day']['properties']['Active'] ) && $this->_tpl_vars['day']['properties']['Active']): ?><a href="<?php echo $this->_tpl_vars['day']['properties']['Link']; ?>
"><?php endif; ?><?php echo smarty_modifier_default(@$this->_tpl_vars['day']['name'], " "); ?>
<?php if (isset ( $this->_tpl_vars['day']['properties']['Active'] ) && $this->_tpl_vars['day']['properties']['Active']): ?></a><?php endif; ?></td>
        <?php endforeach; endif; unset($_from); ?>
        </tr>
    <?php endforeach; endif; unset($_from); ?>
</table>
Does this help at all ...?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Suddenly an "open_basedir restriction in effect"

Post by garvinhicking »

Hi!

Yes, that was the file I meant. But it's strange, I believe the error refers to the file itself, which *should* be part of the basedir. I'd contact the server admin, I believe something must have changed in the setup so that it doesn't work like before, maybe the open_basedir path can be changed with a trailing / or so

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply