Title: PHP Parse error: syntax error, unexpected &#8216;)&#8217; in &#8230;.file-input.php on line 55
Last modified: March 2, 2022

---

# PHP Parse error: syntax error, unexpected ‘)’ in ….file-input.php on line 55

 *  Resolved [amityweb](https://wordpress.org/support/users/amityweb/)
 * (@amityweb)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/php-parse-error-syntax-error-unexpected-in-file-input-php-on-line-55/)
 * Error in plugin, assume from recent update:
 * `PHP Parse error: syntax error, unexpected ')' in /home/mysite/public_html/wp-
   content/plugins/meta-box/inc/fields/file-input.php on line 55, referer: https://
   www.supercomputing.wales/wp-login.php`
 * Looking at the code, a trailing comma in sprintf on line 40 after esc_html__(‘
   Remove’, ‘meta-box’ ) causes it.
 * So change:
 *     ```
       return sprintf(
       			'<div class="rwmb-file-input-image %s">
       				<img src="%s">
       			</div>
       			<div class="rwmb-file-input-inner">
       				<input %s>
       				<a href="#" class="rwmb-file-input-select button">%s</a>
       				<a href="#" class="rwmb-file-input-remove button %s">%s</a>
       			</div>',
       			in_array( $file_ext, $extensions ) ? '' : 'rwmb-file-input-hidden',
       			$meta,
       			self::render_attributes( $attributes ),
       			esc_html__( 'Select', 'meta-box' ),
       			$meta ? '' : 'hidden',
       			esc_html__( 'Remove', 'meta-box' ),
       		);
       ```
   
 * To:
 *     ```
       return sprintf(
       			'<div class="rwmb-file-input-image %s">
       				<img src="%s">
       			</div>
       			<div class="rwmb-file-input-inner">
       				<input %s>
       				<a href="#" class="rwmb-file-input-select button">%s</a>
       				<a href="#" class="rwmb-file-input-remove button %s">%s</a>
       			</div>',
       			in_array( $file_ext, $extensions ) ? '' : 'rwmb-file-input-hidden',
       			$meta,
       			self::render_attributes( $attributes ),
       			esc_html__( 'Select', 'meta-box' ),
       			$meta ? '' : 'hidden',
       			esc_html__( 'Remove', 'meta-box' )
       		);
       ```
   

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

 *  Plugin Support [Neo WhiteRabbit](https://wordpress.org/support/users/longnguyen89/)
 * (@longnguyen89)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/php-parse-error-syntax-error-unexpected-in-file-input-php-on-line-55/#post-15425558)
 * Hi,
 * Thank you for your feedback.
 * Please update the PHP version to 7.3 or higher to fix this issue.
 *  [d2.roth](https://wordpress.org/support/users/d2roth/)
 * (@d2roth)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/php-parse-error-syntax-error-unexpected-in-file-input-php-on-line-55/#post-15435320)
 * Hey [@longnguyen89](https://wordpress.org/support/users/longnguyen89/),
    I ran
   into this same issue, and yes I am running 7.0.33 so it is out of date. If Meta
   Box requires a specific PHP version then please set it in the plugin header: `
   Requires PHP: 7.3`
 * Here was an old post from WordPress that includes that:
    [https://make.wordpress.org/plugins/2017/08/29/minimum-php-version-requirement/](https://make.wordpress.org/plugins/2017/08/29/minimum-php-version-requirement/)
    -  This reply was modified 4 years, 3 months ago by [d2.roth](https://wordpress.org/support/users/d2roth/).
 *  Thread Starter [amityweb](https://wordpress.org/support/users/amityweb/)
 * (@amityweb)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/php-parse-error-syntax-error-unexpected-in-file-input-php-on-line-55/#post-15435425)
 * Neo I can’t update it due to server age. What’s the point changing something 
   so minor to reduce compatibility? Why not just leave to work for all php versions?
   My fix fixes it for all php versions.
 *  Plugin Author [Anh Tran](https://wordpress.org/support/users/rilwis/)
 * (@rilwis)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/php-parse-error-syntax-error-unexpected-in-file-input-php-on-line-55/#post-15435937)
 * Hi [@amityweb](https://wordpress.org/support/users/amityweb/) [@d2roth](https://wordpress.org/support/users/d2roth/),
 * I’ve just fixed this and released a new version. Please update.

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

The topic ‘PHP Parse error: syntax error, unexpected ‘)’ in ….file-input.php on 
line 55’ is closed to new replies.

 * ![](https://ps.w.org/meta-box/assets/icon-128x128.png?rev=1100915)
 * [Meta Box](https://wordpress.org/plugins/meta-box/)
 * [Support Threads](https://wordpress.org/support/plugin/meta-box/)
 * [Active Topics](https://wordpress.org/support/plugin/meta-box/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/meta-box/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/meta-box/reviews/)

 * 4 replies
 * 4 participants
 * Last reply from: [Anh Tran](https://wordpress.org/support/users/rilwis/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/php-parse-error-syntax-error-unexpected-in-file-input-php-on-line-55/#post-15435937)
 * Status: resolved