0

When I install wordpress plugins, I often get the error

Warning: include_once() [function.include]: Failed opening 
  '/usr/share/wordpress/wp-content/plugins/twitter-for-wordpress/' 
  for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in
  /usr/share/wordpress/wp-settings.php on line 473

I have Pear installed, but Ubuntu clearly didn't put it in the expected place. There must be an alias that can fix this, does anyone know what it is?

Thanks.

stevedbrown
  • 102
  • 1
  • 6

2 Answers2

1

This is most likely a permission issue, and nothing to do with Pear nor the include path - as the error message shows that include_once uses an absolute path and does not need to use the PHP include_path setting.

I suggest that you check that /usr/share/wordpress/wp-content/plugins/twitter-for-wordpress/ has permissions to allow the web server to read it. This should usually be 755 (rwxr-xr-x in ls -l).

Guss
  • 2,520
  • 5
  • 32
  • 55
  • That was the root problem. I used the wrong user to upload the plugin so it had the wrong permissions - then I needed to actually remove it, it turns out that fixing the permissions doesn't help after you've junked it (according to http://eggblog.invertedegg.com/category/wordpress/). Seems good now. – stevedbrown Jul 13 '09 at 03:46
0

If you're using PHP 5, you could try /usr/local/php5/lib/php/PEAR.

Adam Brand
  • 6,057
  • 2
  • 28
  • 40