Advanced Search

Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: any thoughts on this error?

  1. #1
    Join Date
    Jun 2006
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default any thoughts on this error?

    here is the function the error says this is wrong
    PHP Code:
    function NoCache() {
        
    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");                // Date in the past
        
    header("Last-Modified: " gmdate("D, d M Y H:i:s") . " GMT");  // always modified
        
    header("Cache-Control: no-store, no-cache, must-revalidate");      // HTTP/1.1
        
    header("Cache-Control: post-check=0, pre-check=0"false);
        
    header("Pragma: no-cache");                                      // HTTP/1.0

    then i call this later
    PHP Code:
    NoCache(); 
    here is the include file it is asking about. check linked file
    thankx for the help
    Last edited by pkcidstudio; 07-11-2006 at 09:56 PM.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    here is the function the error says this is wrong
    What error? I see no error.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jun 2006
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    currently there is no error showing becasue i have commented it out.
    does anything look bad in the way that function is written?

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Not obviously so, no. Why don't you post the error so we can see what the problem is?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Jun 2006
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/e/j/l/ejlcustomgolf/html/eventCalendar.php:8) in /home/content/e/j/l/ejlcustomgolf/html/_admin/includes.php on line 14

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/e/j/l/ejlcustomgolf/html/eventCalendar.php:8) in /home/content/e/j/l/ejlcustomgolf/html/_admin/includes.php on line 15

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/e/j/l/ejlcustomgolf/html/eventCalendar.php:8) in /home/content/e/j/l/ejlcustomgolf/html/_admin/includes.php on line 16

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/e/j/l/ejlcustomgolf/html/eventCalendar.php:8) in /home/content/e/j/l/ejlcustomgolf/html/_admin/includes.php on line 17

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/e/j/l/ejlcustomgolf/html/eventCalendar.php:8) in /home/content/e/j/l/ejlcustomgolf/html/_admin/includes.php on line 18

    posted-
    Last edited by pkcidstudio; 07-12-2006 at 02:22 PM.

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    As I suspected.
    There's nothing wrong with the function; the problem is that you're calling it after HTML has already been sent to the browser. header() can only be called before any other output is sent to the browser.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #7
    Join Date
    Jun 2006
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    so i need to move it where?
    thankx twey for the help

  8. #8
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Simplest place is right at the beginning of the page, and make sure there is nothing before the opening <?php tag; that includes whitespace.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  9. #9
    Join Date
    Jun 2006
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Great, Twey thankx for your continued help in the forums.

  10. #10
    Join Date
    Aug 2006
    Location
    DŘren (NRW-GER)
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Or you just start your PHP Script with this:
    PHP Code:
    <?php
    ob_start
    ();
    and end it with this:
    PHP Code:
    ob_end_flush();
    ?> 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •