Title: PHP error on page
Last modified: August 21, 2016

---

# PHP error on page

 *  Resolved [mmadden](https://wordpress.org/support/users/mmadden/)
 * (@mmadden)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/php-error-on-page/)
 * I’ve just installed the plugin on a local (wamp) site which is not live yet. 
   I’m getting part of the content from the intended Facebook page. The name, link
   to site, like button, and icon are pulling in fine. Below that I have a scroll
   bar where the posts should be listed, but it is empty. Above, I have the following
   PHP error.
 * **Warning: Invalid argument supplied for foreach() in C:\wamp\www\heavencanwaitanimalrescue.
   com\wp-content\plugins\custom-facebook-feed\custom-facebook-feed.php on line 
   633**
 * I know only enough PHP to be dangerous, but I’m sure I echoed the shortcode correctly…
 * [https://wordpress.org/plugins/custom-facebook-feed/](https://wordpress.org/plugins/custom-facebook-feed/)

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/php-error-on-page/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/php-error-on-page/page/2/?output_format=md)

 *  Plugin Author [smashballoon](https://wordpress.org/support/users/smashballoon/)
 * (@smashballoon)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/php-error-on-page/#post-4868065)
 * Hey mmadden,
 * Could you tell me the following?
 * – The Facebook Page ID that you’re using
    – What your System Info says on the
   Support tab on the Settings page – Whether you receive an error or blank box 
   when clicking on the ‘Test connection to Facebook API’ button on the Support 
   tab
 * Thanks!
 * John
 *  Thread Starter [mmadden](https://wordpress.org/support/users/mmadden/)
 * (@mmadden)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/php-error-on-page/#post-4868077)
 * Thanks for the quick response…
 * The ID is 194705553884701
 * The System Info is:
    PHP Version: 5.3.13 Web Server Info: Apache/2.2.22 (Win64)
   PHP/5.3.13 PHP allow_url_fopen: Yes PHP cURL: No JSON: Yes
 * There is only a blank box below the ‘Test connection to Facebook API’ button.
 *  Plugin Author [smashballoon](https://wordpress.org/support/users/smashballoon/)
 * (@smashballoon)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/php-error-on-page/#post-4868141)
 * Your Page ID is good, all is working [in the demo](http://smashballoon.com/custom-facebook-feed/demo/?id=194705553884701).
   If you’re getting no response when testing the connection to Facebook’s API then
   one of 2 things is probably happening:
 * 1) There’s an issue with allow_url_fopen
    or 2) There’s something blocking your
   local server from connecting to the Facebook API.
 * To test #1, could you try adding the following to a test.php file in WAMP and
   see whether you get anything returned:
 * `<?php echo file_get_contents('http://www.wordpress.org'); ?>`
 * John
 *  Thread Starter [mmadden](https://wordpress.org/support/users/mmadden/)
 * (@mmadden)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/php-error-on-page/#post-4868189)
 * Test failed. I didn’t get anything back. Just another blank page.
 *  Plugin Author [smashballoon](https://wordpress.org/support/users/smashballoon/)
 * (@smashballoon)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/php-error-on-page/#post-4868211)
 * Could you check your php.ini file (WAMP > PHP > php.ini) and see whether allow_url_fopen
   is set to ‘On’: `allow_url_fopen = On`
 * If that is already set to On then can you search for the line which says:
    `;
   extension=php_curl.dll` and remove the semi-colon from the front so that it just
   reads `extension=php_curl.dll`
 * Can you then click on ‘Restart all Services’ in WAMP so that those changes takes
   affect.
 *  Thread Starter [mmadden](https://wordpress.org/support/users/mmadden/)
 * (@mmadden)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/php-error-on-page/#post-4868231)
 * The `allow_url_fopen` was already “On”. I removed the leading semicolon from 
   the `extension=php_curl.dll` and rechecked the .ini file. The changes took after
   restarting services, but the system information has not changed and the test 
   on the plugin page and the test.php file still yield a blank.
 *  Plugin Author [smashballoon](https://wordpress.org/support/users/smashballoon/)
 * (@smashballoon)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/php-error-on-page/#post-4868261)
 * I did a little research and it looks like there are 2 php.ini files which WAMP
   uses – 1 for PHP and 1 for apache – so you may need to make the changes in both.
   Could you try following the directions in the first answer [here](http://stackoverflow.com/questions/13021536/how-to-enable-curl-in-wamp-server)
   in order to enable cURL?
 *  Thread Starter [mmadden](https://wordpress.org/support/users/mmadden/)
 * (@mmadden)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/php-error-on-page/#post-4868264)
 * That didn’t do the trick, but I found a solution here…
 * [http://stackoverflow.com/questions/16379751/wampserver-orange-php-curl-dll](http://stackoverflow.com/questions/16379751/wampserver-orange-php-curl-dll)
 * …in the third answer down(just in case you get asked again). It worked for me.
   Sort of…
 * The system info is now yes, yes, yes, but when I test the connection I get code
   back instead of a rendered set of posts. I’m assuming it should be rendered. 
   On the page itself, I see profile pics and author names, but no post content.
   I’ve checked the settings and made sure I’m black text over white background.
   I’ve looked in the inspector and I see text within the `<span class="cff-text"
   ></span>` tags. The inline styles would leave to believe it should be showing
   up, but it’s not.
 * I also see the three notices below in the console…
 *     ```
       The "fb-root" div has not been created, auto-creating all.js:53
       Invalid App Id: Must be a number or numeric string representing the application id. all.js:53
       FB.getLoginStatus() called before calling FB.init().
       ```
   
 * I’m not sure if this is a separate issue or not. I can start another thread and
   mark this resolved if you prefer.
 *  Plugin Author [smashballoon](https://wordpress.org/support/users/smashballoon/)
 * (@smashballoon)
 * [12 years ago](https://wordpress.org/support/topic/php-error-on-page/#post-4868287)
 * When testing the connection to Facebook receiving code is the desired response–
   it’s just to test whether the raw data is being received from Facebook’s API.
   If you’re seeing the raw code then that’s a good sign.
 * So it sounds like the content is being generated but not being displayed correctly
   on your page. It’s difficult to troubleshoot without being able to see a link.
   Is there any way to put the site on a remote server so that I can view a link?
 * The fb notices in the console are nothing to be worried about. They’re just caused
   by Facebook’s “Like” box widget.
 *  Thread Starter [mmadden](https://wordpress.org/support/users/mmadden/)
 * (@mmadden)
 * [12 years ago](https://wordpress.org/support/topic/php-error-on-page/#post-4868293)
 * That’s good to hear. I’ll be posting the site to a remote server some time over
   the next two days. I’ll post a link once it’s up.
 *  [dn17](https://wordpress.org/support/users/dianar17/)
 * (@dianar17)
 * [12 years ago](https://wordpress.org/support/topic/php-error-on-page/#post-4868296)
 * Sorry to post in here, I am experiencing the same exact problem so I didn’t want
   to make a duplicate post.
 * Invalid argument supplied for foreach() in /home/u136975399/public_html/blog/
   wp-content/plugins/custom-facebook-feed/custom-facebook-feed.php on line 633
 * I have this settings:
 * PHP Version: 5.3.24
    Web Server Info: Apache PHP allow_url_fopen: Yes PHP cURL:
   Yes JSON: Yes
 * And test connection to facebook api returns a blank box. Both my page ID and 
   access token are correct. ‘Check for new Facebook posts every’ is set to 0 as
   mentioned above.
 * Any help would be appreciated!
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [12 years ago](https://wordpress.org/support/topic/php-error-on-page/#post-4868297)
 * **[@dianar17](https://wordpress.org/support/users/dianar17/)**: If you require
   assistance then, as per the [Forum Welcome](http://codex.wordpress.org/Forum_Welcome#Where_To_Post),
   please post your own topic instead of tagging onto someone else’s topic.
 *  Plugin Author [smashballoon](https://wordpress.org/support/users/smashballoon/)
 * (@smashballoon)
 * [12 years ago](https://wordpress.org/support/topic/php-error-on-page/#post-4868299)
 * Hey dianar17,
 * If your Page ID, Access Token and System Info are all good but you’re seeing 
   a blank box when testing the connection to the Facebook API then it usually means
   that something is blocking your site from connecting to Facebook’s API. This 
   is usually a security setting on your web server, such as a firewall or proxy,
   which is blocking the connection. Could you check with your web hosting support
   team whether any such security measure is in place? Let them know that you’re
   trying to connect to [https://graph.facebook.com](https://graph.facebook.com).
 * Feel free to start your own topic as esmi suggested, or you can also send a support
   request to me via the form on the [Support page](http://smashballoon.com/custom-facebook-feed/support/)
   on the website.
 * John
 *  Thread Starter [mmadden](https://wordpress.org/support/users/mmadden/)
 * (@mmadden)
 * [12 years ago](https://wordpress.org/support/topic/php-error-on-page/#post-4868340)
 * Sorry for the delay. I have it posted to [hcw.mmadden.net](http://hcw.mmadden.net).
   The feed is near the bottom of the page. I got the text to show up on my localhost
   as well, but just like on the live version, the text is colliding all over the
   place. Thanks!
 *  Plugin Author [smashballoon](https://wordpress.org/support/users/smashballoon/)
 * (@smashballoon)
 * [12 years ago](https://wordpress.org/support/topic/php-error-on-page/#post-4868341)
 * Hey again,
 * The reason for the funky formatting is that on line 12 of your theme’s style.
   css file you have the following CSS:
 *     ```
       .facebookFeed div {
         padding: 10px 20px;
         height: 20em;
       }
       ```
   
 * This is affecting all of the divs inside of your facebookFeed element. If you
   remove that code from your stylesheet then it will resolve the formatting issue.
 * Let me know if that fixes the problem,
 * John

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/php-error-on-page/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/php-error-on-page/page/2/?output_format=md)

The topic ‘PHP error on page’ is closed to new replies.

 * ![](https://ps.w.org/custom-facebook-feed/assets/icon-256x256.png?rev=2700775)
 * [Smash Balloon Social Post Feed - Simple Social Feeds for WordPress](https://wordpress.org/plugins/custom-facebook-feed/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-facebook-feed/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-facebook-feed/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-facebook-feed/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-facebook-feed/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-facebook-feed/reviews/)

## Tags

 * [php-error](https://wordpress.org/support/topic-tag/php-error/)

 * 17 replies
 * 4 participants
 * Last reply from: [smashballoon](https://wordpress.org/support/users/smashballoon/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/php-error-on-page/page/2/#post-4868353)
 * Status: resolved