{"id":1041,"date":"2024-12-05T06:54:51","date_gmt":"2024-12-05T06:54:51","guid":{"rendered":"https:\/\/blog.trustedhosting.in\/?p=1041"},"modified":"2024-12-05T06:54:51","modified_gmt":"2024-12-05T06:54:51","slug":"how-to-installing-php","status":"publish","type":"post","link":"https:\/\/www.webystrata.com\/blog\/how-to-installing-php\/","title":{"rendered":"How to Installing PHP"},"content":{"rendered":"<h1><a href=\"https:\/\/www.trustedhosting.in\/cpanel-hosting.html\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1042 size-full\" title=\"How to Installing PHP\" src=\"https:\/\/blog.trustedhosting.in\/wp-content\/uploads\/2024\/12\/1013994_OJ8XXC0.jpg\" alt=\"How to Installing PHP\" width=\"1300\" height=\"1300\" srcset=\"https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2024\/12\/1013994_OJ8XXC0.jpg 1300w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2024\/12\/1013994_OJ8XXC0-300x300.jpg 300w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2024\/12\/1013994_OJ8XXC0-1024x1024.jpg 1024w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2024\/12\/1013994_OJ8XXC0-150x150.jpg 150w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2024\/12\/1013994_OJ8XXC0-768x768.jpg 768w\" sizes=\"auto, (max-width: 1300px) 100vw, 1300px\" \/><\/a><\/h1>\n<h1>How to Installing PHP<\/h1>\n<section id=\"installation\">\n<h2>Installation<\/h2>\n<p>If you want to display much beyond static HTML, it\u2019s likely that you\u2019ll be looking to use PHP on your <a href=\"https:\/\/www.trustedhosting.in\/cpanel-hosting.html\" target=\"_blank\" rel=\"noopener\">server<\/a>.<\/p>\n<p>Installing is pretty simple from the standard CentOS repositories, and can be achieved like so:<\/p>\n<div class=\"highlight-console notranslate\">\n<div class=\"highlight\">\n<pre><span class=\"go\">yum install php php-common php-devel php-pear php-mysql<\/span>\r\n<\/pre>\n<\/div>\n<\/div>\n<p>This will install PHP along with the relevant configuration to tie it into Apache (provided Apache was installed from the standard repositories).<\/p>\n<div class=\"admonition note\">\n<p>As CentOS\/RHEL are long term release style operating systems, you won\u2019t get bleeding edge or even recent releases of PHP from the standard repositories.<\/p>\n<p>They will however, have backported security fixes from higher versions to keep it secure.\u00a0<span class=\"doc\">Vulnerability Scans<\/span><\/p>\n<\/div>\n<\/section>\n<section id=\"configuration\">\n<h2>Configuration<\/h2>\n<p>Out of the box, PHP doesn\u2019t really need much configuration, so unless you have any particular values in mind that you\u2019d like to change there probably isn\u2019t much to see here.<\/p>\n<p>It can\u2019t hurt to familiarise yourself with the location of config files however, so you can find the main PHP configuration file here:<\/p>\n<div class=\"highlight-console notranslate\">\n<div class=\"highlight\">\n<pre><span class=\"go\">\/etc\/php.ini<\/span>\r\n<\/pre>\n<\/div>\n<\/div>\n<p>Configuration for individual modules may be found in the following directory, depending on how the module is configured:<\/p>\n<div class=\"highlight-console notranslate\">\n<div class=\"highlight\">\n<pre><span class=\"go\">\/etc\/php.d\/<\/span>\r\n<\/pre>\n<\/div>\n<\/div>\n<\/section>\n<section id=\"starting-it-up\">\n<h2>Starting it up<\/h2>\n<p>PHP isn\u2019t a service on Linux, so there\u2019s no\u00a0<code class=\"docutils literal notranslate\"><span class=\"pre\">init<\/span><\/code>\u00a0script you need to run.<\/p>\n<p>If you\u2019ve only just installed it though, you probably want to restart Apache so that it can load in the new PHP runtime:<\/p>\n<div class=\"highlight-console notranslate\">\n<div class=\"highlight\">\n<pre><span class=\"go\">service httpd restart<\/span>\r\n<\/pre>\n<\/div>\n<\/div>\n<\/section>\n<section id=\"further-modules\">\n<h2>Further modules<\/h2>\n<p>It\u2019s likely that you\u2019ll need more modules than the basic ones described above, especially if you\u2019re going to run a site that depends on a database.<\/p>\n<p>To install other modules, such as\u00a0<code class=\"docutils literal notranslate\"><span class=\"pre\">php-mysql<\/span><\/code>\u00a0or\u00a0<code class=\"docutils literal notranslate\"><span class=\"pre\">php-mcrypt<\/span><\/code>\u00a0the following guide should help:<\/p>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>How to Installing PHP Installation If you want to display much beyond static HTML, it\u2019s likely that you\u2019ll be looking&hellip;<\/p>\n","protected":false},"author":1,"featured_media":1042,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1041","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-latest-updates"],"_links":{"self":[{"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/posts\/1041","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/comments?post=1041"}],"version-history":[{"count":1,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/posts\/1041\/revisions"}],"predecessor-version":[{"id":1043,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/posts\/1041\/revisions\/1043"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/media\/1042"}],"wp:attachment":[{"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/media?parent=1041"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/categories?post=1041"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/tags?post=1041"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}