-
Notifications
You must be signed in to change notification settings - Fork 36
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
Missing wp core files in includes/classes/utils-s2o.inc.php #39
Comments
Got it, thank you. I was able to reproduce this on a WP installation that has it's content outside of the WordPress installation path. It's an interesting problem to work around. I'll give this some more thought and come back. Your temporary solution seems like a good one for you. |
Jason, Here's a thought. What about parsing (not running) the wp-config.php file to find the PATH variables? It looks like wp-config.php will load wp-settings, so running the file will do more than we need. But it would be a method to find where the WP install is located. |
Hmm, well the In short, if s2Member is installed in a non-standard location that's fine, but if it's installed completely outside of the WordPress directory all together, this could become an issue in the case of I'm not sure there is a good way to achieve a detection in this scenario. Perhaps we could offer a workaround though. I will come back to this before the next maintenance release. In the mean time, if you think of anything else please let me know. Thanks! |
Jason, Here's a thought .... What if we add an mu_plugin file that defines a variable for the wp_dir It adds four lines to the stock s2member code, but that code would only be I've tested it out on my local dev environment and it appears to be working NOTE: This is all based on my assumption that s2member is installed as a I hope that helps.
mu_plugin/s2mu_wp_dir.phpsection from utils-s2o.inc.php starting at line 37public static function wp_dir ($starting_dir = FALSE, $alt_starting_dir = foreach(array($starting_dir, $alt_starting_dir) as $directory)On Tue, Jan 14, 2014 at 10:38 AM, Jason Caldwell
Troy Pesola |
I agree this could be a possible solution. Thank you! |
Another possible solution would be an environment variable we could look for. That could be cleaner and less expensive than checking for a file. What do you think of this? Would this be easier or harder in your opinion.
|
I haven't had a reason to mess with environment variables on share hosting The thing that I like about the mu_plugin file is that it "seems" to fit On Wed, Jan 15, 2014 at 5:10 AM, Jason Caldwell notifications@github.heygears.comwrote:
Troy Pesola |
One way to set an environment variable in a shared hosting environment is via You can add this line...
Or, this can also be done via Mod Rewrite.
|
Jason, In the fix in GitHub the code isn't setting the $wp_dir variable. Does That looks like a great fix. Adding the environment variable to htaccess Thanks, On Wed, Jan 15, 2014 at 1:48 PM, Jason Caldwell notifications@github.com
Troy Pesola On Wed, Jan 15, 2014 at 1:28 PM, Jason Caldwell notifications@github.heygears.comwrote:
Troy Pesola |
No, it's not necessary.
Just once in the root |
Great. I patched my local copy and tested it out. Looks good. Do you know when this will be pushed? I'm debating about updating to the On Wed, Jan 15, 2014 at 4:06 PM, Jason Caldwell notifications@github.heygears.comwrote:
Troy Pesola |
Great! Thanks for the test. |
I think I found a problem in the ClickBank IPN code.
There is a script that is included but isn't loading at the foot of the document for the registration page. the src url is
/content/plugins/s2member/s2member-o.php?ws_plugin__s2member_js_w_globals=1&qcABC=1&ver=131126-131126-3930270073
If I load it from a browser I get a 500 error from line 48 from includes/classes/utils-s2o.inc.php
The path is correct. My wordpress is installed in a wp folder. The wp folder does NOT have a content sub-folder.
SO ... the function wp_dir will not find the wordpress core. To test it out I modified line 39 to include the base /wp directory
foreach(array($starting_dir, $alt_starting_dir, '../../../wp') as $directory)
The text was updated successfully, but these errors were encountered: