Pages: [1]   Go Down

Author Topic: Modifying values in your own php.ini in cPanel  (Read 1453 times)

Valentin

  • Novel
  • *
  • Offline Offline
  • Posts: 10
    • View Profile
Modifying values in your own php.ini in cPanel
« on: March 20, 2010, 03:03:46 PM »

Hello everyone, today I'm going to write a short guide on how to change values for your account's PHP. Changing these values(for example, register_globals, max_input_time, max_execution_time and etc.) is sometimes requirement for the software which you are planning to install. Here are the few steps you need to do in order to get the changed values working:

1. FTP to your public_html folder and create (or edit if you already have) a .htaccess file. Place the following lines in the file:

Code: [Select]
AddHandler php5-fastcgi .php
Action php5-fastcgi /cgi-bin/php5.fcgi

2. Go to your cgi-bin folder inside your public_html foler and copy your php.ini file with your custom changes. After that create a file called php5.fcgi and put the following lines in it:

Code: [Select]
#!/bin/sh
export PHP_FCGI_CHILDREN=1
export PHP_FCGI_MAX_REQUESTS=10
exec /usr/local/cpanel/cgi-sys/php5

These changes are necessary since the the Apache on HostColor servers is running under FastCGI(fcgid) and the php works as suPHP. Have in mind that on other servers not all of these changes might be necessary, for example the .htaccess change might nor be mandatory.
Logged

Alexander.P.

  • Guest
Re: Modifying values in your own php.ini in cPanel
« Reply #1 on: April 04, 2010, 01:31:10 AM »

Good one. That would most definitely come in handy.  ;)
Logged

Valentin

  • Novel
  • *
  • Offline Offline
  • Posts: 10
    • View Profile
Re: Modifying values in your own php.ini in cPanel
« Reply #2 on: April 04, 2010, 03:47:56 PM »

Thanks, I'm glad you've liked that :)
Logged
Pages: [1]   Go Up