PHP.ini file, should it be editable?

Discussion in 'Website Development & Design' started by Ricus, Sep 2, 2012.

  1. Ricus

    Ricus
    uix_expand uix_collapse
    New Member

    Joined:
    Aug 26, 2012
    Messages:
    20
    Likes Received:
    1
    Some web hosting services hide or remove all rights for the user to edit the php.ini file, which is needed to change the uploading size of files for example. I actually think it should only be editable for users, that purchases the hosting. What do you think?
     
  2. smartkathy

    smartkathy
    uix_expand uix_collapse
    Member

    Joined:
    Feb 8, 2012
    Messages:
    225
    Likes Received:
    8
    No in my point of view answer is no.
     
  3. Fergal

    Fergal
    uix_expand uix_collapse
    Premium Member
    Premium Member

    Joined:
    Nov 18, 2007
    Messages:
    10,575
    Likes Received:
    1,165
    Why do you say that?
     
  4. Tucker933

    Tucker933
    uix_expand uix_collapse
    Member

    Joined:
    Nov 15, 2012
    Messages:
    24
    Likes Received:
    2
    I certainly agree that it should be available for paid hosting. There's not much of a point to keep it hidden when you're already paying for the resources, which you should be able to make use of how you choose.
     
  5. GeekGhost

    GeekGhost
    uix_expand uix_collapse
    Member

    Joined:
    Oct 5, 2012
    Messages:
    217
    Likes Received:
    96
    Typically, a host will disable certain functions in the global php.ini file to add a further layer of security to their servers. Most sites will not have an issue if done properly. If you allow a client to override the server global configuration, it defeats the purpose of implementing those safe guards in the first place.

    This is why there are different levels of hosting. From shared to dedicated. Some sites are better suited on a dedicated or semi-dedicated environment if their needs are more than what a shared platform can provide.

    So to answer the question, I don't think that on a shared hosting environment, the user should be able to override the server's default settings. On a semi-dedicated plan, yes. Of course on a VPS or dedicated server, the user should be able to configure their server however they see fit.
     
    • Like Like x 3
  6. altcom

    altcom
    uix_expand uix_collapse
    Member

    Joined:
    Sep 13, 2012
    Messages:
    440
    Likes Received:
    100
    Perhaps we own a dedicated server, for share hosting user they will always make the limitation, this is to make sure every user get equal server resources.
     
  7. jaysh4922

    jaysh4922
    uix_expand uix_collapse
    Member

    Joined:
    Dec 3, 2012
    Messages:
    143
    Likes Received:
    6
    Your php.ini file is a standard text file, except that it ends in .ini instead of .txt. To edit the file, you simply need to find it and edit it using either the File Manager or another text editor.
     
  8. patrick.s

    patrick.s
    uix_expand uix_collapse
    Member

    Joined:
    Sep 20, 2012
    Messages:
    76
    Likes Received:
    11
    As GeekGhost said it's for security. It's not a great idea to let users edit the global PHP file configuration(shared Environment).
    It's to much of a risk to the server and the rest of the clients.
     
  9. daytrader

    daytrader
    uix_expand uix_collapse
    Active Member

    Joined:
    Jul 29, 2009
    Messages:
    1,678
    Likes Received:
    216
    you could just create a php.ini files for yourself inside the main directory of you site. or simply increase the size of memory in the php files.
     
    • Like Like x 1
  10. liquidation31

    liquidation31
    uix_expand uix_collapse
    New Member

    Joined:
    Nov 19, 2012
    Messages:
    14
    Likes Received:
    0
    Yes, you should in my point of view
     
  11. jaysh4922

    jaysh4922
    uix_expand uix_collapse
    Member

    Joined:
    Dec 3, 2012
    Messages:
    143
    Likes Received:
    6
    php.ini file is editable but you have to be very careful when you will edit the php.ini file because this is core php setup file. From this file you can configure your php setup. So you have to be cautious in the time of editing the php.ini file.
     
  12. daytrader

    daytrader
    uix_expand uix_collapse
    Active Member

    Joined:
    Jul 29, 2009
    Messages:
    1,678
    Likes Received:
    216
    Creating a php.ini file for each site would be a better thing to do than editing the existing.
     
  13. Fergal

    Fergal
    uix_expand uix_collapse
    Premium Member
    Premium Member

    Joined:
    Nov 18, 2007
    Messages:
    10,575
    Likes Received:
    1,165
    If you do that, do you just upload it to the root directory of the site, or do you need to do something else to make it work?
     
  14. daytrader

    daytrader
    uix_expand uix_collapse
    Active Member

    Joined:
    Jul 29, 2009
    Messages:
    1,678
    Likes Received:
    216
    You would have to indicate what you'd want it to function whether to increase memery limit or file size to upload. I remember I have to uncomment few lines to the original php.ini when I install WAMP later did I know I can just create php.ini and specify rules inside for what I wanted to do.
     
    • Like Like x 1

Share This Page