{"id":23209,"date":"2020-12-09T10:07:21","date_gmt":"2020-12-09T02:07:21","guid":{"rendered":"https:\/\/web.mwwsb.com.my\/pjci\/?post_type=kb&p=23209"},"modified":"2022-09-08T20:00:22","modified_gmt":"2022-09-08T12:00:22","slug":"security-update-disabled-php-functions","status":"publish","type":"kb","link":"https:\/\/www.casbay.com\/guide\/kb\/security-update-disabled-php-functions","title":{"rendered":"Disabled PHP Functions"},"content":{"rendered":"\t\t
We have disabled PHP features to improve safety on our shared hosting<\/a> servers:<\/p> \u2013 exec Please create a php.ini file in your public_html directory if you want to use the above PHP features on your website and add below line:<\/p> \u201cdisable_functions =\u201d (without double quotes)<\/p> You can generate a blank text file with the name of \u201cphp.ini\u201d in your public html if you do not understand how to generate php.ini (php custom file setup). This settings file will override your website\u2019s present PHP settings.<\/p> This enables the default in a single domain setting.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t Seriously, almost any PHP function can be dangerous given the right context. The function- Thanks for reading! We hope you learn about disabled PHP functions through this article.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":" Disabled PHP Functions We have disabled PHP features to improve safety on our shared hosting servers: \u2013 exec\u2013 passthru\u2013 shell_exec\u2013 system\u2013 proc_open\u2013 popen\u2013 curl_exec\u2013 curl_multi_exec\u2013 parse_ini_file\u2013 show_source Please create a php.ini file in your public_html directory if you want to use the above PHP features on your website and add below line: \u201cdisable_functions =\u201d (without […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"no-sidebar","site-content-layout":"page-builder","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"disabled","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"default","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}}},"kbtopic":[113],"kbtag":[106],"mkb_version":[],"_links":{"self":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/23209"}],"collection":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/types\/kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/comments?post=23209"}],"version-history":[{"count":8,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/23209\/revisions"}],"predecessor-version":[{"id":37050,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/23209\/revisions\/37050"}],"wp:attachment":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/media?parent=23209"}],"wp:term":[{"taxonomy":"kbtopic","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kbtopic?post=23209"},{"taxonomy":"kbtag","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kbtag?post=23209"},{"taxonomy":"mkb_version","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/mkb_version?post=23209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}
\u2013 passthru
\u2013 shell_exec
\u2013 system
\u2013 proc_open
\u2013 popen
\u2013 curl_exec
\u2013 curl_multi_exec
\u2013 parse_ini_file
\u2013 show_source<\/p>Why are PHP Functions dangerous?<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
strlen<\/code> and like are probably safe, but any function that talks to the outside world can bring surprises if the rest of the code is not safe. You can check the list of dangerous PHP functions here: http:\/\/php.net\/manual<\/a>\u00a0.<\/p>disable_functions<\/code> to prohibit some actions that you consider dangerous. However, only certain classes of actions can be inhibited this way. For example, you can disable and this probably will prevent running external programs from your code. Nonetheless, most of the things done by these programs can be done by PHP means too.<\/li>security=On<\/code>\u00a0in\u00a0php.ini<\/code>.\u00a0 Therefore, you can read the security chapter<\/a> in the PHP manual and some PHP security books<\/a>.<\/li><\/ul>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t