Menu

Undefined Index...

Help
Don Reese
2002-11-04
2003-06-21
  • Don Reese

    Don Reese - 2002-11-04

    Here is my URL:

    http://www.reesenet.org/index.php

    I'm lost...please help!

     
    • John Finlay

      John Finlay - 2002-11-04

      Your problem comes because phpGedView currently requires that register_globals be turned on in your php.ini file.

      Depending on how you have php set up, your php.ini file will either reside in your WINDOWS directory or your C:\PHP directory.  Edit the file and change the following line:

      register_globals = Off

      to

      register_globals = On

      For some, there are compelling reasons to leave register_globals off.  So, alternatively, you can also add the following line to your config.php file:
      if (phpversion() >= '4.2') import_request_variables("gpc");
      The next release of phpGedView will include this line by default.

      Let me know if this solves your problem.

      --John

       
    • Don Reese

      Don Reese - 2002-11-19

      I had found the php.ini file in my systemroot directory and changed that parameter. Is there something I need to do to "refresh" the system state? I have deleted the indeces to have them rebuild, but the problem persists.

       
    • John Finlay

      John Finlay - 2002-11-19

      I went digging into the PHP documentation and it looks like you will also need to turn off notice reporting in your php.ini file.

      The default configuration for error reporting is this:
      error_reporting = E_ALL & ~E_NOTICE

      which means to show all errors except notices.

      You can either use the default error reporting in the line above or remove E_NOTICE from your error_reporting line.  If E_NOTICE is not there then add ~E_NOTICE to it.

       
    • Don Reese

      Don Reese - 2002-11-19

      Thank you! That seems to have done it.

      Now I just have to adjust the initial person...I need to find some way of renumbering the individuals in my gedcom file...

      This product is just what I needed for my genealogy project!

       
    • John Finlay

      John Finlay - 2002-11-19

      In the config.php file, you can specify who the root person is, by uncommenting the line
      $PEDIGREE_ROOT_ID = "I1";

      replacing the I1 with the ID of the person you want to be at the initial position.  Like I9, I101, etc.

      You can find the ID by clicking on the person and viewing their individual information.  In the title bar it will list their ID.  It is also listed in the URL.

       
    • Dean Yeazel

      Dean Yeazel - 2003-06-20

      I have the same problem.

      I cannot modify php.ini because that is controlled by my hosting provider. I've tried adding the line to config.php and I get the following error:

      Notice: import_request_variables(): No prefix specified - possible security hazard in C:\inetpub\yeazel\phpgedview\config.php on line 28

       
    • John Finlay

      John Finlay - 2003-06-20

      The more recent versions of phpGedView include this line in the session.php file.  So you shouldn't need to add it yourself.

      I've started doing all of my testing and development on a machine setup under E_ALL.  Unfortunately it is difficult to find all of the places where there might be an error.  If you can post the exact "undefined index" error message that you are getting then I will fix the problem for you.

      Thanks,
      --John

       
    • Dean Yeazel

      Dean Yeazel - 2003-06-20

      My site is at http://www.yeazel.net/phpgedview/indilist.php I get it on all pages.

       
    • John Finlay

      John Finlay - 2003-06-20

      Did your indexes build correctly?

      After looking at your site it looks like your index files did not get built.  Which is kind of confusing because the program should build them automatically.  I would first try to rebuild the indexes using the link from the admin page.

      If you have any errors while building the indexes then report them.

      --John

       
    • Dean Yeazel

      Dean Yeazel - 2003-06-20

      I rebuilt them and there didn't appear to be any error messages. However, when I look in the index/indilist.php all it has is this:

      <?php
      $indilist = array();
      $indioffset = array();
      $indi_isdead = array();

      $indialpha = array();

      ?>

       
    • John Finlay

      John Finlay - 2003-06-20

      When you rebuild the indexes you should see output on the page like this:

      <snip>
      Reading Gedcom File c:\test.ged
      Flushing contents
      Using performance enhanced code for PHP v. 4.3.0
      Regular expression complete:
      Total Execution time: 1 sec.
      Found record 0 - ID:SUB1 Type:SUBM
      Total Execution time: 1 sec.
      Found record 100 - ID:I120 Type:INDI
      Total Execution time: 1 sec.
      Found record 200 - ID:I220 Type:INDI
      Total Execution time: 1 sec.
      Found record 300 - ID:I321 Type:INDI
      </snip>

      If you are not seeing this output when you build the indexes then phpGedView is not processing your gedcom file correctly.  Remember that PHP cannot handle unicode (utf-16) encoded files.  If you exported your gedcom using unicode, then you should export it again using the UTF-8 or ANSI character set.

      If you did export it using UTF-8 and it still isn't reading it properly, then email your gedcom to me (yalnifj AT users.sourceforge.net) and I will see why phpGedView isn't handling it properly.

      --John

       
    • Dean Yeazel

      Dean Yeazel - 2003-06-20

      OK, we're getting closer.

      It turns out that I had generated the file on a Macintosh, which only uses CHR(10) for line breaks instead of CHR(10)CHR(13). I fixed the line breaks and it looks better.

      However, I still get a few of these errors:

      Notice: Undefined offset: 1 in C:\inetpub\yeazel\phpgedview\buildindex.php on line 110

      Notice: Undefined offset: 2 in C:\inetpub\yeazel\phpgedview\buildindex.php on line 111

       
    • John Finlay

      John Finlay - 2003-06-20

      Hmm... I would have thought that the PHP regular expressions could handle mac line breaks properly.

      Obviously not.

      --John

       
    • Mark Hattam

      Mark Hattam - 2003-06-21

      I have this "problem" too. I get round it by taking the gedcom file onto a PC. Opening it in WordPad, then saving it.

      Wordpad seems to put in the required carriage returns, and the file size increases. You don't have to do anything other than Open, Save.

      Some of the other ged->html utilities also need this process.

       
    • Mark Hattam

      Mark Hattam - 2003-06-21

      Don Reese wrote:
      Now I just have to adjust the initial person...I need to find some way of renumbering the individuals in my gedcom file...

      Easiest way I've found in such programs as Geditcom is to start a new (empty) file, then merge your existing one into it. That will by necessity renumber your "incoming" data, and as the "new" file had initially no entries, the result will start at #1.

      Mark

       

Log in to post a comment.