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.

cannot overwrite remote file " /usr/local/lib/php.ini?

Discussion in 'General Discussion' started by ehuey, Mar 14, 2008.

  1. ehuey

    ehuey Registered

    Joined:
    Mar 13, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    When trying to overwrite the php.ini I get this error. Can someone explain to me a few things i have questions to? I'm new at this dedicated server firguring out more as I go.

    1. My WHM, I see where to edit the main php.ini file under section Service Configuration:PHP Configuration Editor:

    2. When i give a domain name root access. Question: does the php.ini file copy itself to all domain names with shell accsess? If that's the case, why when trying to edit php.ini for that domain with shell and root access I can't overwrite the phph.ini file.
    Ok maybe the question is" does all shell access domains have it's own php.ini? or if you do edit the php.ini does it effect the WHM php.ini?

    3 i running into this problem when trying to install shopping carts and other video software on to the server. it ask me to edit some setting in the php.ini diffrent then main default setting in php.ini in Web Host Manger.

    4. just trying to understand what i need to do to modify and replace php.ini.
    I'm using WinSCP to shell to the path to find the php.ini I can do that but when I finish changing file I can't send it back or replace it.

    5. i added wheel groups to the domainname that is trying to overwrite the file no luck.

    6. I'm new to this, so be easy on me thx! Huey:eek:
     
  2. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    You need to use winscp as ROOT, not as a user in the wheel group. Winscp will not SU as root so log in with your root access and you will be fine.

    Be carefull about adding others to wheel. No one but the system admins should have root or ssh access.

    good luck
     
  3. ehuey

    ehuey Registered

    Joined:
    Mar 13, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Thx Jay that worked. One last question say one software needs these setting enable for the software to work. " register_globals = Off (for security reasons) "

    and other domain on the server needs these setting register_globals = On (for security reasons)"

    video software register_globals = On (for security reasons)
    shopping cart shoftware register_globals = Off (for security reasons)

    can domain names have their own PHP.INI file?
    reason I ask when i enable it On it changed it for the WHM as well.

    thank for the wheel advice!
     
  4. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    For security its best to keep register_globals off server wide. Then for any account needing it turned on, first advise them to use properly updated scripts which don't require register_globals on.

    If theres no way around it, you can simply turn register_globals on for their virtual_host container for their entire site without messing with php.ini files.

    Here is a good link which clearly explains this without getting confused. Look for the post by Sparek-3 and you will have no trouble.

    http://forums.cpanel.net/showthread.php?t=73899&page=2

    with that said, you will need to add this into the container you created for the individual domain.

    for PHP4 use this:
    <IfModule mod_php4.c>
    php_admin_value register_globals 1
    </IfModule>

    for PHP5 use this:
    <IfModule mod_php5.c>
    php_admin_value register_globals 1
    </IfModule>

    To verify its actually working for their account, just create a phpinfo page anywhere inside their account and look for the register_globals option and verify its ON for local values and OFF for master values

    <?
    phpinfo();
    ?>

    cheers...
     
Loading...

Share This Page