Skip to:
Content
Pages
Categories
Search
Top
Bottom

Parse Error and Warning

  • We seem to be having trouble with our Buddypress install whenever a new user tries to register for the site. After filling out the register form, the following error shows up at the top of the page:

    Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’ in /var/www/vhosts/tailsinc.com/httpdocs/wp-content/plugins/buddypress/bp-core/bp-core-signup.php(104) : runtime-created function on line 1

    And then right below the form, the following appears:

    Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ” was given in /var/www/vhosts/tailsinc.com/httpdocs/wp-includes/plugin.php on line 405

    I’ve never seen these errors before, and they only seem to have started occurring as of recent. We did switch web hosts as well as performed the WordPress upgrade to 3.2.1, so I’m not sure what has happened. We’re also experiencing errors with php mail(), of which we have our web host looking into… Is anyone else experiencing these errors since the upgrade? Could anyone point me in the right direction to fix these errors?

    Thanks very much in advance everyone! :-)

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

  • @mercime
    Keymaster

    @mercime

    So many things have happened recently to your install – from switching hosts to upgrading WP and BP. Which webhost did you transfer to?

    For mail porblems, some have found resolution via
    https://wordpress.org/extend/plugins/wp-mail-smtp/ or an older plugin https://wordpress.org/extend/plugins/mail-from/

    As for “syntax error, unexpected T_STRING” some solutions:
    1. Re-upload WP files manually i.e. via FTP/cpanel
    2. Re-upload BP files manually
    3. Check PHP version of new server, min. required is PHP 5.2.4
    4. Missing backslash before single quote ‘
    5. Delete space betweent `<?` and `php` to correct `<?php`

    Hi mercime–thanks for your advice! The SMTP plugin works great for the forms.

    We are still experiencing the parse error and the warning messages though. I uploaded all fresh files for both WP and BP and the same errors are still coming up when someone tries to sign up for our site. We’re running php 5.2.11, I double checked the syntax of <?php and there's no space in there, and I reviewed the referenced lines of code in the error messages and cannot find any back slashes or missing pieces…

    I did also notice that our ability to upload images to our media folder is no longer working as well… Has anyone else experienced these sort of “bundled” errors with the new WP updates?

    I saw another user was experiencing the same parse error as we were, and made a manual change to the functions.php file–but I’m incredibly hesitant to touch that as the install was working perfectly before the recent updates/move to new web host. Plus, for our setup, alteration of the functions.php file is overkill and shouldn’t really be needed (from what I can tell).

    OH–for reference, we’re running a VPS with Lunarpages. Anyone out there have any potential advice for us?

    Thanks again!

    Hey Everyone,

    I wanted to give everyone an update as to the troubles I was experiencing and how they were resolved.

    First–the email problem seems to have been fixed with the SMTP plugin. Thanks again mercime!

    The Parse error and warning message we were receiving have been rectified by a server-side fix. We run a VPS with Lunarpages and come to find out a component called suPHP was not installed (suPHP is apparently what shared servers run, and seems to be pretty important in ensuring the basic functionality in WordPress and Buddypress actually works by allowing web users to write to the directories without changing the directory permissions to the dreaded, unsecure 777). By installing and setting up suPHP in addition to running PHP 5.2.11, the parse errors, warnings, and image uploading permission problems have been fixed, as well our WordPress-writable file/directory permissions are functioning perfectly at 755 and more sensitive file permissions are at 644.

    So overall, most of the fix was rooted in our VPS not running suPHP and needing to get it installed and configured correctly.

    I hope this helps someone else out there experiencing the same problems as we were!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Parse Error and Warning’ is closed to new replies.
Skip to toolbar