What is php.ini ?

The php.ini file and changing PHP Settings

The php.ini file is a special file for PHP and various flavors such as suPHP (pronounced sue-p-h-p).

The php.ini file is where you declare changes to your PHP settings. You can use the default settings for the server, change specific settings by editing the existing php.ini, or create a new text file and name it php.ini.

Default Settings

The server is already configured with standard settings for PHP that have been selected by our administrators to be the most optimal setting for a majority of our customers. Unless you specifically need to change one or more of the settings, there is no need to create or modify a php.ini file. If the php.ini file does not exist in your account, then your site will use the default PHP settings defined on the server.

Making Changes - Best Practices

It is best if you have a copy of the default php.ini file in your cPanel Home directory (/home/username/) and then make changes to that file. (See below for file location for Plesk.)

If you need a php.ini file for your account, please contact us via phone or live chat. We are glad to create a complete file for you.

Location of custom php.ini

The copy of the default php.ini file would need to be located in the following location:

  • cPanel: /home/username/php.ini
  • Plesk for VPS: /var/www/vhost/$DOMAIN/etc/php.ini

Be sure to replace "username" with your actual cPanel user name, and "$DOMAIN" with your actual domain.

Making Changes via cPanel's php.ini QuickConfig

You can also make changes to php.ini via the "php.ini QuickConfig" utility in the "Software/Services" section of your cPanel.

  1. Login to cPanel.
  2. Click on php.ini QuickConfig in the "Software/Services" section.
  3. Enable QuickConfig if not already enabled.
  4. Change the settings that you want to change.
  5. Click the Save Changes button to save your changes.
WARNING: Changes you make here may overwrite the current PHP settings on your account (as contained in your existing php.ini file).

Making Changes - Alternate Method for cPanel

Instead of having us create and setup the php.ini file for you, you can place your php.ini file in your Home Directory (/home/username/) yourself and then add this code to your primary .htaccess (/home/username/public_html/.htaccess).

Be sure to replace "username" with your actual cPanel user name.

Note: While it is possible to just create a php.ini file with the changes you like added to it, the more advisable practice would be to modify an existing / default php.ini file to suit your needs.

 


suPHP_ConfigPath /home/username

order allow,deny
deny from all


Some common changes that you must make when moving from non-secure php environment to suPHP:

For example, if your site had these settings in a .htaccess file:

 

php_flag upload_max_filesize 10M
php_value post_max_size 10M
php_value max_execution_time 30

 

SuExec users must put them in a php.ini file instead. Here is the proper syntax:

 

upload_max_filesize = 10M
post_max_size = 10M
max_execution_time = 30

 

NOTE: Techsys cannot know why you want nor need to change these settings. You are changing this at the advice of your web designer or the developer of your script. Techsys can only show you where to make the change.
 
  • 0 Kasutajad peavad seda kasulikuks
Kas see vastus oli kasulik?

Seotud artiklid

What Virtualization do you use on your VPS

At the moment Techsys provides both OpenVZ and Virtuozzo Virtual Private Servers. All our OpenVZ...

Shoutcast Stream Is Playing One Song Or Part Of It Repeatedly Over and Over

If you Shoutcast stream is playing the same song over and over, login into your Control Panel and...

What to Do If You didn't get your welcome email or If You lost it. How can I have it resent?

When you signup and pay for a product, we normally send you an email address that has the details...

Can I Downgrade to a cheaper plan and How do I downgrade my hosting plan?

You absolutely free to move / downgrade your hosting plan to something cheaper and fit for you....

How Can I Get Extra Space, Bandwidth and RAM where applicable?

You May from require to get more Space, Bandwidth or RAM in the case of VPS and Dedicated...

Powered by WHMCompleteSolution