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.

Change PHP Script Timeout

Discussion in 'General Discussion' started by nozom, Aug 18, 2005.

  1. nozom

    nozom Member

    Joined:
    Jul 21, 2005
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Hi There

    Is it possible to change the php script timeout through WHM, if not where am I likely to find the php.ini file to edit it. I've found a php.ini file but it doesn't seem to have an effect, even after apache restart.

    I'm using Fedora Core2.

    Thanks,
    nozom
     
  2. SubZero

    SubZero Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Balmumcu, Istanbul, TR
    put php.ini with the modified lines/settings to the ~/www folder of the user.
     
  3. Stefaans

    Stefaans Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    451
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Vancouver, Canada
    The server-wide php.ini file is /usr/local/lib/php.ini ;)
     
  4. Horizon

    Horizon Registered

    Joined:
    Mar 5, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    He's editing that file... it's not updating it. He saves the changes, then restarts the server, and it reverts the php.ini file back to defaults. I'm experiencing the same problem, and I really don't want to put a modified php.ini file into every public_html directory, then modify them all next time I change something. Anyone have any other ideas?
     
    #4 Horizon, Mar 5, 2006
    Last edited: Mar 5, 2006
  5. freedman

    freedman Well-Known Member

    Joined:
    Feb 13, 2005
    Messages:
    312
    Likes Received:
    1
    Trophy Points:
    18
    if it 'reverts back' then find out why.. there shouldn't be anything in the startup sequence which is doing that.
    look through your startup scripts and see ...
    the only time I'm aware of the php.ini file being automatically changed is when php is rebuilt and even then it's only happend to me once, and I'm pretty sure it was an install option when I built php manually
     
  6. xisn

    xisn Well-Known Member

    Joined:
    Dec 4, 2004
    Messages:
    128
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
  7. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    Absolutely.

    If you're editing a php.ini file and you find that the changes you made aren't actually having an effect after restarting Apache, you're simply editing the wrong php.ini file.
     
  8. danimal

    danimal Well-Known Member

    Joined:
    Jul 14, 2003
    Messages:
    79
    Likes Received:
    0
    Trophy Points:
    6
    I've noticed that the changes to the correct php.ini file don't require a server restart. So the changes should be visible immediately. For example, I have a phpinfo.php file that just outputs phpinfo() and I can just reload that page to see the php.ini changes.

    Somewhat related question:

    I have a value set to "Off" in /usr/local/lib/php.ini
    I then create a php.ini file in the local user's account to set an unrelated flag (i.e. this local php.ini just has the single line to set the unrelated flag).
    Now, my phpinfo for that site shows the value that should be "Off" is now "On".

    Note: "On" is apparently the default for PHP, so setting it to "Off" in the global php.ini is overriding the default.

    It appears that by creating a local php.ini file, it only reads it and doesn't even read /usr/local/lib/php.ini

    Is this true? If so, is there a way to change this? I'd like to set this variable to "Off" as the global default unless it is explicitly changed.

    Help!?

    -Danimal :cool:

    In particular, I set in the global ini file (/usr/local/lib/php.ini) :
    allow_url_fopen = Off

    a load of phpinfo.php in /home/client/public_html/phpinfo.php shows:
    allow_url_fopen = Off (Local Value), Off (Master Value)

    Then in the home directory of the client, I create a php.ini file (/home/client/public_html/php.ini) with only this line:
    register_globals = On
    (yeah, yeah, I know... bad. But it's just to temporarily let the client fix the PHP scripts)

    a load of phpinfo.php in /home/client/public_html/phpinfo.php now shows:
    allow_url_fopen = On (Local Value), On (Master Value)

    So by creating a local php.ini file it is resetting everything to defaults (except the specific values I set). I want it to use /usr/local/lib/php.ini values except where explicitly changed. Can this be done?
     
    #8 danimal, Jun 13, 2006
    Last edited: Jun 13, 2006
Loading...

Share This Page