cPanel custom PHP.INI File Configuration

cPanel custom PHP.INI File Configuration

Today, We want to share with you cPanel custom PHP.INI File Configuration.
In this post we will show you PHP.INI file Configuration with cPanel steps, hear for How to set up custom php.ini files we will give you demo and example for implement.
In this post, we will learn about How to Change PHP Settings in your Hosting Account with an example.

The PHP (config file)configuration file on webserver, File Name: php.ini,
is the final and most Esay and startup way to affect your PHP’s functionality.

Create a php.ini File

/var/www/vhostserver/$DOMAIN_NAME/etc/php.ini

Step By Step : How to make easy way to create a new php.ini file using cPanel:

(:=> First of all Login to cPanel in your web domain.
(:=> Select In the Files section in cPanel,now click on the File Manager menu icon.
(:=> in cPanel,Select Home(root) Directory and click Go there.
(:=> Now there Click the New File button link at the top of the page in cPanel.
(:=> In cPanel, the field called Add – New File Name, make file : enter php.ini and click Create New File and save.
(:=> File name : Click the file – named php.ini in cPanel.
(:=> Last setp Select the Edit button click and then at the top of the page display and click the Edit button(Edit) in the pop-up box(open pop-up box).

PHP settings LIST : php.ini File Settings You Can two Change below :

1st : register_globals = On //Boolean
2nd : magic_quotes_gpc = Off //Boolean

PHP all Settings below that Cannot be Changed(required)

#=> safe mode = Off (cannot adjust) //required
#=> memory_limit = 256M (MAXIMUM) //required
#=> max_execution_time = 30 (MAXIMUM in seconds) //required
#=> max_input_time = 60 (MAXIMUM in seconds) //required
#=> post_max_size = 64M (MAXIMUM) //required
#=> upload_max_filesize = 64M (MAXIMUM) //required
#=> enable_dl = Off (cannot adjust) //required

[First] : short_open_tag = Off //Boolean on or off
[NEXT] : safe_mode = Off //Boolean on or off
[NEXT] : safe_mode_exec_dir = [DIR] //base path include directory
[NEXT] : safe_mode_allowed_env_vars =

 //include
[NEXT] : safe_mode_protected_env_vars = [LD_LIBRARY_PATH] //base path include directory
[NEXT] : disable_functions = [newfunction0, newfunction1...]
[NEXT] : max_execution_time = 30 //time seconds
[NEXT] : error_reporting = E_ALL & ~E_NOTICE //error display notise
[NEXT] : error_prepend_string = [""] //string pass
[NEXT] : warn_plus_overloading = Off //Boolean on or off
[NEXT] : variables_order = EGPCS //display
[NEXT] : register_globals = Off //Boolean on or off
[NEXT] : gpc_order = GPC //order
[NEXT] : magic_quotes_gpc = On //Boolean on or off
[NEXT] : magic_quotes_runtime = Off //Boolean on or off
[NEXT] : magic_quotes_sybase = Off //Boolean on or off
[NEXT] : auto-prepend-file = [path/to/file]  //base path include directory
[NEXT] : auto-append-file = [path/to/file]  //base path include directory
[NEXT] : include_path = [DIR] //base path include directory
[NEXT] : doc_root = [DIR] //base path include directory
[NEXT] : file_uploads = [on/off] //Boolean on or off
[NEXT] : upload_tmp_dir = [DIR] //base path include directory
[NEXT] : session.save-handler = files //base path include directory
[NEXT] : mysql.default_host = (localhost)hostname
[NEXT] : mysql.default_user =(admin) username
[LAST] : mysql.default_password =(*****) password</p>


<h3>To Display WinCache php configuration and other all PHP settings below.</h3>
<p>Step 1 : First of all Open a text editor Like(SubLine,Notepad++,dreamviwer,etc..)
Step 2 :create a new file using PHP, type the following in add the text: <!--?php phpinfo(); ?--> //simple script using PHP
Step 3 : and then ctrl+s Save This file as c:\mycomputer\wwwroot\phpinfo.php.//server path
Step 4 :Now Last run this file with Open a browser(Mozila,chrome..) and enter the below following URL:</p>
[php]
http://localhost/yourfoldername/phpinfo.php

PHP Create a script to display your all PHP information properly

File Name : phpinfo.php

<?php phpinfo(); ?>

We hope you get an idea about cPanel custom PHP.INI File Configuration
We would like to have feedback on my Information blog .
Your valuable any feedback, Good question, Inspirational Quotes, or Motivational comments about this article are always welcome.
If you liked this post, Please don’t forget to share this as Well as Like FaceBook Page.

We hope This Post can help you…….Good Luck!.


Related FAQ

Here are some more FAQ related to this Article:

  1.   PHP Image Compression before Uploading
  2.   PHP Creating Dynamic Directory (Folder) Example
  3.   PHP Webcam Capture Image and Save from Camera
  4.   Pure CSS Add active class to hover effects
  5.   Multiple SQL SERVER Queries to get all dates between two dates
  6.   Angular 8 Material Table Filter Sorting Paging
  7.   Laravel 5.6 Like Dislike rating system with jQuery, Ajax and PHP
  8.   Laravel 6 Hello world example - PHP framework
  9.   PHP Delete All Directory Files In Directory
  10.   PHP Yii Maintenance Mode Tutorial with Examples

Leave a Reply

Your email address will not be published. Required fields are marked *