{"id":30210,"date":"2021-01-18T03:36:38","date_gmt":"2021-01-17T19:36:38","guid":{"rendered":"https:\/\/web.mwwsb.com.my\/pjci\/?post_type=kb&p=30210"},"modified":"2022-09-07T19:48:24","modified_gmt":"2022-09-07T11:48:24","slug":"how-to-test-apache-and-php-configuration","status":"publish","type":"kb","link":"https:\/\/www.casbay.com\/guide\/kb\/how-to-test-apache-and-php-configuration","title":{"rendered":"HOW TO: Test Apache and PHP configuration"},"content":{"rendered":"\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t

HOW TO: Test Apache and PHP configuration<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"\"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

Q. Test Apache and PHP configuration: How can I be sure that my PHP server is working? and How to know the version and modules enabled?\u00a0<\/strong><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t\t\t\t\t

A. You can create a simple PHP script and load it from your browser in order to know the version of PHP and the modules you are running.<\/p>

To do that follow this step.<\/p>

vim phpinfo.php<\/em><\/strong><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t\t\t\t\t

And paste inside that file these contents:<\/p>

<?<\/em><\/strong><\/p>

php phpinfo();<\/em><\/strong><\/p>

?><\/em><\/strong><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t\t\t\t\t

Then, go to http:\/\/your-server\/path\/phpinfo.php<\/strong><\/em><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t

Extra Knowledge on php.ini<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

Whether you\u2019re a PHP<\/a> beginner or a seasoned developer, I\u2019m sure that you\u2019ve heard of\u00a0php.ini<\/strong>: the most important PHP configuration file.\u00a0<\/p>

When PHP is run, it looks for the\u00a0php.ini<\/strong>\u00a0file in some specific locations and loads it. This file allows you to configure a few important settings that you should be aware of. Quite often, you\u2019ll find you need to tweak settings in the\u00a0php.ini<\/strong>\u00a0file.<\/p>

On the other hand, it\u2019s certainly possible that you’ve never needed to modify\u00a0php.ini<\/strong>. PHP can run happily with the settings provided in the default\u00a0php.ini<\/strong>\u00a0file, since PHP ships with these default recommended settings. In fact, there are no critical configuration parameters that you must set in order to run PHP.\u00a0<\/p>

However, the\u00a0php.ini<\/strong>\u00a0file provides a couple of important settings that you want to make yourself familiar with. In fact, as a PHP developer, it\u2019s inevitable, and you\u2019ll encounter it sooner rather than later.<\/p>

Check out the next article on Install Imagemagick PHP extension<\/a>.<\/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":"

HOW TO: Test Apache and PHP configuration Q. Test Apache and PHP configuration: How can I be sure that my PHP server is working? and How to know the version and modules enabled?\u00a0 A. You can create a simple PHP script and load it from your browser in order to know the version of PHP […]<\/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":[109],"kbtag":[106,105],"mkb_version":[],"_links":{"self":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/30210"}],"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=30210"}],"version-history":[{"count":18,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/30210\/revisions"}],"predecessor-version":[{"id":38107,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kb\/30210\/revisions\/38107"}],"wp:attachment":[{"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/media?parent=30210"}],"wp:term":[{"taxonomy":"kbtopic","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kbtopic?post=30210"},{"taxonomy":"kbtag","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/kbtag?post=30210"},{"taxonomy":"mkb_version","embeddable":true,"href":"https:\/\/www.casbay.com\/guide\/wp-json\/wp\/v2\/mkb_version?post=30210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}