Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Jun 2009
    Posts
    5

    Default Editing php.ini file in Cpanel

    I just uploaded my first project to Cpanel. My Php project needs to send the email, and for that I need to edit the php.ini file to open the SSL connection. Please help me in editing the PHP.ini file.

    Thanks

  2. #2
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jul 2005
    Location
    New Jersey, USA
    Posts
    397

    Default

    The main php's php.ini for apache is in /usr/local/lib/php.ini

  3. #3
    Member
    Join Date
    Jun 2009
    Posts
    5

    Default

    How can I go to this location in Cpanel. I cannot see /usr/local.. in File manager, and I tried to do it from the ssh, but on ssh screen, when I type my username and password, nothing happens.
    Any idea???

    Quote Originally Posted by PlatinumServerM View Post
    The main php's php.ini for apache is in /usr/local/lib/php.ini

  4. #4
    cPanel Partner NOC cPanel Partner NOC Badge JPC-Martin's Avatar
    Join Date
    May 2008
    Posts
    38

    Default

    You may need to request your hosting support in order to make these changes for you if you do not have root access.
    Martin.K | JaguarPC.com
    JaguarPC High Class Hosting since 1998*
    Unmanaged VPS Hosting | Managed VPS Hosting | Fail Over Hosting

  5. #5
    Member
    Join Date
    Jun 2009
    Posts
    5

    Default

    isn't there any way to override the php.ini file. I tried this solution(How to create a custom php.ini file when nothing else works | drupal.org), but it didn't worked.

  6. #6
    Member
    Join Date
    Jul 2008
    Location
    localhost
    Posts
    101

    Default

    Quote Originally Posted by sumittyagi View Post
    isn't there any way to override the php.ini file. I tried this solution(How to create a custom php.ini file when nothing else works | drupal.org), but it didn't worked.
    Yes, you can only if the server is a suphp/suexec server. You will need to ask your hosting provider to copy the original php.ini under your hosting account so that you can make the changes.

  7. #7
    Member
    Join Date
    Apr 2009
    Posts
    230

    Default

    Quote Originally Posted by sumittyagi View Post
    isn't there any way to override the php.ini file. I tried this solution(How to create a custom php.ini file when nothing else works | drupal.org), but it didn't worked.
    If you do not have 'root' access to the server then get your host to provide/copy the contents of the server php.ini so that you can create a custom php.ini . Just make the changes to the required variables.
    Note that you have to place this custom php.ini the exact folder where you need the changes to take effect.
    For example, if you place the 'php.ini' in your public_html folder then it would NOT be effective for a sub-folder under it.

  8. #8
    Member
    Join Date
    Jun 2009
    Posts
    5

    Default

    Thank for your answers and your time. I have got the root acess. Ok to run the program on my local machine i edit the php.ini and uncomment the line that says
    extension=php_openssl.dll

    How can I uncomment this line in cpanel after getting the root acess.
    Any help is highly appreciated

    Quote Originally Posted by InstaCarma_Tech View Post
    If you do not have 'root' access to the server then get your host to provide/copy the contents of the server php.ini so that you can create a custom php.ini . Just make the changes to the required variables.
    Note that you have to place this custom php.ini the exact folder where you need the changes to take effect.
    For example, if you place the 'php.ini' in your public_html folder then it would NOT be effective for a sub-folder under it.

Similar Threads & Tags
Similar threads

  1. Cant access php.ini file, is there some cPanel restrictions?
    By condoace in forum New User Questions
    Replies: 2
    Last Post: 03-02-2010, 09:32 PM
  2. Replies: 8
    Last Post: 06-18-2008, 07:45 PM
  3. where is php.ini file
    By vr4indian in forum New User Questions
    Replies: 8
    Last Post: 12-12-2006, 08:38 AM
  4. php.ini file
    By mitk in forum New User Questions
    Replies: 2
    Last Post: 02-09-2006, 12:08 PM
  5. PHP Extensions Directory - and editing php.ini
    By jl1 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 01-05-2005, 09:20 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube