This topic was marked solved by Arantor, on November 5th, 2012, 01:29 AM

Anthony`

  • Posts: 53
open_basedir and Cache Errors
« on November 4th, 2012, 07:15 PM »
Looks like there is another open_basedir issue here (this setting is quite a pain in the arse)...

I noticed I had 4 errors in the error log after installing Wedge:
Quote
2: Invalid argument supplied for foreach()
File: /home/projecte/public_html/dexterslab/wedge/Sources/Subs-Cache.php
Line: 766

2: Invalid argument supplied for foreach()
File: /home/projecte/public_html/dexterslab/wedge/Sources/Subs-Cache.php
Line: 553
Line 766,
Code: [Select]
foreach (glob($jsdir . '/' . $id. '*' . $ext) as $del)
Line 553,
Code: [Select]
foreach (glob($final_folder . '/' . ($id ? $id . '-*' : '[0-9]*') . $ext) as $del)

The open_basedir setting on my host does have a value according to phpinfo(). Resetting the file cache reproduced these errors, so it seems iterating through the cached CSS and JS files are a problem.

After looking at this,
https://bugs.php.net/bug.php?id=47358

It seems glob() is returning boolean false rather than an empty array. Obvious fix: check beforehand whether it's false and if so make it an empty array.


live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,670
A confident man keeps quiet.whereas a frightened man keeps talking, hiding his fear.

Anthony`

  • Posts: 53

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: open_basedir and Cache Errors
« Reply #3, on November 4th, 2012, 11:31 PM »
There are also other issues with open_basedir like the bug in cURL I haven't fixed yet >_>
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial