The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

php include problem

Discussion in 'General Discussion' started by cosmin, Apr 7, 2007.

  1. cosmin

    cosmin Well-Known Member

    Joined:
    Feb 6, 2002
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Bucuresti
    Hello!
    Few times/day I receive this error:
    Warning: main(http://www.domain.com/include/textad.php) [function.main]: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /home/evrika/public_html/anunturi/cauta.php on line 185

    Warning: main() [function.include]: Failed opening 'http://www.domain.cominclude/textad.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/evrika/public_html/anunturi/cauta.php on line 185

    After Apache restart all works fine but after few hours again the same error.

    Any ideea?
    Thank you very much!
     
  2. david510

    david510 Well-Known Member

    Joined:
    Aug 22, 2004
    Messages:
    473
    Likes Received:
    0
    Trophy Points:
    16
    apache may need a recompilation. try it.
     
  3. cosmin

    cosmin Well-Known Member

    Joined:
    Feb 6, 2002
    Messages:
    150
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Bucuresti
    I try few times.... Other solutions?
     
  4. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Actually that looks more like too many simultaneous server connections

    I would do a "netstat" in SSH when you see that problem occur and also
    view your "Apache Status" in WHM.

    That should give you a much better idea what is really happening.
     
  5. MegaMan2

    MegaMan2 Member

    Joined:
    Sep 28, 2003
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    I am having this exact same problem.

    If it is as Spiral says (and I think it is) ...Too Many Connections... how can this be fixed? My server has a very light load on it, and I only have about 15 low-traffic domains on it, so I'm wondering if there's just a bad setting in WHM somewhere?

    Here's a perfect example of the issue... I've installed a program that crawls the site and creates a Google sitemap. When I run the program I get the same error as above. So I kill that program, and restart Apache, and the problem disappears.

    Cannot speak for the original poster, but I'm running CentOS 4.2, PHP 5.1.6, and WHM 10.8. Dual processor, 1GB.
     
  6. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    Looks like both of you are on the same slate.

    what is your connection limit in apache?
    MaxClients
    /usr/local/apache/conf/httpd.conf

    You may need to increase the connection limit and perhaps lower the timeout times and TTL accordingly.

    for total unique users:
    netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n | wc -l

    for connections by each user:
    netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n
     
  7. MegaMan2

    MegaMan2 Member

    Joined:
    Sep 28, 2003
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Thank you Jayh38. Good info there. I will check those netstats next time the problem arises.

    As for TTL... is that the same as the "Domain Time To Live" setting on the WHM page:
    Server Configuration >> Basic cPanel/WHM Setup

    If so, my setting is 14400.

    My "Nameserver Time To Live" is 86400 though. Do those sound like decent settings? What else might you recommend?

    As for max users... can that be accessed through WHM too? Or only through SSH?

    Thanks!
     
Loading...

Share This Page