The .htaccess file and the .php.ini file placed on the Apache server allow you to enter numerous additional settings for the entire server, directory or web page. The privilege of using configuration files has only owners of hosting servers. for example, the popular services in our offer.
The php.ini file is a configuration file that allows you to define PHP settings on the entire server or directory to which the domain has been redirected. Using the php.ini file to store configurations is a very good solution due to:
- unimaginable memories,
- the ability to group data into sections,
- the ability to define PHP settings only for the selected domain (directory).
You can use the two following examples that set the indicated directive as enabled:
asp_tags = 1
asp_tags = on
How to use the php.ini file?
If domain is redirected to a subdirectory with the website separation function enabled, then the php.ini file must be placed in this directory.
If domain is directed to the server’s root directory “/”, then the php.ini file must be placed in the root directory. is directed to the server’s root directory “/”, then the php.ini file must be placed in the root directory.
If domain is redirected to the directory with the website separation function disabled, this php.ini file must be placed in the server’s root directory.
Popular PHP directives that you can change on the server at home.pl
|DIRECTIVE||DEFAULT VALUE||WHAT DOES IT DO?|
|asp_tags||Off||The ability to use <% %> instead of <?php?>.|
|display_errors||On||Responsible for displaying errors to users or hiding them.|
|error_log||no value||Specifies where the logs will be saved. We give the path from the ROOT directory to the file with logs such as “/logs/php_errors.log”.|
|error_reporting||Off||Decides what kind of errors will be logged:
|include_path||.:/:/usr/local/php/pear5||Indicates where the functions require (), include (), fopen (), file (), readfile () and file_get_contents () are to search for files.|
|log_errors||Off||Determines whether errors will be logged (applies only to login in the scope of the client, system logs are collected by home.pl as part of a physical server).|
|magic_quotes_gpc||On||In the past used mainly for protection against SQL Injection. Click here to check how to turn off the magic_quotes_gpc function on the server at home.pl.|
|memory_limit||128m||Specifies the memory limit for executed scripts on the server. The default value is 128M. Users using Professional Line servers can increase this parameter to 512 MB|
|post_max_size||64M||The size of data sent by POST.|
|register_globals||Off||Global variables are responsible for the possibility of using, among others from variables sent to the server.|
|safe_mode||Off||Enabling safe_mode implements all subordinate safe_mode variables.|
|safe_mode_exec_dir||/usr/local/php/bin||The system () and exec () functions will not start the program if it is not in the indicated location.|
|safe_mode_gid||Off||safe_mode by default checks user UID, setting to ON makes sure that GID will be checked.|
|short_open_tag||On||Allows the use of a shorter <tag ?>.|
|upload_max_filesize||64M||Must be less than or equal to “post_max_size”.|
|max_input_vars||2000||The number of variables that can be passed in an HTTP request.|
Under which domain the session will be served. Possible values:
For servicing sessions from many subdomains:
|session.save_path||/tmp||Directory in which session files will be stored.|
An example of the contents of the php.ini file:
error_log = /plik_logow.log error_reporting = E_ALL & ~E_NOTICE log_errors = 1 display_errors = off
More information about other PHP settings:
More information about other PHP settings that you can change, among others using the php.ini file, go to: http://php.net/manual/en/ini.list.php
On the page provided you will find information about the available PHP settings. If the chosen directive in the column “Changeable” will be: “PHP_INI_SYSTEM”, it means that you will not be able to change this setting on the server at home.pl.