1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to edit php.ini in webhost?

Discussion in 'PHP' started by boyponga, Mar 27, 2007.

  1. #1
    I have a site that needs a php.ini configuration because it is powered by Smarty PHP. I would like to know if there are ways to edit php.ini in your webhost. If there are, how is it done?
     
    boyponga, Mar 27, 2007 IP
  2. jgoddard

    jgoddard Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you have a shared hosting account you won't be able to so because the php.ini file is global across all php on the server.

    You can use .htaccess to set some variables in your PHP.ini and only be specific to your hosting account.
     
    jgoddard, Mar 27, 2007 IP
  3. Kendothpro

    Kendothpro Well-Known Member

    Messages:
    574
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    120
    #3
    create a file with phpinfo() and check it to see the path to php.ini
    once its done just edit it with a text editor (either using a SCP prog and notepad or directly on the server via SSH + nano/vi/pico)
     
    Kendothpro, Mar 27, 2007 IP
  4. Kendothpro

    Kendothpro Well-Known Member

    Messages:
    574
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    120
    #4
    my post of course assumes you're on a dedicated server :) if not then goddard's advice holds true
     
    Kendothpro, Mar 27, 2007 IP
    dealasite likes this.
  5. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #5
    Some shared hosts allow you to have a php.ini in your root. Multi-domain plans may have more than one. Your "local" settings over ride the default.
     
    Colbyt, Mar 27, 2007 IP
  6. wmtips

    wmtips Well-Known Member

    Messages:
    597
    Likes Received:
    69
    Best Answers:
    1
    Trophy Points:
    150
    #6
    wmtips, Mar 27, 2007 IP
  7. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #7
    Yes you can.

    And on some servers once you try you will get a 500 error for the entire site. On those servers you create your own php.ini file or do without. Just BTDT.
     
    Colbyt, Mar 27, 2007 IP
  8. Gunda

    Gunda Guest

    Messages:
    344
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Only Shared Hosting Can Or Do It Via .htaccess
     
    Gunda, Mar 27, 2007 IP