views:

775

answers:

2

For some strange reason I cannot figure out right now, NoEmbed.php fails with a fatal error when trying to include a file. include path is set correctly, I've verified that like below (right before the require_once directive in NoEmbed.php):

$s = ini_get('include_path');
$a = explode(':',$s);
foreach($a AS $path) {
    echo $path;
    if(file_exists($path.'/Zend/Gdata/Extension.php')) echo '...found<br/>';
    else  echo '...not found<br/>';
}

which outputs "found" within the location expected.

I must admit that I'm currently unable to think of any reason why this should happen, especialy since NoEmbed.php is included correctly. I've encountered similar problems with caching solutions, but they've all been deactivated or uninstalled by now without making any difference.

Edit: I just found that it works with "require" vs "require_once" (then throwing a redeclare error)... any possible reason for that?

A: 

Check the permissions and owner of the repertory where are the files, and the files ones two.

for instance dir could be 755 and files 644, with www-data as owner if you want to write into them.

p4bl0
permissions are fine. See my edit - it works with include. I've now discovers that "clearstatcache()" solves the problem around 99% of the time, but there's still occurances of the same fatal error even then. I'm pretty sure I'm overlooking something...
Flim
A: 

I just found that it works with "require" vs "require_once" (then throwing a redeclare error)... any possible reason for that?

That would explain my error too! It at times tries to include the file twice and somehow the second time it generates an error instead of silently returning... That would be the best explanation because the only other idea I had was a memory error (i.e. lack thereof).

And my permissions are fine too... 9-)

My problem is that I cannot generally reproduce the error in my case. I happens once a week or so... that process runs about 170 times a week...

Alexis Wilke