xwp / stream

🗄️ Stream plugin for WordPress

Home Page:https://wordpress.org/plugins/stream/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incompatibility of v1.4.x with multi server environments

jotazzu opened this issue · comments

After successfully testing the plugin versions 1.4.x on a single server development system I updated v1.4.4 on the multi server production environment (2 hardware servers behind a loadbalancer). This resulted in a malfunction of the plugin.

As I found the absolute file system paths are saved with function wp_cache_set() in file connectors.php beginning with v1.4.x. Usually multi server environments save their data in common database and cache instances. Thus the absolute file paths set from server 2 will be used on server 1 if a cache entry is found. But the file system paths are different on both servers.

This results in error log entries like the following:

[Thu May 08 17:39:14 2014] [error] [client xxx.xxx.xxx.10] PHP Warning:  include_once(): open_basedir restriction in effect. File(/home/www/sites/xxx.xxx.xxx.16/site/wp-content/plugins/stream/connectors/blogs.php) is not within the allowed path(s): (/home/www/sites/xxx.xxx.xxx.15:/usr/share/php/:/usr/share/pear/:/home/www/conf/progs/) in /home/www/sites/xxx.xxx.xxx.15/site/wp-content/plugins/stream/includes/connectors.php on line 45

The include for file blogs.php is requested from the wrong server which results in an open_basedir violation.

I don't think that caching the absolute file system paths is critical and would recommend to avoid this kind of caching to keep interoperability of the plugin.

Hi Jotazzu,

Thanks for letting us know! As you can imagine, it's quite difficult for us to test on all the multisite variations people have in use.

Our team is busy at WordCamps (Miami and Wellington) all weekend, but I'm going to take a look into this on Monday for you.

Hi Luke,

Thank you for the quick answer.

Not sure if you have misread my comment. This problem does not relate to WP Multisite installations. It is related to multi server environments.

I've haven't had problems with plugins cashing the system file paths up to now. But parallel to this plugin the plugin ithemes Security Pro (formerly Better WP Security) added a similiar caching behaviour which resulted in a massive number of error 500 pages on my installation.

Thus I try to prevent optimisations in the quest for speed which might exclude a whole class of installation types.

I totally just skim read your post! Sorry. I'll look at this Monday.

@lukecarbis Let me steal this one from you, simple fix introduced in #520 should take care of this.