Title: [Plugin: WP-Invites] PHP Parse Error
Last modified: August 19, 2016

---

# [Plugin: WP-Invites] PHP Parse Error

 *  [scv0](https://wordpress.org/support/users/scv0/)
 * (@scv0)
 * [16 years ago](https://wordpress.org/support/topic/plugin-wp-invites-php-parse-error/)
 * I’ve got this PHP error message when activating the plugin under Wordperss 2.9.2:
 * > Parse error: syntax error, unexpected ‘}’ in /home/a3164889/public_html/wp-
   > content/plugins/wp-invites/wp-invites.php on line 157
 * [http://wordpress.org/extend/plugins/wp-invites/](http://wordpress.org/extend/plugins/wp-invites/)

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

 *  Thread Starter [scv0](https://wordpress.org/support/users/scv0/)
 * (@scv0)
 * [16 years ago](https://wordpress.org/support/topic/plugin-wp-invites-php-parse-error/#post-1495117)
 * Tried to install automatically via WP – everything works fine! Oo
 *  [jqmenn](https://wordpress.org/support/users/jqmenn/)
 * (@jqmenn)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/plugin-wp-invites-php-parse-error/#post-1495436)
 * Help! I have the same thing! gives the error
 * Parse error: syntax error, unexpected ‘)’ i. …………………………….. ……… / htdocs / wp-
   content / plugins / wp-invites / wp-invites.php on line 157
 * What? How to install a plugin ????? WordPress version 3.0
 *  [Jehy](https://wordpress.org/support/users/jehy/)
 * (@jehy)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-invites-php-parse-error/#post-1495454)
 * That’s trouble with your hosting or FTP manager.
    Try installing via wordpress
   admin tools.
 *  [Gene53](https://wordpress.org/support/users/gene53/)
 * (@gene53)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-invites-php-parse-error/#post-1495458)
 * > That’s trouble with your hosting or FTP manager.
   >  Try installing via wordpress
   > admin tools.
 * Since a few people have reported this parse error, I think the problem lies in
   your code.
 * I installed this plugin on 3 different WP sites with different hosting companies
   and I get the infamous parse error on line 157. I tried both the automatic installs
   and FTP but to no avail.
 * While you’re at it, you should also insert a space between Error: and Wrong in
   the **Error:**Wrong invite code line.
 * Cheers
 *  [lalitkishore](https://wordpress.org/support/users/lalitkishore/)
 * (@lalitkishore)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/plugin-wp-invites-php-parse-error/#post-1495467)
 * I am having a peculiar problem. I am using the plugin along with the widget in
   wordpress 3.0.1. Everything works fine and the mails are delivering. But when
   an invite is send to a mail with a period as allowed by gmail it sends the mail
   to the email address including portion after the period. For example I sent an
   invite to [lalit.kishore@gmail.com](https://wordpress.org/support/topic/plugin-wp-invites-php-parse-error/lalit.kishore@gmail.com?output_format=md)
   but when I checked the mail delivery logs the mail was sent to [kishore@gmail.com](https://wordpress.org/support/topic/plugin-wp-invites-php-parse-error/kishore@gmail.com?output_format=md)
   and the result was that the mail was not delivered. This was not the only instance
   and the same behavior was shown in mails having similar ids. I am sure there 
   must be some solution to it.
 *  [Jehy](https://wordpress.org/support/users/jehy/)
 * (@jehy)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/plugin-wp-invites-php-parse-error/#post-1495468)
 * Plugin does not send any emails by itself.
    If you mean registration emails –
   those are send with wordpress mechanics, and the trouble is wordpress bug.
 *  [GoodSoul](https://wordpress.org/support/users/goodsoul/)
 * (@goodsoul)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-wp-invites-php-parse-error/#post-1495478)
 * The plugin does not work on WP 3.1 and BP 1.2.8. Emails are not coming to users,
   although the plugin reports that the message was successfully sent.
 *  [tritonBear](https://wordpress.org/support/users/tritonbear/)
 * (@tritonbear)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-wp-invites-php-parse-error/#post-1495479)
 * I had the same thing happen on a fresh new wp install where using wp-invites 
   widget and inviting emails containing periods resulted in a parsing error.
 * Found the culprit here:
    file: plugins/wp-invites-widget/wp-invites-widget.php
 *     ```
       function ajax_wp_invites_widget () {
         preg_match_all ('/([a-zA-Z0-9])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+/i', $_POST ['email'], $emails);
       ```
   
 * Changed preg_match_all regex to:
 * `preg_match_all ('/([a-zA-Z0-9\._-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+/i',
   $_POST ['email'], $emails);`
 * I added ‘_’ and ‘-‘ to the regex as well since those are also common in emails.
   Is this regex even needed?

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

The topic ‘[Plugin: WP-Invites] PHP Parse Error’ is closed to new replies.

 * 8 replies
 * 7 participants
 * Last reply from: [tritonBear](https://wordpress.org/support/users/tritonbear/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/plugin-wp-invites-php-parse-error/#post-1495479)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
