Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
1  
Title: "Worpress" should be "Wordpress" - I don't have rep to edit –  Argalatyr Jul 12 '09 at 19:28
    
Yes it should... thanks. –  stevedbrown Jul 13 '09 at 3:29

2 Answers 2

up vote 1 down vote accepted

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).

share|improve this answer
    
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 eggblog.invertedegg.com/category/wordpress). Seems good now. –  stevedbrown Jul 13 '09 at 3:46

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.