Admin Panel 2: PHP Configuration: Difference between revisions

From The Uniform Server Wiki
Jump to navigation Jump to search
m (Reverted edits by Upazixorys (Talk); changed back to last version by Ric)
(Removed excess category tags)
 
Line 113: Line 113:


[[Category: UniCenter]]
[[Category: UniCenter]]
[[Category: New Users]]
[[Category: Support]]
[[Category: About]]
[[Category: Facts]]
[[Category: Troubleshooting]]

Latest revision as of 10:05, 21 June 2013

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.

Top

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.

Top

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.

Top

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.

Top

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.

Top

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.

Top

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.

Top

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.

Top


Ric