WordPress.org

Ready to get started?Download WordPress

Forums

Alpine PhotoTile for Instagram
[resolved] Parse error: syntax error, unexpected '<' in */alpinebot-primary.php(380) (20 posts)

  1. JaKhris
    Member
    Posted 5 months ago #

    Hey there,

    I've been using this plugin for a few months and it's really excellent, does exactly what I need it to. Sadly, I added a picture today on Instagram and since, the gallery doesn't display anymore, instead I get this PHP error:
    Parse error: syntax error, unexpected '<' in /homepages/##/x#########/htdocs/wp-content/plugins/alpine-photo-tile-for-instagram/gears/alpinebot-primary.php(380) : eval()'d code on line 1

    This is my website: http://geekometric.com/

    I've tried to go in and edit the code to remove tags, or just the bracket. I also tried to remove any semicolons in case the result was serialized (since there was a comment on a picture with a ";)"), but I haven't made any progress. I didn't find where the code was used so I didn't get the chance to extract the code that is being fed to the eval() function. I've tried searching for this error but the only hits I get are other blogs with the same error.

    Any idea how I can fix this?

    Thanks a lot for you help!

    PS: If it helps, here are the hidden comments:
    <!-- Using AlpinePT for Instagram v1.2.6 with JSON--><!-- Request made --><!-- Try json_decoder() --><!-- An error occured: Empty JSON --><!-- Failed using wp_remote_get and JSON @ https://api.instagram.com/v1/users/#########/media/recent/?access_token=#########.xxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&count=12 --><!-- Sorry:<br><br>- Instagram feed not found.-->

    https://wordpress.org/plugins/alpine-photo-tile-for-instagram/

  2. JaKhris
    Member
    Posted 5 months ago #

    Quick update: it now works just fine. It must have been a temporary problem caused by Instagram's feed. Hopefully that's the last time I saw the error.

    Take care!

  3. theAlpinePress
    Member
    Plugin Author

    Posted 5 months ago #

    Thanks for letting me know. Yes, it looks like Instagram went down for a bit. Nonetheless, the plugin should be able to recover and say that Instragam is down rather than crashing. I'll look into it.
    Best, Eric

  4. nightowl99
    Member
    Posted 5 months ago #

    Hello Eric, I have the exact same problem.

    Have been trying to resolve with the host (Namecheap) but they are not sure what the plugin needs from their end.

    This is what it says in the error logs:

    PHP Parse error: syntax error, unexpected '<' in /home/xxxxxxxx/public_html/wp-content/plugins/alpine-photo-tile-for-instagram/gears/alpinebot-primary.php(380) : eval()'d code on line 1

    And this is in the "hidden comments":

    <!-- Failed using wp_remote_get and JSON @ https://api.instagram.com/v1/users/########/media/recent/?access_token=##########################################&count=60 -->

    Can you give us an idea what we're missing?
    Thank you!

    Edit: I had it set to num="30". When I reduced to num="25" the feed displayed again.

  5. nightowl99
    Member
    Posted 5 months ago #

    I spoke too soon. Sometimes it works for a moment, then we get a "Sorry: Instagram feed not found".

  6. theAlpinePress
    Member
    Plugin Author

    Posted 5 months ago #

    Can you please try the new update? I have also added a "Plugin Tools" page that should make it easier to identify problems.
    Best, Eric

  7. nightowl99
    Member
    Posted 5 months ago #

    Hi Eric,

    Thanks for responding!

    I tried the update, deleted and reinstalled the plugin, but I can't even add the user back. After adding the client IDs and authorizing I get "An error occured (No access token found)."

    The "Plugin Tools" tab reveals the following:

    Current PHP version of your server: 5.3.27
    Check: curl_init function found.
    Check: json_decode function found.

    Thank you,
    Anne

    P.S.: Perhaps I should also mention the the callback URI triggers a 404 according to my error logs.
    (/wp-admin/options-general.php?page=alpine-photo-tile-for-instagram-settings&tab=add)

  8. theAlpinePress
    Member
    Plugin Author

    Posted 5 months ago #

    Have you tried method 2 for adding users? It sounds to me like your server is either having trouble connecting out or parsing the response. At least that would explain the missing access token.

    I am not sure what to make of the 404 error. I always feel like I am trouble-shooting with a blindfold, but hopefully we can figure out what is wrong.

  9. theAlpinePress
    Member
    Plugin Author

    Posted 5 months ago #

    Also, I added another check to the Plugin Tools page, if you wouldn't mind deleting and re-installing again...

  10. nightowl99
    Member
    Posted 5 months ago #

    Yes, I tried method 2 but was not able to add user either. That's when I get a 404 page. It's just strange that it worked fine for a while and then stopped without anyone touching the site. This seems to indicate either a change in the server setup or the Instagram API, no?

  11. nightowl99
    Member
    Posted 5 months ago #

    Update: After I saw your last message I did delete/reinstall, and now it works!

    Woo-Hoo! Let's hope it'll stick. Thanks so much, Eric!

  12. theAlpinePress
    Member
    Plugin Author

    Posted 5 months ago #

    Oh great :) Glad I could help.
    Cheer, Eric

  13. nightowl99
    Member
    Posted 5 months ago #

    Sorry to say, this morning the feed was down again. So I had another look at the new Plugin Tools tab, and the System Check says:

    Check: Plugin failed to connect to Instagram.com.
    Code: 500, Message: Internal Server Error.

    Further down in the Plugin Loading Test, I entered the shortcode and got the same errors for the first part (Loading from Instagram Feed), resulting in the "Sorry, Feed not found" output.

    The second part (Load from cache) worked fine and displayed the feed.

    After performing this test the feed displays again on the front end.

  14. theAlpinePress
    Member
    Plugin Author

    Posted 5 months ago #

    Ok, an Internal Server Error is beyond my control. It sounds like the server hosting your website is (periodically) unable to connect to Instagram. In other words, it has all the necessary tools and the code works, but the server fails nonetheless.

    You could try some other Instagram plugins. Maybe they do something differently, but I suspect the problem is with the reliability of your hosting provider.

  15. nightowl99
    Member
    Posted 5 months ago #

    It's very well possible that the problem is with the server side of things. However, Namecheap is otherwise a good provider, and they are very willing to help. It's just that they don't know what could be missing that would make the plugin work better.

    A search on Google for the direct phrase match of the error output

    "wp-content/plugins/alpine-photo-tile-for-instagram/gears/alpinebot-primary.php(380) : eval()'d code on line 1"

    yields over 6000 results, indicating that this may be a widespread issue that is not limited to my particular install. It's a shame because I really love this plugin otherwise.

    Thank you,
    Anne

  16. theAlpinePress
    Member
    Plugin Author

    Posted 5 months ago #

    Are you still getting that message? That error is the reason for the most recent update. Did I not fix it?

  17. nightowl99
    Member
    Posted 5 months ago #

    Oh no, right now it is working on the front end. Although, on the "Tools" tab I now get errors in both, "Load from IG Feed" and "Load from Cache". I will keep an eye on it and report if the issue reappears.

    Once again, thank you so much for your hard work! I did send a "cuppa" your way last night... :)

  18. nightowl99
    Member
    Posted 5 months ago #

    And once again it had stopped with "Sorry: Feed not found" error. After I went to the Tools tab, entered a shortcode to test, same thing happened as before. Load from cache works again, and the feed is showing images on the front once more.

    So, could it be a caching issue? I'm not using any caching plugins.

  19. theAlpinePress
    Member
    Plugin Author

    Posted 5 months ago #

    I am really sorry you are experiencing so much trouble. Working with WordPress should be quick and easy, and this certainly has not been the case.

    Honestly, my best advice is to try another plugin. If another plugin works, the problem is with my plugin (which I would greatly appreciate hearing about. I could then check what they do differently and try to isolate the issue). If errors continue, the problem is with your server. I do not mean to suggest that your hosting provider is bad. The plugin must make several requests to Instagram and parse the results. The reason for the cache is that this is a slow and demanding task. However, you are seeing inconsistent behavior, which makes it really hard to identify the problem (especially if I cannot reproduce it).

    If it helps, you can tell your hosting provider that the plugin needs the cURL and JSON extensions for PHP (which you clearly already have) and that you have noticed it inconsistently connects to instagram.com (which could very well be the plugin's fault).

    Sorry again for your trouble. I enjoy the problem-solving of coding, but I certainly know that it can be frustrating to spend so much time and not feel like the problem has been fixed.

    -Eric

  20. ddashfens
    Member
    Posted 4 months ago #


Reply

You must log in to post.

About this Plugin

About this Topic