Title: [Plugin: File Gallery] Parse error
Last modified: August 20, 2016

---

# [Plugin: File Gallery] Parse error

 *  [grollaz](https://wordpress.org/support/users/grollaz/)
 * (@grollaz)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-file-gallery-parse-error/)
 * Hi, i have installed file galleri on my wp 3.3.1 and in top of admin i see always
   this message:
 * `Parse error: syntax error, unexpected T_STRING, expecting ')' in /myurl/domain.
   ext/wp-content/plugins/file-gallery/includes/media-settings.php(287) : runtime-
   created function on line 5`
 * What i can do?
    Thanks
 * [http://wordpress.org/extend/plugins/file-gallery/](http://wordpress.org/extend/plugins/file-gallery/)

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

 *  Plugin Author [Aesqe](https://wordpress.org/support/users/aesqe/)
 * (@aesqe)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-file-gallery-parse-error/#post-2526818)
 * [@grollaz](https://wordpress.org/support/users/grollaz/): which version of the
   plugin do you have installed?
 *  Thread Starter [grollaz](https://wordpress.org/support/users/grollaz/)
 * (@grollaz)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-file-gallery-parse-error/#post-2526878)
 * I use the last version of plugin
 *  Plugin Author [Aesqe](https://wordpress.org/support/users/aesqe/)
 * (@aesqe)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-file-gallery-parse-error/#post-2527175)
 * **[@grollaz](https://wordpress.org/support/users/grollaz/)**: I hope you’re still
   around, because I’d love to fix this.
 * Could you please try installing the latest beta of the plugin, and tell me if
   you still get this notice?
 * You can download it from here: [http://downloads.wordpress.org/plugin/file-gallery.zip](http://downloads.wordpress.org/plugin/file-gallery.zip).
 * Thank you! 🙂
 *  [amandajoonline](https://wordpress.org/support/users/amandajoonline/)
 * (@amandajoonline)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-file-gallery-parse-error/#post-2527185)
 * I tried the new version and have the same error. I am using Instant WordPress
   offline
 * Parse error: syntax error, unexpected T_STRING, expecting ‘)’ in D:\Documents\
   Amanda’s Work\InstantWP_4.1\iwpserver\htdocs\wordpress\wp-content\plugins\file-
   gallery\includes\media-settings.php(287) : runtime-created function on line 5
 * As soon as I activate the plugin the dashboard goes funky.
 * -Thanks!
    Amanda
 *  Plugin Author [Aesqe](https://wordpress.org/support/users/aesqe/)
 * (@aesqe)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/plugin-file-gallery-parse-error/#post-2527187)
 * **[@grollaz](https://wordpress.org/support/users/grollaz/), [@amandajoonline](https://wordpress.org/support/users/amandajoonline/)**:
   I haven’t been able to reproduce this error yet :/
 * Which other plugins do you have installed?
 *  [crmart](https://wordpress.org/support/users/crmart/)
 * (@crmart)
 * [14 years ago](https://wordpress.org/support/topic/plugin-file-gallery-parse-error/#post-2527204)
 * Hi guys
 * We got the same error and figured out why it happened and how you can fix it.
 * If you take a look at the file: plugins/file-gallery/includes/media-settings.
   php on line 270 (version 1.7.4.1), you’ll see this line:
    `$values = isset($val['
   values']) ? "'" . $val['values'] . "'" : 0;`
 * The problem occurs if in the $val[‘values’] content a single quote is present.
   
   So we fixed it as follows: `$values = isset($val['values']) ? "'" . str_replace("'","&
   apos;", $val['values']) . "'" : 0;`
 * I’m not 100% sure this is the actual correct way to fix it, but it seems to work
   perfectly fine on our site.
 *  Plugin Author [Aesqe](https://wordpress.org/support/users/aesqe/)
 * (@aesqe)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-file-gallery-parse-error/#post-2527208)
 * [@crmart](https://wordpress.org/support/users/crmart/): thanks for the useful
   info! I’ll fix it for v1.7.5.
 *  Plugin Author [Aesqe](https://wordpress.org/support/users/aesqe/)
 * (@aesqe)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-file-gallery-parse-error/#post-2527209)
 * [@all](https://wordpress.org/support/users/all/): please test with File Gallery
   v1.7.5, the problem should be fixed now.
 * [http://wordpress.org/support/topic/please-test-file-gallery-175](http://wordpress.org/support/topic/please-test-file-gallery-175)

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

The topic ‘[Plugin: File Gallery] Parse error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/file-gallery_fdfbfb.svg)
 * [File Gallery](https://wordpress.org/plugins/file-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/file-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/file-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/file-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/file-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/file-gallery/reviews/)

 * 8 replies
 * 4 participants
 * Last reply from: [Aesqe](https://wordpress.org/support/users/aesqe/)
 * Last activity: [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-file-gallery-parse-error/#post-2527209)
 * Status: not resolved