{"id":335,"date":"2007-09-01T19:27:02","date_gmt":"2007-09-01T19:27:02","guid":{"rendered":"https:\/\/bodhost.com\/kb\/\/web-hosting\/index.php\/2007\/09\/01\/how-to-edit-phpini-file\/"},"modified":"2026-02-26T14:04:57","modified_gmt":"2026-02-26T14:04:57","slug":"how-to-edit-phpini-file","status":"publish","type":"post","link":"https:\/\/www.bodhost.com\/kb\/how-to-edit-phpini-file\/","title":{"rendered":"How to edit php.ini file?"},"content":{"rendered":"\r\n<h4 class=\"wp-block-heading\">What is the php.ini file?<\/h4>\r\n\r\n\r\n\r\n<p>Php.ini file is an important configuration file of your PHP server.<\/p>\r\n\r\n\r\n\r\n<p>How a php.ini File is read?<\/p>\r\n\r\n\r\n\r\n<p>When the PHP interpreter starts, it acts according to the settings specified in any available php.ini file. The Web server will look for this file in the following locations and the following order:<\/p>\r\n\r\n\r\n\r\n<ul>\r\n<li>The directory from which the PHP script was called<\/li>\r\n<li>The root of your Web directory (typically public_html)<\/li>\r\n<li>The Web server&#8217;s default php.ini<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>To be able to work with PHP you need to be a master in that. If you are developing scripts on your own PHP is enabled computer or if you have administrator-level control over your server, you can globally change how your PHP installation runs.<\/p>\r\n\r\n\r\n\r\n<p><strong>These are the common settings you might want to adjust:<\/strong><\/p>\r\n\r\n\r\n\r\n<ul>\r\n<li>register_globals<\/li>\r\n<li>display_errors<\/li>\r\n<li>error_reporting<\/li>\r\n<li>magic_quotes_gpc<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>You should keep in mind that PHP is installed with the settings that the developers think are best. Changing any single setting may make it easier to learn the language, but at the cost of security or performance.<\/p>\r\n\r\n\r\n\r\n<p><strong>Where is this php.ini file located?<\/strong><\/p>\r\n\r\n\r\n\r\n<p>Thie php.ini file location depends on many things: if you are using Windows or Linux, where you installed your webserver, &#8230; the file is always located on the server where the scripts of Claroline will run.<\/p>\r\n\r\n\r\n\r\n<p>You can find the php.ini location by using the following command:<\/p>\r\n\r\n\r\n\r\n<p>phpinfo();<br \/>?&gt;<br \/><strong>How to edit the php.ini file?<\/strong><\/p>\r\n\r\n\r\n\r\n<p><strong>These are the following steps to edit a php.ini file:<\/strong><\/p>\r\n\r\n\r\n\r\n<ol>\r\n<li>First, find the location of the php.ini file<\/li>\r\n<li>Place this script on your server.<\/li>\r\n<li>Run this script in your Web browser by going to http:\/\/anyofyour.url.here\/phpinfo.php in your Web browser (on your computer, this may be like http:\/\/localhost\/phpinfo.php or http:\/\/localhost\/~username\/phpinfo.php).<\/li>\r\n<li>On the result page, look for the line that says &#8220;Configuration File (php.ini) Path&#8221;. It should be about 6 rows down in the table.<\/li>\r\n<li>Note the location of your php.ini file. It is the active file PHP is using. Your server may have multiple php.ini files on it, but this is the one that counts.<\/li>\r\n<li>If you don&#8217;t have a php.ini file on your server (if the value is blank in the phpinfo.php script or if you go to the directory it lists and there&#8217;s no php.ini file there), create it one by one :<br \/>\r\n<ol>\r\n<li>Download the complete source code from http:\/\/www.php.net\/downloads.php.<\/li>\r\n<li>Extract the source (unzip or whatever) so that you now have a folder of files.<\/li>\r\n<li>Find the PHP. ini-dist file, located in the main folder.<\/li>\r\n<li>Rename this file as php.ini and move it to the proper directory.<\/li>\r\n<\/ol>\r\n<\/li>\r\n<li>Open the php.ini file in a text editor (do not use Notepad, Word, TextEdit, or any other text editor that will not properly display lines or will not let you save a plain text file).<\/li>\r\n<li>Make the changes you want, keeping in mind the following:<br \/>\r\n<ol>\r\n<li>\r\n<p>Comments marked using a semi-colon(;). Anything after the semicolon is ignored.<\/p>\r\n<\/li>\r\n<li>\r\n<p>Instructions on what most of the settings mean included in the file.<\/p>\r\n<\/li>\r\n<li>\r\n<p>The top of the page lists general information with examples. Do not change these values. Change the settings where they appear later in the file.<\/p>\r\n<\/li>\r\n<li>\r\n<p>Note for safety purposes, do not change any default settings, just comment them out (by preceding the line with a semi-colon), then add the new, modified line afterward.<\/p>\r\n<\/li>\r\n<li>\r\n<p>Add a comment (using the semi-colon) to mark what changes you made and when. For example:<\/p>\r\n\r\n\r\n\r\n<p><strong>;<\/strong> register_globals = Off<br \/>register_globals = On ; Added by LEU 1\/9\/2007<\/p>\r\n<\/li>\r\n<\/ol>\r\n<\/li>\r\n<li>Save the file.<\/li>\r\n<li>Restart the Web server (Apache, IIS, etc.). You do not need to restart your whole computer.<\/li>\r\n<li>Rerun the phpinfo.php script to make sure the changes took effect.<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<p>Hope you have understood how to edit the php.ini file? For assistance, contact the <a href=\"https:\/\/www.bodhost.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">bodHOST<\/a> support team, which is available just for you 24\u00d77.<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>What is the php.ini file? Php.ini file is an important configuration file of your PHP server. How a php.ini File is read? When the PHP interpreter starts, it acts according&hellip;<\/p>\n<p><a href=\"https:\/\/www.bodhost.com\/kb\/how-to-edit-phpini-file\/\" class=\"more-link\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[664],"tags":[1042,1043],"class_list":["post-335","post","type-post","status-publish","format-standard","hentry","category-web-hosting","tag-how-to-edit-php-ini-file","tag-php-ini-file"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Edit the php.ini File to Configure PHP Settings Easily<\/title>\n<meta name=\"description\" content=\"In this article you will learn the basic thing of How to edit php.ini file? for more information you can visit bodhost.com\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.bodhost.com\/kb\/how-to-edit-phpini-file\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Edit the php.ini File to Configure PHP Settings Easily\" \/>\n<meta property=\"og:description\" content=\"In this article you will learn the basic thing of How to edit php.ini file? for more information you can visit bodhost.com\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.bodhost.com\/kb\/how-to-edit-phpini-file\/\" \/>\n<meta property=\"og:site_name\" content=\"Knowledge Base - bodHOST\" \/>\n<meta property=\"article:published_time\" content=\"2007-09-01T19:27:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-26T14:04:57+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-edit-phpini-file\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-edit-phpini-file\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/c48414ad1536cea20e85282b0737a9f9\"},\"headline\":\"How to edit php.ini file?\",\"datePublished\":\"2007-09-01T19:27:02+00:00\",\"dateModified\":\"2026-02-26T14:04:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-edit-phpini-file\\\/\"},\"wordCount\":671,\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\"},\"keywords\":[\"How to edit php.ini file?\",\"php.ini file\"],\"articleSection\":[\"Web Hosting\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-edit-phpini-file\\\/\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-edit-phpini-file\\\/\",\"name\":\"How to Edit the php.ini File to Configure PHP Settings Easily\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#website\"},\"datePublished\":\"2007-09-01T19:27:02+00:00\",\"dateModified\":\"2026-02-26T14:04:57+00:00\",\"description\":\"In this article you will learn the basic thing of How to edit php.ini file? for more information you can visit bodhost.com\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-edit-phpini-file\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-edit-phpini-file\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-edit-phpini-file\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Web Hosting\",\"item\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/category\\\/web-hosting\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to edit php.ini file?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/\",\"name\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\"},\"alternateName\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\",\"name\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Profile-Pic.png\",\"contentUrl\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Profile-Pic.png\",\"width\":240,\"height\":240,\"caption\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\"},\"image\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/c48414ad1536cea20e85282b0737a9f9\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/51e53199212db3f59606920448d45a6ead224f904558e3ab9251d071a609b202?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/51e53199212db3f59606920448d45a6ead224f904558e3ab9251d071a609b202?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/51e53199212db3f59606920448d45a6ead224f904558e3ab9251d071a609b202?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Edit the php.ini File to Configure PHP Settings Easily","description":"In this article you will learn the basic thing of How to edit php.ini file? for more information you can visit bodhost.com","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.bodhost.com\/kb\/how-to-edit-phpini-file\/","og_locale":"en_US","og_type":"article","og_title":"How to Edit the php.ini File to Configure PHP Settings Easily","og_description":"In this article you will learn the basic thing of How to edit php.ini file? for more information you can visit bodhost.com","og_url":"https:\/\/www.bodhost.com\/kb\/how-to-edit-phpini-file\/","og_site_name":"Knowledge Base - bodHOST","article_published_time":"2007-09-01T19:27:02+00:00","article_modified_time":"2026-02-26T14:04:57+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.bodhost.com\/kb\/how-to-edit-phpini-file\/#article","isPartOf":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-edit-phpini-file\/"},"author":{"name":"admin","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/person\/c48414ad1536cea20e85282b0737a9f9"},"headline":"How to edit php.ini file?","datePublished":"2007-09-01T19:27:02+00:00","dateModified":"2026-02-26T14:04:57+00:00","mainEntityOfPage":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-edit-phpini-file\/"},"wordCount":671,"publisher":{"@id":"https:\/\/www.bodhost.com\/kb\/#organization"},"keywords":["How to edit php.ini file?","php.ini file"],"articleSection":["Web Hosting"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.bodhost.com\/kb\/how-to-edit-phpini-file\/","url":"https:\/\/www.bodhost.com\/kb\/how-to-edit-phpini-file\/","name":"How to Edit the php.ini File to Configure PHP Settings Easily","isPartOf":{"@id":"https:\/\/www.bodhost.com\/kb\/#website"},"datePublished":"2007-09-01T19:27:02+00:00","dateModified":"2026-02-26T14:04:57+00:00","description":"In this article you will learn the basic thing of How to edit php.ini file? for more information you can visit bodhost.com","breadcrumb":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-edit-phpini-file\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.bodhost.com\/kb\/how-to-edit-phpini-file\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.bodhost.com\/kb\/how-to-edit-phpini-file\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Web Hosting","item":"https:\/\/www.bodhost.com\/kb\/category\/web-hosting\/"},{"@type":"ListItem","position":2,"name":"How to edit php.ini file?"}]},{"@type":"WebSite","@id":"https:\/\/www.bodhost.com\/kb\/#website","url":"https:\/\/www.bodhost.com\/kb\/","name":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","description":"","publisher":{"@id":"https:\/\/www.bodhost.com\/kb\/#organization"},"alternateName":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.bodhost.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.bodhost.com\/kb\/#organization","name":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","url":"https:\/\/www.bodhost.com\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/10\/Profile-Pic.png","contentUrl":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/10\/Profile-Pic.png","width":240,"height":240,"caption":"Web Hosting Knowledge Base | bodHOST Hosting FAQ"},"image":{"@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/person\/c48414ad1536cea20e85282b0737a9f9","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/51e53199212db3f59606920448d45a6ead224f904558e3ab9251d071a609b202?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/51e53199212db3f59606920448d45a6ead224f904558e3ab9251d071a609b202?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/51e53199212db3f59606920448d45a6ead224f904558e3ab9251d071a609b202?s=96&d=mm&r=g","caption":"admin"},"url":"https:\/\/www.bodhost.com\/kb\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/335","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/comments?post=335"}],"version-history":[{"count":6,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/335\/revisions"}],"predecessor-version":[{"id":14064,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/335\/revisions\/14064"}],"wp:attachment":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/media?parent=335"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/categories?post=335"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/tags?post=335"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}