Title: PHP Error
Last modified: August 20, 2016

---

# PHP Error

 *  Resolved [atez1231](https://wordpress.org/support/users/atez1231/)
 * (@atez1231)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/php-error-32/)
 * The following warning appears on activation:
 * Invalid argument supplied for foreach() in …\wordpress\wp-content\plugins\fantastic-
   elasticsearch\lib\nhp\options\options.php on line 257
 * [http://wordpress.org/extend/plugins/fantastic-elasticsearch/](http://wordpress.org/extend/plugins/fantastic-elasticsearch/)

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

 *  Plugin Author [Paris Holley](https://wordpress.org/support/users/parisholley/)
 * (@parisholley)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/php-error-32/#post-3418892)
 * PHP warnings should not be a cause for concern, nor should your site actively
   display them on pages. That being said, it probably wouldn’t hurt to write safer
   code.
 *  Plugin Author [Paris Holley](https://wordpress.org/support/users/parisholley/)
 * (@parisholley)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/php-error-32/#post-3419059)
 * going to mark this as resolved unless you find the plugin unusable
 *  [pjfry](https://wordpress.org/support/users/pjfry/)
 * (@pjfry)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/php-error-32/#post-3419191)
 * Hi I also get this error:
 * `PHP Warning: Invalid argument supplied for foreach() in /home/benny/onlinegilde/
   html/wp-content/plugins/fantastic-elasticsearch/lib/nhp/options/options.php on
   line 257, referer: [http://onlinegilde.net/wp-admin/admin.php?page=elastic_search&settings-updated=true](http://onlinegilde.net/wp-admin/admin.php?page=elastic_search&settings-updated=true)
 * This ends up in a Error 500 and my search isn’t working. So in this case is unusable
   for me.
 * I have a vserver with elasticsearch installed locally and php 5.4 and percona
   5.5 mysql database.
 * Maybe you have an idea how to solve this error 🙂
 * Elasticsearch itself is working because I had before WordPress Xenforo with elasticsearch
   installed and it worked just fine
 * Benny
 *  Plugin Author [Paris Holley](https://wordpress.org/support/users/parisholley/)
 * (@parisholley)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/php-error-32/#post-3419195)
 * PHP Warnings should not cause 500 errors unless you have it configured that way(
   through your own exception handler). You sure there isn’t any fatal errors in
   your apache logs? There is a pull request to remove the warning but I haven’t
   merged yet.
 *  [montepente](https://wordpress.org/support/users/montepente/)
 * (@montepente)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/php-error-32/#post-3419246)
 * I have the same problem, some warnings and then it ends in a fatal error, this
   happened when I tried upgrading from 1.2.3 to 2.1.0 in WP extension page :
 * PHP Fatal error: require_once() [[function.require0](https://wordpress.org/support/topic/php-error-32/0function.require0?output_format=md)]:
   Failed opening required ‘…/wp-content/plugins/fantastic-elasticsearch/lib/nhp/
   options/options.php’ in …/wp-content/plugins/fantastic-elasticsearch/elasticsearch.
   php on line 32
 *  [montepente](https://wordpress.org/support/users/montepente/)
 * (@montepente)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/php-error-32/#post-3419247)
 * Follow-up in case someone else gets this:
 * It might be caused by any cache you are using (APC, Memcached, etc). You can 
   try to restart those.
 * If this doesn’t work, you could try restarting elasticsearch as well
 * If all that fail to work, you could do a clean install. Remove the fantastic-
   elasticsearch folder, then go to WP extension page and add it again from there.

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

The topic ‘PHP Error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/fantastic-elasticsearch_608f2e.svg)
 * [Fantastic ElasticSearch](https://wordpress.org/plugins/fantastic-elasticsearch/)
 * [Support Threads](https://wordpress.org/support/plugin/fantastic-elasticsearch/)
 * [Active Topics](https://wordpress.org/support/plugin/fantastic-elasticsearch/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/fantastic-elasticsearch/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/fantastic-elasticsearch/reviews/)

 * 6 replies
 * 4 participants
 * Last reply from: [montepente](https://wordpress.org/support/users/montepente/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/php-error-32/#post-3419247)
 * Status: resolved