SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Apr 2001
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP, choking on outputting a certain amount of HTML??

    hey all,

    i've got a damn stranged problem here...
    i am using apache 1.3.20 and php 4.0.6... (phpdev4)

    when i have been developing my stuff locally everything has been working perfectly. but now i've tried to show my work to a few ppl on the internet over my dialup connection and PHP programs seem to stop sending data part way through the program!? or something?!? the whole page just does not load....

    for eg one of my programs basically just includes a HTML which is a bit over 15k in size... it seems to stop loading about 2/3 (about 10k) of the way through the file?!?!... but this is only happening for remote accesses over the internet, for me running the PHP programs locally it is totally fine!?

    this does NOT happen if ppl try to view a HTML file of exactly the same thing, it only happens with PHP programs???

    anyone got any idea what is going on here?

    cheers,
    carter

  2. #2
    midnight coder
    Join Date
    Dec 2000
    Location
    The flat edge of the world
    Posts
    838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can we get a sample of your code so we get a better idea of what you're trying to do?

    It could be that your hosting machine is over heavy load, and can't process the PHP code, but that shouldn't happen very often.

  3. #3
    SitePoint Member
    Join Date
    Apr 2001
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hmmm under heavy load... i am only using a modem (so obviously upstream data is restricted to 33.6kbps), could that also be a cause and therefore there is some setting that i need to change??


    basically my code does this:

    PHP Code:
    <?php
    // include a couple of files here that have..
    // ..some constants and functions that i need

    if (isset($something)) {
      
    // stuff

    }

    elseif (isset(
    $another)) {
      
    // more stuff

    }

    else {
      
    // display the default page
      
    include("defaultpage.html"); 

    }
    ?>
    obviously when someone tries to access the page without posting any data, the output is the part where the "else" statement is.. the program chokes and only outputs about 2/3 of the included file.

    this problem ONLY happens when ppl access it remotely form over the internet, it works fine for me on my local machine.

    of course, when the user gets to the next part (acually gogin inside the if, elseif construct) they are also going to get problems there because the output will also be too big

  4. #4
    SitePoint Wizard Defender1's Avatar
    Join Date
    Apr 2001
    Location
    My Computer
    Posts
    2,808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i'd have to say this is limited completely by the fact that your using dialup. it's probably timing out before your slow connect can process the whole thing.
    try finding a host you can put the stuff up at.
    then you can really see how well/if it works on the net.
    Defender's Designs
    I'm Getting Married!

    Not-so-patiently awaiting Harry Potter Book 7 *sigh*

  5. #5
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you getting timeout errors? If you are it is because your host has max_execution_time set lower than you do

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  6. #6
    SitePoint Member
    Join Date
    Apr 2001
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    cool, i'll try out the max_execution_time thing ;] 3 minutes should do the trick, LOL!


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
  •