Title: PHP coding problem
Last modified: August 19, 2016

---

# PHP coding problem

 *  Resolved [izaca](https://wordpress.org/support/users/izaca/)
 * (@izaca)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/php-coding-problem/)
 * I’m receiving an error message:
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/izacacom/public_html/blog/wp-content/themes/Izaca_blog/functions.php:
   11) in /home/izacacom/public_html/blog/wp-includes/pluggable.php on line 39
 * …when I go to my blog with the www in the url ([http://www.izaca.com/blog](http://www.izaca.com/blog)),
   but it works correctly when the ‘www.’ is taken out ([http://izaca.com/blog](http://izaca.com/blog)).
   The PHP code that its referring to is below, but I don’t know how to fix it.
 *     ```
       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
       		header("Location: $location");
       ```
   

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

 *  [ronchicago](https://wordpress.org/support/users/ronchicago/)
 * (@ronchicago)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/php-coding-problem/#post-709065)
 * maybe your answer can be found here…
 * [http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F](http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F)
 *  Thread Starter [izaca](https://wordpress.org/support/users/izaca/)
 * (@izaca)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/php-coding-problem/#post-709066)
 * Thanks, that did it!

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

The topic ‘PHP coding problem’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [izaca](https://wordpress.org/support/users/izaca/)
 * Last activity: [18 years, 5 months ago](https://wordpress.org/support/topic/php-coding-problem/#post-709066)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
