Admin Panel 2: PHP Configuration: Difference between revisions
Upazixorys (talk | contribs) No edit summary |
m (Reverted edits by Upazixorys (Talk); changed back to last version by Ric) |
||
Line 1: | Line 1: | ||
{{Uc_nav_apanel2}} | {{Uc_nav_apanel2}} | ||
'''PHP Configuration''' | '''PHP Configuration''' | ||
Line 7: | Line 6: | ||
You can change the following PHP default values: | You can change the following PHP default values: | ||
{|cellpadding= | {|cellpadding="4" | ||
|- | |- | ||
!style= | !style="background:#cccccc"|Name | ||
!style= | !style="background:#cccccc"|Default value | ||
!& | ! | ||
|-style= | |-style="background:#e1e1e1" | ||
|Safe Mode: | |Safe Mode: | ||
|off | |off | ||
|style= | |style="background:#f5f5f5"|'''?''' | ||
|-style= | |-style="background:#e1e1e1" | ||
|Show PHP In Server Signature: | |Show PHP In Server Signature: | ||
|on | |on | ||
|style= | |style="background:#f5f5f5"|'''?''' | ||
|-style= | |-style="background:#e1e1e1" | ||
|Register Globals: | |Register Globals: | ||
|on | |on | ||
|style= | |style="background:#f5f5f5"|'''?''' | ||
|-style= | |-style="background:#e1e1e1" | ||
|Maximum Script Execute Time (s.): | |Maximum Script Execute Time (s.): | ||
|300 | |300 | ||
|style= | |style="background:#f5f5f5"|'''?''' | ||
|-style= | |-style="background:#e1e1e1" | ||
|Maximum Memory Amount (MB): | |Maximum Memory Amount (MB): | ||
|32M | |32M | ||
|style= | |style="background:#f5f5f5"|'''?''' | ||
|-style= | |-style="background:#e1e1e1" | ||
|Print Errors: | |Print Errors: | ||
|on | |on | ||
|style= | |style="background:#f5f5f5"|'''?''' | ||
|-style= | |-style="background:#e1e1e1" | ||
|Maximum Post Size: | |Maximum Post Size: | ||
|10M | |10M | ||
|style= | |style="background:#f5f5f5"|'''?''' | ||
|-style= | |-style="background:#e1e1e1" | ||
|Maximum Upload Size: | |Maximum Upload Size: | ||
|10M | |10M | ||
|style= | |style="background:#f5f5f5"|'''?''' | ||
|} | |} | ||
Revision as of 08:17, 24 November 2010
Admin Panel 2 |
PHP Configuration
This page allows you to set PHP default settings, requires a server re-start for the setting to take place.
You can change the following PHP default values:
Name | Default value | |
---|---|---|
Safe Mode: | off | ? |
Show PHP In Server Signature: | on | ? |
Register Globals: | on | ? |
Maximum Script Execute Time (s.): | 300 | ? |
Maximum Memory Amount (MB): | 32M | ? |
Print Errors: | on | ? |
Maximum Post Size: | 10M | ? |
Maximum Upload Size: | 10M | ? |
Note: The question mark (link) to the right of each text field takes you to the appropriate section of the online documentation for that setting.
Safe Mode
Default OFF
If you are sharing your server with others and allowing them to run their own PHP scripts, it is probably worth considering switching safe mode ON. At best it is a compromise however the loss of some facilities may anger your them.
If you are running third party scripts and safe mode on, you may find some of these scripts will not run. The default is OFF, it’s a good idea to leave it that way, but if you think you need the extra security it provides switch it on.
Show PHP In Server Signature
Default is ON
PHP will add its signature to the Web server header. This can be used to determine that you are using PHP on your server.
You can turn it off to hide the signature, however you must take further steps to hide the fact you are using PHP. Personally I think this is not worth the effort it just depends how paranoid you are.
Register Globals
Default is ON
This is a two edged sword, if you switch it off as you should the chances are some third party code may not run. It is this legacy code that prevents register globals being depreciated.
If you are writing new code use Super Globals and switch Register Globals OFF.
Maximum Script Execute Time (s)
Default 300s
This is the maximum time that a script can run, 300s in process time is a millennium in computer time. However do not be fooled, at some point you may have to increase this value depends what your scripts do. Database intensive scripts can easily exceed this maximum. For the average script it should be OK.
Maximum Memory Amount (MB)
Default 32M
Looks a reasonable value but remember arrays tend to be large, add a few open files and dump a database to an array and may be that figure is on the small size. Do not be surprised if you need to increase this value at some point. On the other hand may be this is too large for your needs, it's your choice remember if you break it just change it to a value that works for you.
Print Errors
Default ON
The default php.ini setting is to show (displayed in your browser) all script errors, except for notices and coding standards warnings. You can if you wish increase this level of reporting but the defaults should be more that adequate for development. (Too may warnings just confuse)?
For production servers turn Print Errors to OFF, well you don’t want to show the whole world what a bad programmer you are. More importantly it is a security risk a lot of information can be gained about your system from these error messages.
Maximum Post Size
Default 10M
Maximum size of POST data, that PHP will accept. It looks large and it is; just depends on your application.
Maximum Upload Size
Default 10M
Maximum allowed size for uploaded files. Again it is a large value like I said above depends on your application. Even a zipped file with a few images can exceed this.
Bottom line it’s your server you can do whatever you like with it, the above are only suggestions with comments to give a feel for what to change.
Ric |