• Hello –

    I was upgrading my friend’s blog to latest and greatest version of WordPress and when I try to go the upgrade URL or even the home page I get the following message:

    Parse error: syntax error, unexpected T_ENDIF in /home/painfcom/public_html/wp-includes/pluggable.php on line 392

    The code for that area is:

    // Cookie safe redirect.  Works around IIS Set-Cookie bug.
    // https://support.microsoft.com/kb/q176113/
    if ( !function_exists('wp_redirect') ) :
    function wp_redirect($location, $status = 302) {
    	global $is_IIS;
    
    	$location = apply_filters('wp_redirect', $location, $status);
    
    	if ( !$location ) // allows the wp_redirect filter to cancel a redirect
    		return false;
    
    	$location = wp_sanitize_redirect($location);
    
    	if ( $is_IIS ) {
    		header("Refresh: 0;url=$location");
    	} else {
    		if ( php_sapi_name() != 'cgi-fcgi' )
    			status_header($status); // This causes problems on IIS and some FastCGI setups
    
    }
    endif;
    
    if ( !function_exists('wp_sanitize_redirect') ) :

    Any help would be greatly appreciated.

    ~Elyse

Viewing 7 replies - 1 through 7 (of 7 total)
  • Most likely, you have a corrupted file or your upgrade didn’t really happen. Did you delete and upload or overwrote?
    (line #392 in WP 2.3 is different than what you posted!)

    Thread Starter lysie6211

    (@lysie6211)

    Well I tried to overwrite once. Maybe it didn’t work properly. At first I thought it was an issue with the plugins (even though they were inactivated) and backed them up and removed them all.

    I’ll delete and try installing the new files again.

    Thanks for your time and patience.

    Thread Starter lysie6211

    (@lysie6211)

    Ok I redid the entire upgrade and now I have this error:

    WordPress database error: [Table ‘painfcom_wrdp1.wp_terms’ doesn’t exist]
    SELECT t.*, tt.*, tr.object_id FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN (‘category’, ‘post_tag’) AND tr.object_id IN (899, 898, 894, 891, 884) ORDER BY t.name ASC

    Warning: Cannot modify header information – headers already sent by (output started at /home/painfcom/public_html/wp-includes/wp-db.php:160) in /home/painfcom/public_html/wp-includes/pluggable.php on line 390

    Thank god I backed up! I’m getting scared!!

    If the “term” table doesn’t exist… your upgrade did NOT happen. That’s a new table in the WP 2.3 database structure.

    Thread Starter lysie6211

    (@lysie6211)

    When I go to the upgrade link I get a blank page.

    Thread Starter lysie6211

    (@lysie6211)

    Sorry here is the link.

    Thread Starter lysie6211

    (@lysie6211)

    OMG! I’m soooo sorry…total dumba$$ here. I forgot that the blog lands directly on the URL page.

    Everything is ok now.

    THANKS!!!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘unexpected T_ENDIF in pluggable.php’ is closed to new replies.