browneandrae Posted June 7, 2012 Share Posted June 7, 2012 Yesterday we made a switch from Windows to Linux through GoDaddy and I believe that error messages appearing on the sites wp-login.php are associated with it. There are four lines: Warning: Cannot modify header information - headers already sent by (output started at /home/content/88/9177388/html/datacentersummiteast-rtp/wp-content/themes/news/functions.php:1) in /home/content/88/9177388/html/datacentersummiteast-rtp/wp-login.php on line 349 Warning: Cannot modify header information - headers already sent by (output started at /home/content/88/9177388/html/datacentersummiteast-rtp/wp-content/themes/news/functions.php:1) in /home/content/88/9177388/html/datacentersummiteast-rtp/wp-login.php on line 361 Warning: Unknown: open(/var/chroot/home/content/88/9177388/tmp/sess_vuf6qluitcpmoih5g7c1qgihj3, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0 I know that it might have something to do with PHP not being able to write to the /tmp directory or a missing/tmp directory. I am not sure how to fix the lines in the wp-login and function php files and I am not sure about any other way to resolve the issue. Quote Link to comment https://forums.phpfreaks.com/topic/263818-switch-windows-to-linux-cannot-modify-header-information-errors/ Share on other sites More sharing options...
requinix Posted June 7, 2012 Share Posted June 7, 2012 Two different errors. 1. What's at the very beginning of the themes/news/functions.php file? There's something that PHP is outputting - perhaps a UTF-8 bom, or perhaps whitespace before the <?php tag. 2. Does that tmp folder exist on the new machine? If not then create it and set 0777 permissions on it. Quote Link to comment https://forums.phpfreaks.com/topic/263818-switch-windows-to-linux-cannot-modify-header-information-errors/#findComment-1351936 Share on other sites More sharing options...
browneandrae Posted June 7, 2012 Author Share Posted June 7, 2012 Here is a copy of the php GoDaddy hosts the website, how do we figure out where to place the tmp file if we have a host provider that did the switch to linux for us. We do have file transfer protocol capabilities. I just don't know the proper location for the tmp file. <?php /** Start the engine */ require_once( get_template_directory() . '/lib/init.php' ); /** Create additional color style options */ add_theme_support( 'genesis-style-selector', array( 'news-green' => 'Green', 'news-orange' => 'Orange', 'news-pink' => 'Pink', 'news-purple' => 'Purple', 'news-red' => 'Red', 'news-teal' => 'Teal' ) ); /** Child theme (do not remove) */ define( 'CHILD_THEME_NAME', 'News Theme' ); define( 'CHILD_THEME_URL', 'http://www.studiopress.com/themes/news' ); $content_width = apply_filters( 'content_width', 610, 460, 910 ); /** Add support for structural wraps */ add_theme_support( 'genesis-structural-wraps', array( 'header', 'nav', 'subnav', 'inner', 'footer-widgets', 'footer' ) ); /** Add new image sizes */ add_image_size( 'home-bottom', 110, 110, TRUE ); add_image_size( 'home-middle-left', 280, 165, TRUE ); add_image_size( 'home-middle-right', 50, 50, TRUE ); add_image_size( 'home-tabs', 150, 220, TRUE ); /** Add support for custom background */ add_custom_background(); /** Add support for custom header */ add_theme_support( 'genesis-custom-header', array( 'width' => 960, 'height' => 110 ) ); /** Reposition the secondary navigation */ remove_action( 'genesis_after_header', 'genesis_do_subnav' ); add_action( 'genesis_before', 'genesis_do_subnav' ); /** Add after post ad section */ add_action( 'genesis_after_post_content', 'news_after_post_ad', 9 ); function news_after_post_ad() { if ( is_single() && is_active_sidebar( 'after-post-ad' ) ) { echo '<div class="after-post-ad">'; dynamic_sidebar( 'after-post-ad' ); echo '</div><!-- end .after-post-ad -->'; } } /** Add after content ad section */ add_action( 'genesis_before_footer', 'news_after_content_ad' ); function news_after_content_ad() { if ( is_active_sidebar( 'after-content-ad' ) ) { echo '<div class="after-content-ad">'; dynamic_sidebar( 'after-content-ad' ); echo '</div><!-- end .after-content-ad -->'; } } /** Add support for 3-column footer widgets */ add_theme_support( 'genesis-footer-widgets', 3 ); /** Register widget areas */ genesis_register_sidebar( array( 'id' => 'home-top', 'name' => __( 'Home Top', 'news' ), 'description' => __( 'This is the home top section.', 'news' ), ) ); genesis_register_sidebar( array( 'id' => 'home-middle-left', 'name' => __( 'Home Middle Left', 'news' ), 'description' => __( 'This is the home middle left section.', 'news' ), ) ); genesis_register_sidebar( array( 'id' => 'home-middle-right', 'name' => __( 'Home Middle Right', 'news' ), 'description' => __( 'This is the home middle right section.', 'news' ), ) ); genesis_register_sidebar( array( 'id' => 'home-bottom', 'name' => __( 'Home Bottom', 'news' ), 'description' => __( 'This is the home bottom section.', 'news' ), ) ); genesis_register_sidebar( array( 'id' => 'after-post-ad', 'name' => __( 'After Post Ad', 'news' ), 'description' => __( 'This is the after post ad section.', 'news' ), ) ); genesis_register_sidebar( array( 'id' => 'after-content-ad', 'name' => __( 'After Content Ad', 'news' ), 'description' => __( 'This is the after content ad section.', 'news' ), ) ); /** Customize the entire footer */ remove_action( 'genesis_footer', 'genesis_do_footer' ); add_action( 'genesis_footer', 'child_do_footer' ); function child_do_footer() { ?> <p>© Copyright <?php echo date('Y'); ?> <a href="http://datacenterevents.info/">DataCenterEvents.info</a> · All Rights Reserved · <a href="http://datacenterevents.info/wp-admin">Admin</a></p> <?php } /** Add support for post formats */ add_theme_support( 'post-formats', array( 'aside', 'audio', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video' ) ); /** Add support for post format images */ add_theme_support( 'genesis-post-format-images' ); Quote Link to comment https://forums.phpfreaks.com/topic/263818-switch-windows-to-linux-cannot-modify-header-information-errors/#findComment-1351998 Share on other sites More sharing options...
scootstah Posted June 7, 2012 Share Posted June 7, 2012 Open the functions.php file with Notepad++ and then go to View > Show Symbol > Show All Characters. Does anything appear before <?php? Quote Link to comment https://forums.phpfreaks.com/topic/263818-switch-windows-to-linux-cannot-modify-header-information-errors/#findComment-1352001 Share on other sites More sharing options...
browneandrae Posted June 8, 2012 Author Share Posted June 8, 2012 After showing all characters using Notepad++, I do not see any spaces before <?php just cr lf in boxes after it. Quote Link to comment https://forums.phpfreaks.com/topic/263818-switch-windows-to-linux-cannot-modify-header-information-errors/#findComment-1352063 Share on other sites More sharing options...
scootstah Posted June 8, 2012 Share Posted June 8, 2012 I think what you are experiencing is a Byte Order Mark or BOM. What character encoding does the file use? Quote Link to comment https://forums.phpfreaks.com/topic/263818-switch-windows-to-linux-cannot-modify-header-information-errors/#findComment-1352203 Share on other sites More sharing options...
browneandrae Posted June 8, 2012 Author Share Posted June 8, 2012 The issue has been fixed. Thank you Quote Link to comment https://forums.phpfreaks.com/topic/263818-switch-windows-to-linux-cannot-modify-header-information-errors/#findComment-1352308 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.