1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

whats this error ?

Discussion in 'PHP' started by TheWebJunkie, Apr 12, 2005.

  1. #1
    I swapped hosts yesterday for my proxy site and now when you try and browse a site within my proxy it works but it also shows this error

    Notice: Undefined offset: 2 in /home/nomore/public_html/PHProxy.class.php on line 596

    Notice: Undefined offset: 3 in /home/nomore/public_html/PHProxy.class.php on line 600

    Warning: Cannot modify header information - headers already sent by (output started at /home/nomore/public_html/PHProxy.class.php:596) in /home/nomore/public_html/PHProxy.class.php on line 647

    To get the error do this:

    1. goto www.nomorelimits.net
    2. enter a url and surf
    3. view the error

    Does anyone what the error means and how to fix it ?
     
    TheWebJunkie, Apr 12, 2005 IP
  2. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I don't get that error.

    The headers already sent should be easy enough to fix. Just make sure you output nothing, not even white space like
    ?>
    
    <?php
    PHP:
    before sending the headers.
     
    T0PS3O, Apr 12, 2005 IP
  3. TheWebJunkie

    TheWebJunkie Banned

    Messages:
    630
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Sorry i dont understand what you mean.

    Also found another error, when you click on manage cookies i get this error

    Notice: Undefined offset: 2 in /home/nomore/public_html/PHProxy.class.php on line 596

    Notice: Undefined offset: 3 in /home/nomore/public_html/index.php on line 72

    Notice: Array to string conversion in /home/nomore/public_html/index.php on line 72

    This only happened since i swapped hosts yesterday.
     
    TheWebJunkie, Apr 12, 2005 IP
  4. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Sounds to me as if the errors were always there but your new host has PHP set to spit it right in your face while your old host was hiding them from the public.

    Search Google/PHP.net for those errors and you're likely to find good answers.
     
    T0PS3O, Apr 12, 2005 IP
  5. mushroom

    mushroom Peon

    Messages:
    369
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Most servers have php Notices turned off and only display fatal errors, as said before the error may have always been there, just not displayed.

    "Warning: Cannot modify header information" the Notice beening sent before cookie data has caused this error and will go away when Notices are no longer sent, so don't fret over it.

    "Undefined offset" refers to a array varible that is not set like the "$i" in "$var[$i]" not the "$i" itself but the array element it refers to.
     
    mushroom, Apr 12, 2005 IP