View Single Post
  #4 (permalink)  
Old 07-01-2009, 04:32 AM
Spiral's Avatar
Spiral Spiral is offline
Registered User
 
Join Date: Jun 2005
Location: Area 51
Posts: 1,501
Spiral is on a distinguished road
Quote:
Originally Posted by runee View Post
[B]1. Editing the main PHP.INI file (usually in /usr/local/lib)
I tried this first one but it didnt allowed me to save the php.ini file after editing
You have to be logged in via SSH to your server as the "root" administrator
in order to be able to edit and save the primary PHP.INI file for the server.

If you do not have "root" access then you cannot update this file
and you will need to contact your server administrator to help you!

Otherwise, don't forget to restart your apache server process after
updating the PHP.INI file using the command 'service httpd restart'
after you finish making the changes to your configuration.

Quote:
2. Overriding the PHP settings in the virtualhost container in
the main httpd.conf file (located in /usr/local/apache/conf)
I didnt find the apache folder under the local directory. where can I find this.
It sounds like you are not logged in as "root" or are logged in using a restricted jailshell.

You must be logged in as "root" in order to edit any server wide configuration files.

An alias (symlink) folder for /usr/local/apache on most Cpanel servers is /etc/httpd

Quote:
3. Creating a custom PHP.INI file located in /usr/local/lib/php.ini.d
or in a location specified by the server administrator using the
a "suPHP_ConfigPath" directive in httpd.conf for your account.
To create a custom PHP.INI file setup for a specific hosting account on your
server instead of making changes for the entire server globally, you will need to
create a copy of the PHP.INI file found in /usr/local/lib saved to a new PHP.INI
file stored at some other new location and then add the suPHP_ConfigPath directive
the the VirtualHost section of HTTPD.CONF for the account where you want
the custom changes to appear and tell the server where you saved your new
custom PHP.INI so it can be used with the account where you want the changes.

(Click to see suPHP - Documentation for more information on updating SuPHP settings)

If you do not have access as "root" then you will need to contact your
server administrator and request assistance making these changes.

Without root access, you may still be able to change some options using
the ini_set() function from within your PHP scripts directly but you would
be limited in what settings you could change.

Last edited by Spiral; 07-01-2009 at 04:40 AM.
Reply With Quote