Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • I am a little surprised with myself at having actually been able to fix this, but I have managed to do so, at least partially!

    The error in question is caused by a call to file_get_contents() in the xivdb.php parser. The path around it is to grab the contents of that URL via curl.

    So here’s the function I used to grab the contents:

    function get_content($URL){
    	    $ch = curl_init();
    	    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    	    curl_setopt($ch, CURLOPT_URL, $URL);
    	    $data = curl_exec($ch);
    	    curl_close($ch);
    	    return $data;
    	}

    I placed this outside other functions in the xivdb.php parser file (spot patch!)

    Then in the get_xivdb_data function, i replaced the line calling file_get_contents() with a line calling the new function.

    New line:

    $info = json_decode(get_content("https://xivdb.com/modules/fpop/fpop.php?id=".$ID."&lang=".$lang."&type=".$type."&version=".$version), true);

    This may not be the most elegant fix, but hopefully it helps! Looking forward to future updates of this great plugin!

    So I just read the logs and realized what the issue was, so I uninstalled, unzipped the beta file and renamed the directory there from wp-onebox-master to onebox, then reinstalled, and it looks like the plugin is nearly working now!

    I’ll direct you back to my test page:
    https://navigatorxiv.com/test-page/

    And here’s the error log:

    [18-Aug-2014 20:04:04 UTC] PHP Warning:  file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/parsers/xivdb.php on line 34
    [18-Aug-2014 20:04:04 UTC] PHP Warning:  file_get_contents(https://xivdb.com/modules/fpop/fpop.php?id=7351&lang=en&type=item&version=1.6): failed to open stream: no suitable wrapper could be found in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/parsers/xivdb.php on line 34

    Looks like it’s still getting stuck on that point, though it’s finding some meta data to display at least?

    [18-Aug-2014 18:54:55 UTC] PHP Warning:  include(/home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/render.php): failed to open stream: No such file or directory in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/wp-onebox-master/onebox.php on line 212
    [18-Aug-2014 18:54:55 UTC] PHP Warning:  include(): Failed opening '/home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/render.php' for inclusion (include_path='.:/opt/alt/php54/usr/share/pear:/opt/alt/php54/usr/share/php') in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/wp-onebox-master/onebox.php on line 212

    ??

    I do not have it enabled. If your next question is to ask me to try turning it on, I’m not actually sure how to do that with my host.

    Along with that notice, I do also get the two notices associated with not having GeoIP PHP and Alternative PHP Cache enabled. Should have been clear on that, my apologies.

    In fact, I do!

    Notice: The allow_url_fopen property (for retrieving data from external websites) is disabled in your PHP configuration. Onebox will attempt to use an alternative method (in most cases this should not cause any problems).

    Hey there,

    Sorry for the delayed response – I have installed your beta version, and I still seem to be experiencing the issue.

    My host provider is Lithium Hosting, and I have a shared hosting plan with them. I looked through their documentation on allowing changes to php.ini, and it looks like there’s limited access there, but allow_url_fopen cannot be changed.

    Let me know if there’s any other information I can provide.

    Hey there,

    I’m not sure if I’m having the same issue as greenery, but I’m having something that at least sounds similar. I made a page with a onebox call here: https://navigatorxiv.com/test-page/

    Unfortunately, I need to turn off debug for the site because I’m lazy and do all my code edits without a dev site, but hopefully the information below is thorough enough to help suss out what’s going on.

    With debug mode disabled:
    The Onebox styling appears, but the text “No description available for this site” is displayed. A link to the site referenced is included. Screenshot: https://i.imgur.com/iu4iuwm.png

    With debug mode enabled:
    No box appears, only a link with the text “Link,” pointing out to the referenced site. Screenshot: https://i.imgur.com/mGX0T6o.png

    Error log can be found here, including a bit of history. Potentially unrelated stuff in there, but each set of timestamps roughly is associated with a separate pageload. Not sure what’s going on with the debug mode changing what I see, but if there’s any error reporting on the non-debug app, it should be visible in this log as well.

    [15-Aug-2014 16:32:58 UTC] PHP Strict Standards:  Redefining already defined constructor for class WPPlugin in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/wp-recaptcha/wp-plugin.php on line 28
    [15-Aug-2014 16:32:58 UTC] PHP Strict Standards:  Redefining already defined constructor for class MailHide in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/wp-recaptcha/mailhide.php on line 15
    [15-Aug-2014 16:33:04 UTC] PHP Strict Standards:  Redefining already defined constructor for class reCAPTCHA in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/wp-recaptcha/recaptcha.php on line 17
    [15-Aug-2014 16:33:04 UTC] PHP Strict Standards:  Redefining already defined constructor for class WPPlugin in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/wp-recaptcha/wp-plugin.php on line 28
    [15-Aug-2014 16:33:04 UTC] PHP Strict Standards:  Redefining already defined constructor for class MailHide in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/wp-recaptcha/mailhide.php on line 15
    [15-Aug-2014 16:33:04 UTC] PHP Strict Standards:  call_user_func_array() expects parameter 1 to be a valid callback, non-static method allow_php_in_posts::shortcode_advanced() should not be called statically in /home/stnrrdme/public_html/navigatorxiv.com/wp-includes/plugin.php on line 192
    [15-Aug-2014 16:33:04 UTC] PHP Strict Standards:  Non-static method allow_php_in_posts::option_get() should not be called statically in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/allow-php-in-posts-and-pages/allowphp.php on line 396
    [15-Aug-2014 16:33:04 UTC] PHP Strict Standards:  call_user_func_array() expects parameter 1 to be a valid callback, non-static method allow_php_in_posts::shortcode_advanced() should not be called statically in /home/stnrrdme/public_html/navigatorxiv.com/wp-includes/plugin.php on line 192
    [15-Aug-2014 16:33:04 UTC] PHP Strict Standards:  Non-static method allow_php_in_posts::option_get() should not be called statically in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/allow-php-in-posts-and-pages/allowphp.php on line 396
    [15-Aug-2014 16:33:04 UTC] PHP Strict Standards:  call_user_func_array() expects parameter 1 to be a valid callback, non-static method allow_php_in_posts::shortcode_advanced() should not be called statically in /home/stnrrdme/public_html/navigatorxiv.com/wp-includes/plugin.php on line 192
    [15-Aug-2014 16:33:04 UTC] PHP Strict Standards:  Non-static method allow_php_in_posts::option_get() should not be called statically in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/allow-php-in-posts-and-pages/allowphp.php on line 396
    [15-Aug-2014 16:33:28 UTC] PHP Warning:  file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/render.php on line 121
    [15-Aug-2014 16:33:28 UTC] PHP Warning:  file_get_contents(https://github.com/surrealroad/wp-onebox): failed to open stream: no suitable wrapper could be found in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/render.php on line 121
    [15-Aug-2014 16:33:28 UTC] PHP Warning:  DOMDocument::loadHTML(): Empty string supplied as input in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/render.php on line 133
    [15-Aug-2014 16:33:28 UTC] PHP Warning:  simplexml_import_dom(): Invalid Nodetype to import in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/parsers/favicon.php on line 25
    [15-Aug-2014 16:35:32 UTC] PHP Strict Standards:  Redefining already defined constructor for class reCAPTCHA in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/wp-recaptcha/recaptcha.php on line 17
    [15-Aug-2014 16:35:32 UTC] PHP Strict Standards:  Redefining already defined constructor for class WPPlugin in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/wp-recaptcha/wp-plugin.php on line 28
    [15-Aug-2014 16:35:32 UTC] PHP Strict Standards:  Redefining already defined constructor for class MailHide in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/wp-recaptcha/mailhide.php on line 15
    [15-Aug-2014 16:35:32 UTC] PHP Warning:  file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/render.php on line 121
    [15-Aug-2014 16:35:32 UTC] PHP Warning:  file_get_contents(https://github.com/surrealroad/wp-onebox): failed to open stream: no suitable wrapper could be found in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/render.php on line 121
    [15-Aug-2014 16:35:32 UTC] PHP Warning:  DOMDocument::loadHTML(): Empty string supplied as input in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/render.php on line 133
    [15-Aug-2014 16:35:32 UTC] PHP Notice:  Trying to get property of non-object in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/parsers/opengraph.php on line 25
    [15-Aug-2014 16:35:32 UTC] PHP Notice:  Trying to get property of non-object in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/parsers/opengraph.php on line 26
    [15-Aug-2014 16:35:32 UTC] PHP Notice:  Trying to get property of non-object in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/parsers/opengraph.php on line 27
    [15-Aug-2014 16:35:32 UTC] PHP Notice:  Trying to get property of non-object in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/parsers/opengraph.php on line 32
    [15-Aug-2014 16:35:32 UTC] PHP Notice:  Trying to get property of non-object in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/parsers/meta.php on line 21
    [15-Aug-2014 16:35:32 UTC] PHP Warning:  simplexml_import_dom(): Invalid Nodetype to import in /home/stnrrdme/public_html/navigatorxiv.com/wp-content/plugins/onebox/parsers/favicon.php on line 25

    edit: trimmed down the error log a little bit (removed repeated messages from unrelated plugins)

Viewing 7 replies - 1 through 7 (of 7 total)