PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Script not working on ONE server... but works on 2 others!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Script not working on ONE server... but works on 2 others!

    Hi!
    I have used Zoom on my development website (which runs PHP 4.1.2), and everything runs smoothly. But then, when I copy my script to my production website (which runs PHP 4.3.2), the script seems to timeout. After 1 second, all I get is the standard "The page cannot be displayed" error from Internet Explorer. I don't even get a search form!

    I have made some tests to rule out possibilities: file attributes are OK, file name is right, and my other scripts (in the same folder) are running correctly.

    I suspect this might be caused by a server limitation. Is it possible that my web hosting company limits the script size, number of lines or complexity? When I strip down the "search.php" script to about 974 lines, it displays the form correctly; no timeout or error whatsoever! But as soon as I add the next big loop (after the "Count number of output lines that match ALL search terms" comment), I get the "page not found" error. The server chokes!

    It's strange because there is absolutely no outpout returned by the script; that's why I think it's the server choking on the code while compiling PHP, and not the execution!

    I have no idea on how to debug/correct this, and I don't even know how to explain it to the hosting company. This is so absurd.

  • #2
    If the error was with PHP, then normally you would get a PHP generated error message. For example on some servers the PHP memory limit is set too low and you get the behaviour described here,
    http://www.wrensoft.com/zoom/support/faq_php.html

    Another possibility is if the Apache RLimitCPU and RLimitMEM directives are set too low and the script or the PHP executable itself (which is often run as a CGI) is being killed off by the server, whilst in the middle of execution.

    See here for information on RLimitCPU and RLimitMEM
    http://httpd.apache.org/docs/mod/core.html#rlimitcpu
    http://httpd.apache.org/docs/mod/core.html#rlimitmem
    and also have a look at Timeout.
    http://www.apacheref.com/ref/http_core/Timeout.html

    This previous post also covers this issue.
    http://www.wrensoft.com/forum/viewtopic.php?t=12

    So some initial questions to ask your host are,
    1/ Are you running Apache?
    2/ What are the RLimitCPU, RLimitMEM & Timeout (refer then to the links above)?

    Then we may be able to offer additional suggestions depending on the answers.

    --------
    David

    Comment

    Working...
    X