Web Hosting Forums

Results 1 to 10 of 10

This is a discussion on php 5.0 upgrade plans in the Hosting Talk & Chit-chat forum
There is a bug in php 4.3.8 that is causing me grief on my site. Here is a sample URL: Here is a sample url: ...

  1. #1
    Loyal Client
    Join Date
    Mar 2002
    Posts
    4

    Question php 5.0 upgrade plans

    There is a bug in php 4.3.8 that is causing me grief on my site.

    Here is a sample URL:

    Here is a sample url:
    http://www.hawsedc.com/phpGedView/pe...ged&rootid=185

    Apparently the statement

    for ($i=0; $i<$num ; $i++) {

    in phpGedView is causing an infinite loop that can only be worked around by changing the statement to

    while ($i<$num) {
    and tacking on a
    $i = $i+1;
    at the end of the loop

    This error is causing browser lockups in Firefox and hanging the loading in IE and Firefox. Can you please upgrade or give a timeline to go to php 5.0?

    Tom Haws

  2. #2
    Loyal Client
    Join Date
    Mar 2004
    Posts
    69
    You may want to check the script structure itself --

    that loop cannot be a bug - we would never have PHP this day if the loop is a buggie -- the bug might be the program you're using

    and about upgrading to 5.0 .... do not rush!!!!
    Last edited by Orbitz; 09-22-2004 at 11:24 PM.

  3. #3
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,661
    I agree! It's probably a syntax error. You shouldn't have to exchange a 'for loop' for a 'while loop' to make it work...

    What's the statement after the 'for loop' look like? That is, the last statement of your loop body?
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL 2010

  4. #4
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,661
    Quote Originally Posted by happyhav
    Apparently the statement

    for ($i=0; $i<$num ; $i++) {

    in phpGedView is causing an infinite loop that can only be worked around by changing the statement to

    while ($i<$num) {
    and tacking on a
    $i = $i+1;
    at the end of the loop...
    You know, something doesn't look right here. Don't you need to place your initialization before the 'while loop' to make it work? Like:

    $i = 0
    while ($i<$num) {
    and tacking on a
    $i = $i+1;

    I see it in your 'for loop' but not in your 'while loop'...

    for ($i=0; $i<$num ; $i++)
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL 2010

  5. #5
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,661
    Quote Originally Posted by Vin DSL
    You know, something doesn't look right here. Don't you need to place your initialization before the 'while loop' to make it work? Like:

    $i = 0
    while ($i<$num) {
    and tacking on a
    $i = $i+1;

    I see it in your 'for loop' but not in your 'while loop'...

    for ($i=0; $i<$num ; $i++)
    Hahaha! Now you got me quoting myself! Okay, how about this...

    If your 'while loop' is working without initialization, how about just leaving the expression blank in your 'for loop', e.g.

    ( ; $i<$num ; $i++)
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL 2010

  6. #6
    the Windlord Gwaihir's Avatar
    Join Date
    Jun 2002
    Posts
    2,570
    About the upgrading to PHP 5.0: in another thread dkdave quoted some info from the CPanel website, about the integration status of PHP into CPanel. I wonder where that info can be found. Dave, you around? Anyone else know? I browsed around at the CPanel website, but no luck alas and the darn thing has no search .
    Regards,

    Wim Heemskerk
    ---
    Visit MeCCG.net - Cardgaming in J.R.R. Tolkien's Middle-earth
    And Gwaihir.net - The Middle-earth CCG store

  7. #7
    Loyal Client dkadave's Avatar
    Join Date
    Sep 2001
    Location
    California, from Hawaii! Gotta love the ocean...
    Posts
    549
    It's not posted on the CPanel Website it's posted in CPanels WHM.

    And for the loop on statement

    for ($i=0; $i<$num ; $i++) {

    and

    while ($i<$num) {

    a possible reason for the loop to be infinite is that $num is not specified. Cause I have written plenty scripts that uses the for loop and have never experience a infinite loop unless the variable I use to stop the loop is missing.

    So try looking at that. And I have checked CPanel again and it still says 5.0.0 is still in the testing phase. I have taken a screen shot of it for you.

    Please click the link below
    http://www.dkahost.com/cp.gif
    ------------------------------------------------------------------------------------------------
    http://www.dkanet.com - http://www.vi01.com
    http://www.dkahost.com
    ------------------------------------------------------------------------------------------------
    AIM: dkadave - YIM: dkadave
    E-mail: [email protected]
    ------------------------------------------------------------------------------------------------

  8. #8
    the Windlord Gwaihir's Avatar
    Join Date
    Jun 2002
    Posts
    2,570
    Quote Originally Posted by dkadave
    I have taken a screen shot of it for you.
    Lol Hey; I believe you anyway.

    Pity they don't make this type of info truly public though, as it is quite informative. I.e.: as long as CPanel isn't ready for something, one can be certain it won't (and shouldn't) be seen here.
    Regards,

    Wim Heemskerk
    ---
    Visit MeCCG.net - Cardgaming in J.R.R. Tolkien's Middle-earth
    And Gwaihir.net - The Middle-earth CCG store

  9. #9
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,661
    Quote Originally Posted by dkadave
    ...And for the loop on statement

    for ($i=0; $i<$num ; $i++) {

    and

    while ($i<$num) {

    a possible reason for the loop to be infinite is that $num is not specified. Cause I have written plenty scripts that uses the for loop and have never experience a infinite loop unless the variable I use to stop the loop is missing.
    There has to be a statement or statements immediately following the loop initialization. That's what I want to see - the last statement in the loop body! I would be willing to bet money there's a syntax error in it, if he has to use a 'while loop.'
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL 2010

  10. #10
    Loyal Client dkadave's Avatar
    Join Date
    Sep 2001
    Location
    California, from Hawaii! Gotta love the ocean...
    Posts
    549
    Maybe, That's why some people when they need help they should post the file code so we can all see.
    ------------------------------------------------------------------------------------------------
    http://www.dkanet.com - http://www.vi01.com
    http://www.dkahost.com
    ------------------------------------------------------------------------------------------------
    AIM: dkadave - YIM: dkadave
    E-mail: [email protected]
    ------------------------------------------------------------------------------------------------

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
  •