Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Fatal error configure.php and application_top


Recommended Posts

So I am checking my store late Monday and it shows the much-discussed message 'enable register globals'. So I took the time to upgrade my shop and implement all the things I should have a couple of years ago. Why it showed up on Monday I do not understand, apparently nothing was changed on the server side.


But I cannot get past the following for two days now: I have looked at every discussion, talked to my provider, changed anything and everything, to no avail.

My screen keeps showing up with


Warning: require(includes/configure.php) [function.require]: failed to open stream: No such file or directory in /home/vhosts/5000125970/scrapbookshop.de/htdocs/shop/includes/application_top.php on line 28

Fatal error: require() [function.require]: Failed opening required 'includes/configure.php' (include_path='.;./includes;./pear') in /home/vhosts/5000125970/scrapbookshop.de/htdocs/shop/includes/application_top.php on line 28



Same when I try to access admin.

The file is there, trust me. And I triple-checked it for content. And changed attributes numerously. No change. At some point, it showed that the next file on configure.php was not there. Application_top was not changed, line 28 reads require('includes/configure.php');


Any other ideas than: check whether file is there and whether it is the right one (as they are different in admin and catalog), check for links in configure or upload new configure.php??


Any help would be greatly appreciated. Thanks!

Link to comment
Share on other sites

I've seen this a million times, and I suspect that it's a difference in how PHP versions handle "current directory" in the PHP include path. Your host upgraded PHP recently, which is also why you got the register globals message. You're in the store root directory (say, /catalog), and invoke includes/application_top.php. So far, so good -- /catalog/includes/application_top.php is run. Now, application_top.php looks for includes/configure.php. Apparently, in PHP 4 and before, "current directory" ("." in the path) meant to go back to the outermost file's directory (/catalog) and glue on the desired path: /catalog + / + includes/configure.php. My guess is that PHP 5 does this differently: it uses the innermost caller's directory as "current", so /catalog/includes + / + includes/configure.php gives /catalog/includes/includes/configure.php, which doesn't exist. You can try the following: in /includes/application_top.php, find


and change it to


If that works, also change a few lines back

  if (file_exists('includes/local/configure.php')) include('includes/local/configure.php');


  if (file_exists('local/configure.php')) include('local/configure.php');


/admin/includes/application_top.php will need the same treatment, if that works.


If that doesn't do it, I dunno. I haven't found anything documented about any change in what's considered the "current directory" (.) in the PHP include path. Has anyone else seen anything?


If the change works, you can probably leave it permanently changed if you're already on PHP 5. If you're still on PHP 4 and worried about osC breaking when your host upgrades to PHP 5, you could test the PHP version and add the includes/ to the name if at lower than PHP 5 or so.


Back up your application_top.php files first, in case this doesn't work and you need to restore them!

Link to comment
Share on other sites

Thanks very much for the input. The following happens (suggesting you are on the right track): now it shows:

Warning: require(includes/functions/compatibility.php) [function.require]: failed to open stream: No such file or directory in /home/vhosts/...../...../htdocs/shop/includes/application_top.php on line 40

Fatal error: require() [function.require]: Failed opening required 'includes/functions/compatibility.php' (include_path='.;./includes;./pear') in /home/vhosts/...../...../htdocs/shop/includes/application_top.php on line 40


Again, file compatibility.php is there in the functions folder. In application_top it reads:

require(DIR_WS_FUNCTIONS . 'compatibility.php');


Any more hints??



Link to comment
Share on other sites

Well, I hesitate to have you change DIR_WS_FUNCTIONS to 'functions/' (from 'includes/functions/'), as that as may break something else. What you might try is in application_top.php, change

require(DIR_WS_FUNCTIONS . 'compatibility.php'); 


require('functions/' . 'compatibility.php'); 


The same "hard coding" of the path may unfortunately have to be done in a number of other places in application_top.php, as well as any place else where calls to includes/... are made from a PHP file in includes/.


Has anyone gotten any official word from PHP on changes in handling "current directory"? I find it hard to believe that such a major change would be made in PHP behavior without it being at least documented.

Link to comment
Share on other sites

Thanks so much for sticking with me on this one, Phil!

Now I at least have some action again, but have to rewrite column left an right to see what happens next. Will update later what happens!

Link to comment
Share on other sites

Now I can wrap up this topic - if anyone ever reads this, it might be helpful.


My provider answered (again) regarding this problem and wrote today: please check again - there was a mistake in the php.ini!

(which I cannot access myself).

Shop is healed. All is well.

Thanks again Phil.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...