Ask a Question related to PHP Programming, Design and Development.

  1. #1

    Default Undefined offset: 1

    Hi All,

    I am moving some php code from a Linux machine to a Windows 2000 machine
    with the code belowe I get the following error :

    Notice: Undefined offset: 1 in c:\inetpub\wwwroot\test.php on line 5

    1) reset($kolom1);
    2) while(list($cat,$lnk) = each($kolom1)){
    3) kop($cat);
    4) while(list($name,$href) = each($lnk)){
    5) list( $name, $status) = split( '[,]',$name);
    6) links($name,$href,'n',$status);
    7) }
    8) footer();
    9) }


    On the Linux server there is no problem but now on the Windows 2000 server
    there is.
    Anybody got a clue what could be wrong here??

    Thanks!


    Steven Guest

  2. Similar Questions and Discussions

    1. Offset in Columnchart
      Hi, Does anyone has try the offset of Column chart? I try to make some column chart with column overlapping one another. However, the example...
    2. Grid Offset Possible?
      Hello everyone I work at a blister packaging company and the owner asked me to create die lines for graphic cards we order. I need to use a specific...
    3. strrpos and offset?
      Hi, I'm using PHP 4.3.4 the docs at: http://uk.php.net/manual/en/function.strrpos.php tells me that strrpos can be passed an offset as the...
    4. exec at offset != 0
      Hi I would like to be able to simulate an exec but starting at byte N in a file (without creating a temporary file which is exec'ed later) I...
    5. What is an undefined offset? An undefined index?
      I just switched error_reporting to ALL so I could debug my site. I got a huge page full of errors. One of the most common was that in my arrays I'm...
  3. #2

    Default Undefined offset: 1

    Hi All,

    I am moving some php code from a Linux machine to a Windows 2000 machine
    with the code belowe I get the following error :

    Notice: Undefined offset: 1 in c:\inetpub\wwwroot\test.php on line 5

    1) reset($kolom1);
    2) while(list($cat,$lnk) = each($kolom1)){
    3) kop($cat);
    4) while(list($name,$href) = each($lnk)){
    5) list( $name, $status) = split( '[,]',$name);
    6) links($name,$href,'n',$status);
    7) }
    8) footer();
    9) }


    On the Linux server there is no problem but now on the Windows 2000 server
    there is.
    Anybody got a clue what could be wrong here??

    Thanks!


    Steven Guest

  4. #3

    Default Re: Undefined offset: 1

    "Steven" <news@emailme.nu> wrote in message news:3f6479e1$1@news.nb.nu...
    > Hi All,
    >
    > I am moving some php code from a Linux machine to a Windows 2000 machine
    > with the code belowe I get the following error :
    >
    > Notice: Undefined offset: 1 in c:\inetpub\wwwroot\test.php on line 5
    >
    > 1) reset($kolom1);
    > 2) while(list($cat,$lnk) = each($kolom1)){
    > 3) kop($cat);
    > 4) while(list($name,$href) = each($lnk)){
    > 5) list( $name, $status) = split( '[,]',$name);
    > 6) links($name,$href,'n',$status);
    > 7) }
    > 8) footer();
    > 9) }
    >
    >
    > On the Linux server there is no problem but now on the Windows 2000 server
    > there is.
    > Anybody got a clue what could be wrong here??
    >
    > Thanks!
    >
    >
    >
    The split is failing. I don't know if this is the problem, but try changing
    line 5 to

    list( $name, $status) = split( ',',$name);



    Jason Guest

  5. #4

    Default Re: Undefined offset: 1

    "Steven" <news@emailme.nu> wrote in message news:3f6479e1$1@news.nb.nu...
    > Hi All,
    >
    > I am moving some php code from a Linux machine to a Windows 2000 machine
    > with the code belowe I get the following error :
    >
    > Notice: Undefined offset: 1 in c:\inetpub\wwwroot\test.php on line 5
    >
    > 1) reset($kolom1);
    > 2) while(list($cat,$lnk) = each($kolom1)){
    > 3) kop($cat);
    > 4) while(list($name,$href) = each($lnk)){
    > 5) list( $name, $status) = split( '[,]',$name);
    > 6) links($name,$href,'n',$status);
    > 7) }
    > 8) footer();
    > 9) }
    >
    >
    > On the Linux server there is no problem but now on the Windows 2000 server
    > there is.
    > Anybody got a clue what could be wrong here??
    >
    > Thanks!
    >
    >
    >
    The split is failing. I don't know if this is the problem, but try changing
    line 5 to

    list( $name, $status) = split( ',',$name);



    Jason Guest

  6. #5

    Default Re: Undefined offset: 1

    "Jason" <jsumner1@cfl.rr.com> wrote in message
    news:yZ_8b.19261$kX.7484@twister.tampabay.rr.com.. .
    > "Steven" <news@emailme.nu> wrote in message news:3f6479e1$1@news.nb.nu...
    > > Hi All,
    > >
    > > I am moving some php code from a Linux machine to a Windows 2000 machine
    > > with the code belowe I get the following error :
    > >
    > > Notice: Undefined offset: 1 in c:\inetpub\wwwroot\test.php on line 5
    > >
    > > 1) reset($kolom1);
    > > 2) while(list($cat,$lnk) = each($kolom1)){
    > > 3) kop($cat);
    > > 4) while(list($name,$href) = each($lnk)){
    > > 5) list( $name, $status) = split( '[,]',$name);
    > > 6) links($name,$href,'n',$status);
    > > 7) }
    > > 8) footer();
    > > 9) }
    > >
    > >
    > > On the Linux server there is no problem but now on the Windows 2000
    server
    > > there is.
    > > Anybody got a clue what could be wrong here??
    > >
    > > Thanks!
    > >
    > >
    > >
    >
    > The split is failing. I don't know if this is the problem, but try
    changing
    > line 5 to
    >
    > list( $name, $status) = split( ',',$name);
    >
    >
    >
    >
    Let me be more specific...the split isn't exactly failing, but it's not
    giving the list() 2 elements to work with.


    Jason Guest

  7. #6

    Default Re: Undefined offset: 1

    "Jason" <jsumner1@cfl.rr.com> wrote in message
    news:yZ_8b.19261$kX.7484@twister.tampabay.rr.com.. .
    > "Steven" <news@emailme.nu> wrote in message news:3f6479e1$1@news.nb.nu...
    > > Hi All,
    > >
    > > I am moving some php code from a Linux machine to a Windows 2000 machine
    > > with the code belowe I get the following error :
    > >
    > > Notice: Undefined offset: 1 in c:\inetpub\wwwroot\test.php on line 5
    > >
    > > 1) reset($kolom1);
    > > 2) while(list($cat,$lnk) = each($kolom1)){
    > > 3) kop($cat);
    > > 4) while(list($name,$href) = each($lnk)){
    > > 5) list( $name, $status) = split( '[,]',$name);
    > > 6) links($name,$href,'n',$status);
    > > 7) }
    > > 8) footer();
    > > 9) }
    > >
    > >
    > > On the Linux server there is no problem but now on the Windows 2000
    server
    > > there is.
    > > Anybody got a clue what could be wrong here??
    > >
    > > Thanks!
    > >
    > >
    > >
    >
    > The split is failing. I don't know if this is the problem, but try
    changing
    > line 5 to
    >
    > list( $name, $status) = split( ',',$name);
    >
    >
    >
    >
    Let me be more specific...the split isn't exactly failing, but it's not
    giving the list() 2 elements to work with.


    Jason Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139