Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Incompatibility of v1.4.x with multi server environments #517

Closed
jotazzu opened this issue May 9, 2014 · 4 comments
Closed

Incompatibility of v1.4.x with multi server environments #517

jotazzu opened this issue May 9, 2014 · 4 comments

Comments

@jotazzu
Copy link

jotazzu commented May 9, 2014

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.

@lukecarbis
Copy link
Contributor

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.

@lukecarbis lukecarbis self-assigned this May 9, 2014
@jotazzu
Copy link
Author

jotazzu commented May 9, 2014

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.

@lukecarbis
Copy link
Contributor

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

shadyvb added a commit that referenced this issue May 10, 2014
.. as they don't change often and is waste of resources to loop on then on each run, also to maintain interoperability #517
@shadyvb
Copy link
Contributor

shadyvb commented May 10, 2014

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants