Menu

Problem with the 2.50 version

Help
2003-09-24
2003-09-26
  • Robert Weinland

    Robert Weinland - 2003-09-24

    Hello,

    I successfuly installed the new 2.50 version to replace my PHPGEDVIEW 2.13 and each time I execute PHPGEDVIEW I get the following recurrent warning messages :

    Warning: Cannot add header information - headers already sent by (output started at c:\program files\easyphp\www\phpgv250\index\ascdesc.ged_index.php:71286) in c:\program files\easyphp\www\phpgv250\functions.php on line 628

    or:

    Warning: Cannot add header information - headers already sent by (output started at c:\program files\easyphp\www\phpgv250\index\ascdesc.ged_index.php:71286) in c:\program files\easyphp\www\phpgv250\login.php on line 41

    This message appears with almost every function of the program that is called, except on the first call of PHPGEDVIEW and when the "configuration" option of the admin function is called.

    I can add that I tried with three different GEDCOM datasets and that I always get the same messages.

    My system configuration :
    Windows 98SE
    Apache
    PHP 4.20
    MySQL 3.23

    Any idea?

     
    • Arne Eckmann

      Arne Eckmann - 2003-09-24

      Hi Robert

      I have no idea as to what is causing your errors, but to me it's not totally unlike the errors caused by unwanted whitespaces, which is generated by many editors on the Windows platform, when manually editing UTF-8 files which contains international characters.

      best regard
      Arne
       

       
    • John Finlay

      John Finlay - 2003-09-24

      Open up your index\ascdesc.ged_index.php and make sure that there is no whitespace outside the <?php ?> tags.  Delete that whitespace and save the file and see if that fixes it.

      I added a return at the end of the file and that I think might be causing the problems.  To get rid of the return change the cleanup_database() function of the functions_index.php file to look like this:

      //-- cleanup the database
      function cleanup_database() {
          global $FP;
         
          fwrite($FP, "?>");
          fclose($FP);
      }

      --John

       
    • Robert Weinland

      Robert Weinland - 2003-09-25

      Hello John,

      You made the right guess.

      The first time I got these messages I searched for some white spaces before the '<?' at the beginning of the files but I did not think that the cause of the problem might be at the end of the file after '?>'. 

      The problem was caused by some unexpected characters that were found behind '?>' at the end of each dataset.

      So I checked that the problem was fixed after deleting all the characters found behind '?>' at the end the my 'xxxx.ged_index.php' files and then I modified the cleanup_database() function.

      Thank you for your help !

       
    • Robert Weinland

      Robert Weinland - 2003-09-25

      John,

      By the way, do you know the reason for the final "\r\n" string added to each line written to the "xxxx.ged_index.php" file ?

      Would not "\n" be enough ?

       
    • Robert Weinland

      Robert Weinland - 2003-09-26

      I think I got the answer to my question : ...for compatibility with Macintosh systems.

       
    • John Finlay

      John Finlay - 2003-09-26

      There are three types of new lines:
      Windows: \r\n
      Unix: \n
      Mac: \r

      The operating systems are getting better about recognizing different file formats, but for the sake of trying to get the best compatibility across platforms, whenever I am dealing with the GEDCOM codes I try to use the windows \r\n new lines.  When I am generating the HTML I will usually just use the \n.

      --John

       

Log in to post a comment.