Understanding php.ini

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    3 Favorites

    Understanding php.ini - Presentation Transcript

    1. Understanding php.ini Exploring the PHP configuration file.
    2. What is php.ini
      • It is a configuration file and control some of the setting of the PHP interpreter.
      • The configuration file (php.ini) is read when PHP starts.
      • Where a configuration setting may be set OR in how many ways you can set your configuration parameters.
      • Following modes determine when and where a PHP directive may or may not be set .
      • Mode Meaning
      • PHP_INI_USER Entry can be set in user scripts using function like ini_set().
      • PHP_INI_PERDIR Entry can be set in php.ini, .htaccess or httpd.conf
      • PHP_INI_SYSTEM Entry can be set in php.ini or httpd.confPHP_INI_ALLEntry can be set anywhere
      • In this presentation all the php.ini setting can be set in user’s script.
    3. Basic Important Settings
      • Language Options
      • Resource Limit
      • Data Handling
      • File Uploads
      • Others
    4. Language Options
      • short_open_tag : Tell whether to use short form (<? ?>) .If you disabled then you must use the long form of the PHP tags i.e (<?php ?>).By default it is set to “1”.
        • Description : <? echo “Hello reader” ?> is short-form PHP tags
        • <?php echo “Hello Reader” ?> is long form PHP tags
      • asp_tags : Enable the use of ASP-like <% %> tags in addition to <?php ?> tags.
      • Description : This tag setting is kept to make easiness for developers who started with PHP after ASP.
    5. Resource Limit
      • memory_limit : Maximum amount of memory a script may consume. Default value is 128 MB.
      • max_execution_time : Maximum execution time of each script, in seconds. Default value is set to 30 sec.
    6. Data Handling
      • register_globals : Whether or not to register the EGPCS variables as global variables. By default it is set to “Off”.
      • Description: Consider a Form field <input name=“name“ type=“text”> .When form is submitted via POST the form value for name will be fetched as show below.
      • PHP code when register_globals = On
      • $myName = $name;
      • PHP code when register_globals = Off
      • $myName = $_POST[‘name'];
      • post_max_size : Maximum size of POST data that PHP will accept or you can POST through form. Default values is 8M.This setting is helpful for file uploads.
    7. File Uploads
      • file_uploads : Whether or not to allow HTTP file uploads.Default value is “On”.
      • upload_tmp_dir : The temporary directory used for storing files when doing file upload. Will use system default if not specified. By default it is empty.
      • upload_max_filesize :The maximum size of an uploaded file. Default value is 2M.
    8. Others
      • allow_url_fopen : Whether to allow the treatment of URLs (like http:// or ftp://) as files. Default value is “ON”.
      • Description:
      • if allow_url_fopen =Off
      • file_get_content( http://www.sitename.com/test.txt ) will not work !!
      • session.cache_expire : Document expires after n minutes. Default value is 180.
      • session.gc_maxlifetime :After this number of seconds, stored data will be seen as 'garbage' and cleaned up by the garbage collection process. Default value is 1440.
      • session.save_handler : Handler used to store/retrieve session data. Default value is files
    9. Contact Me All Questions, comments and feedbacks are welcomed at pritiatwork@gmail.com.
    SlideShare Zeitgeist 2009

    + Priti  SolankiPriti Solanki Nominate

    custom

    1136 views, 3 favs, 0 embeds more stats

    understanding php.ini basic settings.

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1136
      • 1136 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 3
    • Downloads 1
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories