Title: PHP version 5.3.29 Error: class.submit.php file line 156
Last modified: September 1, 2016

---

# PHP version 5.3.29 Error: class.submit.php file line 156

 *  [gonzalogg](https://wordpress.org/support/users/gonzalogg/)
 * (@gonzalogg)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/php-version-5329-error-classsubmitphp-file-line-156/)
 * Hi, i have a problem with the plugin.
 * I’m getting this error when i install the plugin:
 * > Parse error: syntax error, unexpected ‘[‘ in /home/public_html/wp-content/plugins/
   > cf7-mautic-extention/inc/class.submit.php on line 156
 * But it’s only happening on my production server with _PHP Version 5.3.29._
 * On my development server with _PHP Version 5.6.17_ the plugin fuctions perfectly.
 * This is the part of the code that’s giving the error, file _class.submit.php_:
 *     ```
       /**
       	 * Get User's IP
       	 *
       	 * @return string
       	 * @since 0.0.1
       	 */
       	private function _get_ip() {
       		$ip_list = [
       			'HTTP_CLIENT_IP',
       			'HTTP_X_FORWARDED_FOR',
       			'HTTP_X_FORWARDED',
       			'HTTP_X_CLUSTER_CLIENT_IP',
       			'HTTP_FORWARDED_FOR',
       			'HTTP_FORWARDED'
       		];
       		foreach ( $ip_list as $key ) {
       			if ( ! isset( $_SERVER[ $key ] ) ) {
       				continue;
       			}
       			$ip = esc_attr( $_SERVER[ $key ] );
       			if ( ! strpos( $ip, ',' ) ) {
       				$ips =  explode( ',', $ip );
       				foreach ( $ips as &$val ) {
       					$val = trim( $val );
       				}
       				$ip = end ( $ips );
       			}
       			$ip = trim( $ip );
       			break;
       		}
       		return $ip;
       	}
       }
       ```
   
 * I really don’t know how to solve this, can you help me?
 * Thanks in advance.
 * [https://wordpress.org/plugins/cf7-mautic-extention/](https://wordpress.org/plugins/cf7-mautic-extention/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [hide](https://wordpress.org/support/users/hideokamoto/)
 * (@hideokamoto)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/php-version-5329-error-classsubmitphp-file-line-156/#post-8418578)
 * Please try this.
    [https://github.com/amimoto-ami/cf7-mautic/issues/7#issuecomment-238140044](https://github.com/amimoto-ami/cf7-mautic/issues/7#issuecomment-238140044)

Viewing 1 replies (of 1 total)

The topic ‘PHP version 5.3.29 Error: class.submit.php file line 156’ is closed to
new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/cf7-mautic-extention_505c8d.svg)
 * [CF7 Mautic Extension](https://wordpress.org/plugins/cf7-mautic-extention/)
 * [Support Threads](https://wordpress.org/support/plugin/cf7-mautic-extention/)
 * [Active Topics](https://wordpress.org/support/plugin/cf7-mautic-extention/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cf7-mautic-extention/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cf7-mautic-extention/reviews/)

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [hide](https://wordpress.org/support/users/hideokamoto/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/php-version-5329-error-classsubmitphp-file-line-156/#post-8418578)
 * Status: not resolved