Jump to content

Error on Request Info Panel on fresh installation when editing the home page


bernhard
 Share

Recommended Posts

Hey @adrian just installed a new pw instance (dev) for testing and got this error:

ErrorException: is_file(): open_basedir restriction in effect. File(ProcessWire\BasicPagePage.php) is not within the allowed path(s): (/path/to/user/www:/path/to/user/files:/path/to/user/tmp) in /path/to/user/www/tmp/processwire-dev/wire/core/WireClassLoader.php:354
Stack trace:
#0 [internal function]: Tracy\Bar->Tracy\{closure}(2, '...', '...', 354)
#1 /path/to/user/www/tmp/processwire-dev/wire/core/WireClassLoader.php(354): is_file('...')
#2 /path/to/user/www/tmp/processwire-dev/wire/core/WireClassLoader.php(313): ProcessWire\WireClassLoader->findClassInPaths('...', Array)
#3 [internal function]: ProcessWire\WireClassLoader->loadClass('...')
#4 /path/to/user/www/tmp/processwire-dev/wire/core/Templates.php(878): class_exists('...')
#5 /path/to/user/www/tmp/processwire-dev/wire/core/Template.php(1441): ProcessWire\Templates->getPageClass(Object(ProcessWire\Template), true)
#6 /path/to/user/www/tmp/processwire-dev/wire/core/PagesLoader.php(1312): ProcessWire\Template->getPageClass()
#7 /path/to/user/www/tmp/processwire-dev/wire/core/PagesLoader.php(521): ProcessWire\PagesLoader->getById(Array, Object(ProcessWire\Template))
#8 /path/to/user/www/tmp/processwire-dev/wire/core/Pages.php(289): ProcessWire\PagesLoader->find('...', Array)
#9 /path/to/user/www/tmp/processwire-dev/wire/core/Wire.php(419): ProcessWire\Pages->___find('...', Array)
#10 /path/to/user/www/tmp/processwire-dev/wire/core/WireHooks.php(968): ProcessWire\Wire->_callMethod('...', Array)
#11 /path/to/user/www/tmp/processwire-dev/wire/core/Wire.php(484): ProcessWire\WireHooks->runHooks(Object(ProcessWire\Pages), '...', Array)
#12 /path/to/user/www/tmp/processwire-dev/wire/core/Page.php(3968): ProcessWire\Wire->__call('...', Array)
#13 /path/to/user/www/tmp/processwire-dev/wire/core/PageTraversal.php(132): ProcessWire\Page->_pages('...', '...', Array)
#14 /path/to/user/www/tmp/processwire-dev/wire/core/PageTraversal.php(157): ProcessWire\PageTraversal->children(Object(ProcessWire\HomePage), '...', Array)
#15 /path/to/user/www/tmp/processwire-dev/wire/core/Page.php(1883): ProcessWire\PageTraversal->child(Object(ProcessWire\HomePage), '...', Array)
#16 /path/to/user/www/tmp/processwire-dev/site/assets/cache/FileCompiler/site/modules/TracyDebugger/panels/RequestInfoPanel.php(484): ProcessWire\Page->child('...')
#17 /path/to/user/www/tmp/processwire-dev/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Bar/Bar.php(143): RequestInfoPanel->getPanel()
#18 /path/to/user/www/tmp/processwire-dev/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Bar/Bar.php(115): Tracy\Bar->renderPanels('')
#19 /path/to/user/www/tmp/processwire-dev/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Bar/Bar.php(89): Tracy\Bar->renderPartial('...')
#20 /path/to/user/www/tmp/processwire-dev/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Debugger/DevelopmentStrategy.php(123): Tracy\Bar->render(Object(Tracy\DeferredContent))
#21 /path/to/user/www/tmp/processwire-dev/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Debugger/Debugger.php(319): Tracy\DevelopmentStrategy->renderBar()
#22 [internal function]: Tracy\Debugger::shutdownHandler()
#23 {main}

Tracy was installed some seconds before, so it should be the latest version ? 

Link to comment
Share on other sites

Hi @bernhard - I am not sure why PW is trying to an is_file() on ProcessWire\BasicPagePage.php because that's obviously not a valid path. Perhaps you could assist by checking back through the stack trace to see where it is coming from. The referenced line in the RequestInfo panel is a $p->child() call, so not sure how that alone could be triggering this error.

Link to comment
Share on other sites

I added echo "$file<br>" in WireClassLoader.php:354 right above the is_file() and this is what I get:

/path/to/user/www/tmp/processwire-dev/wire/core/ModulesInfo.php
/path/to/user/www/tmp/processwire-dev/wire/core/ModulesClass.php
/path/to/user/www/tmp/processwire-dev/wire/core/ModulesFlags.php
/path/to/user/www/tmp/processwire-dev/wire/core/ModulesFiles.php
/path/to/user/www/tmp/processwire-dev/wire/core/ModulesConfigs.php
/path/to/user/www/tmp/processwire-dev/wire/core/ModulesLoader.php
/path/to/user/www/tmp/processwire-dev/wire/core/WireDatabasePDOStatement.php
/path/to/user/www/tmp/processwire-dev/wire/core/WireCacheDatabase.php
/path/to/user/www/tmp/processwire-dev/wire/core/DefaultPage.php
ProcessWire\DefaultPage.php
/path/to/user/www/tmp/processwire-dev/site/classes/DefaultPage.php
/path/to/user/www/tmp/processwire-dev/wire/core/HomePage.php
ProcessWire\HomePage.php
/path/to/user/www/tmp/processwire-dev/site/classes/HomePage.php
/path/to/user/www/tmp/processwire-dev/wire/core/PageProperties.php
/path/to/user/www/tmp/processwire-dev/wire/core/PageValues.php
/path/to/user/www/tmp/processwire-dev/wire/core/AdminPage.php
ProcessWire\AdminPage.php
/path/to/user/www/tmp/processwire-dev/site/classes/AdminPage.php
/path/to/user/www/tmp/processwire-dev/wire/core/UserPage.php
ProcessWire\UserPage.php
/path/to/user/www/tmp/processwire-dev/site/classes/UserPage.php
/path/to/user/www/tmp/processwire-dev/wire/core/RolePage.php
ProcessWire\RolePage.php
/path/to/user/www/tmp/processwire-dev/site/classes/RolePage.php
/path/to/user/www/tmp/processwire-dev/wire/core/WireInputDataCookie.php
/path/to/user/www/tmp/processwire-dev/wire/core/PermissionPage.php
ProcessWire\PermissionPage.php
/path/to/user/www/tmp/processwire-dev/site/classes/PermissionPage.php
/path/to/user/www/tmp/processwire-dev/wire/core/FileLog.php
/path/to/user/www/tmp/processwire-dev/wire/core/PagesRequest.php
/path/to/user/www/tmp/processwire-dev/wire/core/PagesPathFinder.php
/path/to/user/www/tmp/processwire-dev/wire/core/AdminThemeFramework.php
/path/to/user/www/tmp/processwire-dev/wire/core/WireMarkupRegions.php

Then I added this:

if($file === "ProcessWire\DefaultPage.php") {
	echo var_dump(Debug::backtrace());
}

// result
array(9) { 
  [0]=> array(2) { 
    ["file"]=> string(34) "/wire/core/WireClassLoader.php:313" 
    ["call"]=> string(81) "WireClassLoader $classLoader->findClassInPaths("DefaultPage", [ 'ProcessWire\' ])"
  } 
  [1]=> array(2) { 
    ["file"]=> string(28) "/wire/core/Templates.php:862" 
    ["call"]=> string(39) "class_exists("ProcessWire\DefaultPage")"
  } 
  [2]=> array(2) { 
    ["file"]=> string(28) "/wire/core/Template.php:1441" 
    ["call"]=> string(45) "$templates->getPageClass(Template $obj, true)"
  } 
  [3]=> array(2) { 
    ["file"]=> string(31) "/wire/core/PagesLoader.php:1312" 
    ["call"]=> string(24) "Template->getPageClass()"
  } 
  [4]=> array(2) { 
    ["file"]=> string(24) "/wire/core/Pages.php:217" 
    ["call"]=> string(30) "PagesLoader->getById(array(8))"
  } 
  [5]=> array(2) { 
    ["file"]=> string(30) "/wire/core/ProcessWire.php:625" 
    ["call"]=> string(14) "$pages->init()"
  } 
  [6]=> array(2) { 
    ["file"]=> string(30) "/wire/core/ProcessWire.php:582" 
    ["call"]=> string(47) "ProcessWire $wire->initVar("pages", Pages $obj)"
  } 
  [7]=> array(2) { 
    ["file"]=> string(30) "/wire/core/ProcessWire.php:315" 
    ["call"]=> string(36) "ProcessWire $wire->load(Config $obj)"
  } 
  [8]=> array(2) { 
    ["file"]=> string(13) "/index.php:52" 
    ["call"]=> string(43) "ProcessWire $wire->__construct(Config $obj)"
  }
}

Any ideas? Maybe I should better create an issue for PW itself?

Link to comment
Share on other sites

It is weird to me seeing all those paths like "ProcessWire\UserPage.php" in amongst the other full correct paths. They are clearly not valid and will trigger errors for any open_basedir restrictions. So it does seem like a question for Ryan from what I can see.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

HI Bernhard,
Have you found some explanation/resolution to this issue. We just installed a 3.0.229 instance and have noticed the same error in Tracey.

Simultaniously we see the following notice  on pages (in the backend) which we have never seen persiting before.

FieldtypeImage: Settings have not yet been committed.
Please review the settings on this page and save once more (even if you do not change anything) to confirm you accept them.

We obviously saved the page and also checked the template and all associated image fields. All seems normal. Actually editing the page works correctly as well, as does the front-end. It's just confusing and we don't want to run into problems down the road with this installation.

 

Link to comment
Share on other sites

Oh sorry, only saw now that this was within the Tracy branch. 

Upgraded Tracy to 4.25.13. That resolved the error output by Tracy. (But not my original issue that I was researching.)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...