SitePoint Sponsor

User Tag List

Results 1 to 11 of 11

Thread: So...Slow...

  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2001
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    So...Slow...

    Argh.

    My news upload form keeps failing. I keep getting a Cannot find server message after an inordinate amount of time.

    This is the form, whose info is getting passed on

    <FORM ACTION="/staffonly/newseditor.php" METHOD=POST ENCTYPE="multipart/form-data">
    <p>Choose File:
    <INPUT TYPE=FILE NAME="uploadedfile">
    <p>Enter Article Title:
    <TEXTAREA NAME="newstitle" WRAP cols="75">
    </TEXTAREA>
    </p>
    <p>Enter Article Description:
    <TEXTAREA NAME="newsdescription" WRAP cols="75"></TEXTAREA>
    </p>
    <p>Enter Article:
    <TEXTAREA NAME="newstext" WRAP cols="75">
    </TEXTAREA>
    </p>
    <p>
    <INPUT TYPE=HIDDEN NAME="id" VALUE="1">
    <INPUT TYPE=SUBMIT NAME="submit" VALUE="SUBMIT">
    </FORM>

    Is there anything wrong with it that would be causing it to screw up, or is it something I need to have a word with my hosting provider about?

    Thanks, and sorry for taking your time if this shouldnt be posted here.

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your script looks good, either the script is timing out, or you need to have a chat with your host. How big are the files you are trying to upload?
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2001
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Around 12-30K for an image (30 being around the max) and not overly long news articles. Maybe a4 page worth of text max ever, though even with two lines it doesnt work.

  4. #4
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Many hosts have safe_mode turned ON which does not allow for file uploads. Perhaps that might be the problem? You can always view the PHP setttings by putting phpinfo() into a php file and calling it in your browser.

  5. #5
    SitePoint Enthusiast
    Join Date
    Jul 2001
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    from what i can see the safe mode appears to be off

    www.nintendoodle.com/phpinfo.php

    is the file.

  6. #6
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It might not matter, but your host is running very old versions of both PHP and Apache.

  7. #7
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would suggest talking to your host. WOW! Why would a host still be running PHP3!? Your php settings say that safe_mode is 0 which I guess is OFF. However there is another setting that says:

    safe_mode_exec_dir */usr/local/php/bin

    Not that I know what that means.

    Sorry that I can't help more.

  8. #8
    SitePoint Enthusiast
    Join Date
    Jul 2001
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thankful;ly I am only with them for the next 20 days, then on to a new host

  9. #9
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh, here is something else to consider. Have you checked that the file actually does end up where you expect it to as a result of your script processing it?

    Also, when you process the uploaded form data, does that script output anything to your user's browser. See if your script doesn't output anything back to the browser, the poor old browser is waiting for a response, which of course will time out if nothing is sent back.

  10. #10
    SitePoint Enthusiast
    Join Date
    Jul 2001
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The page has worked on random occasions in the past week, but never consistently, and whne it worked it works perfectly. Its just that it keeps timing out

  11. #11
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If a script is timing out you can use set_time_limit();

    For example, if you use set_time_limit(90); the script can run for another 90 seconds from when you call the function

    Sean
    Harry Potter

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


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
  •