{"id":5532,"date":"2016-11-02T09:33:13","date_gmt":"2016-11-02T09:33:13","guid":{"rendered":"https:\/\/cpanelplesk.com\/wp62\/?p=5532"},"modified":"2021-02-02T05:38:02","modified_gmt":"2021-02-02T05:38:02","slug":"php-modules-not-loading-properly-cloudlinux","status":"publish","type":"post","link":"https:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/","title":{"rendered":"PHP modules not loading properly on CloudLinux"},"content":{"rendered":"<p><span style=\"color: #000000;\">We were facing this problem on one of our server, Those websites using server\u2019s native PHP version were not loading properly. The modules in CloudLinux\u2019s PHP versions are not loading correctly. They are not selected by default. Our server has latest cPanel installed with EasyApache 4 .<\/span><!--more--><\/p>\n<p><span style=\"color: #000000;\">All websites using this PHP version was giving the following error on web browsers after enabling mod_lsapi (lsphp).<\/span><\/p>\n<div class=\"space1\"><\/div>\n<div class=\"error-sh\">\n<pre>Unhandled Exception\r\nMessage:\r\nModule 'gmp' already loaded\r\nLocation:\r\nUnknown on line 0<\/pre>\n<\/div>\n<div class=\"space1\"><\/div>\n<p><span style=\"color: #000000;\">When, I try to switch the PHP version from server\u2019s native PHP to CloudLinux\u2019s PHP 5.4 version, that did the trick. But, this time, I got some other errors (Modules missing alert) on web browser. I was able to fix those errors by enabling those modules from PHP selector.<\/span><\/p>\n<p><span style=\"color: #000000;\">Now question is this Why it\u2019s not taking the added modules by default?<\/span><\/p>\n<p><span style=\"color: #000000;\">This issue can be fixed by using cagefsctl command. Follow the steps below:<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>Step 1<\/strong> : Loged into WHM as root and change the PHP version from server\u2019s native 5.4 to CloudLinux 5.4<\/span><\/p>\n<p><span style=\"color: #000000;\">You can change this from \u201cCloudLinux LVE Manager.\u201d<\/span><\/p>\n<p><a href=\"https:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/php-version\/\" rel=\"attachment wp-att-5534\"><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-5534 pleslwp\" src=\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2016\/11\/PHP-version.jpg\" alt=\"php-version\" width=\"1096\" height=\"434\" srcset=\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2016\/11\/PHP-version.jpg 1096w, https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2016\/11\/PHP-version-300x119.jpg 300w, https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2016\/11\/PHP-version-1024x405.jpg 1024w, https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2016\/11\/PHP-version-768x304.jpg 768w\" sizes=\"(max-width: 1096px) 100vw, 1096px\" \/><\/a><\/p>\n<p><span style=\"color: #000000;\"><strong>Step 2<\/strong> : Now you have to execute the following command to enable added modules (by default modules):<\/span><\/p>\n<div class=\"space1\"><\/div>\n<div class=\"command-sh\">\n<pre># cagefsctl --cl-selector-reset-modules<\/pre>\n<\/div>\n<div class=\"space1\"><\/div>\n<p>This command will reset modules for all users to its default.<br \/>\nTo change this for a specific user, please execute the above command with corresponding username:<\/p>\n<div class=\"space1\"><\/div>\n<div class=\"command-sh\">\n<pre># cagefsctl --cl-selector-reset-modules $user1 $user2<\/pre>\n<\/div>\n<div class=\"space1\"><\/div>\n<p><span style=\"color: #000000;\"><strong>Step 3<\/strong> : Now, to switched all account\u2019s PHP versions from native PHP to ClodLinux\u2019s PHP 5.4.<\/span><\/p>\n<p><span style=\"color: #000000;\">You can use the \u201cselectorctl\u201d command to change the PHP version of an account via command line. First, we need to know which accounts are using server\u2019s native default PHP. Execute the following command:<\/span><\/p>\n<div class=\"space1\"><\/div>\n<div class=\"command-sh\">\n<pre># selectorctl --list-users --version=native<\/pre>\n<\/div>\n<div class=\"space1\"><\/div>\n<p><span style=\"color: #000000;\">Now to change the PHP version of users which are using native version. Use the following command:<\/span><\/p>\n<div class=\"space1\"><\/div>\n<div class=\"command-sh\">\n<pre># selectorctl --change-to-version=5.4 --version=native<\/pre>\n<\/div>\n<div class=\"space1\"><\/div>\n<p><span style=\"color: #000000;\">Or use the following :<\/span><\/p>\n<div class=\"space1\"><\/div>\n<div class=\"command-sh\">\n<pre>for user in `selectorctl --list-users --version=native | \r\nsed 's\/,\/ \/g'`; do echo -n \"Changing PHP version of $user to 5.4: ..... \r\n\" &amp;&amp; selectorctl --set-user-current=5.4 --user=$user &amp;&amp; echo \"Okay.\"; \r\ndone<\/pre>\n<\/div>\n<div class=\"space1\"><\/div>\n<p><span style=\"color: #000000;\">That\u2019s all \u00a0you have to do, Now if you check the modules via cPanel, Everything should be alright!!. \u00a0You also like to know\u00a0<\/span><a href=\"https:\/\/cpanelplesk.com\/wp62\/setup-working-apache-server-ubuntu-16-04\/\">How To Setup A Working Apache Server On Ubuntu 16.04<\/a>,\u00a0<span style=\"color: #000000;\">Please check my previous article on this and also give your opinion below if you experience any issues or to discuss your ideas and experiences.<\/span><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We were facing this problem on one of our server, Those websites using server\u2019s native PHP version were not loading properly. The modules in CloudLinux\u2019s PHP versions are not loading correctly. They are not selected by default. Our server has latest cPanel installed with EasyApache 4 . [&#8230;]<\/p>\n<p><a class=\"understrap-read-more-link\" href=\"https:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/\">Continue Reading&#8230;<\/a><\/p>\n","protected":false},"author":2,"featured_media":2350,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,14],"tags":[],"class_list":["post-5532","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cpanel","category-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PHP modules not loading properly on CloudLinux - cPanel Plesk<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"PHP modules not loading properly on CloudLinux - cPanel Plesk\" \/>\n<meta name=\"twitter:description\" content=\"We were facing this problem on one of our server, Those websites using server\u2019s native PHP version were not loading properly. The modules in CloudLinux\u2019s PHP versions are not loading correctly. They are not selected by default. Our server has latest cPanel installed with EasyApache 4 . [...]Continue Reading...\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/06\/cloudlinux.png\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Seemab Saleem\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/\"},\"author\":{\"name\":\"Seemab Saleem\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/73d573cc7eaaf6625cf0dbd72191a648\"},\"headline\":\"PHP modules not loading properly on CloudLinux\",\"datePublished\":\"2016-11-02T09:33:13+00:00\",\"dateModified\":\"2021-02-02T05:38:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/\"},\"wordCount\":348,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13\"},\"image\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/06\/cloudlinux.png\",\"articleSection\":[\"Cpanel\",\"Linux\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/\",\"name\":\"PHP modules not loading properly on CloudLinux - cPanel Plesk\",\"isPartOf\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/06\/cloudlinux.png\",\"datePublished\":\"2016-11-02T09:33:13+00:00\",\"dateModified\":\"2021-02-02T05:38:02+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/#primaryimage\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/06\/cloudlinux.png\",\"contentUrl\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/06\/cloudlinux.png\",\"width\":200,\"height\":200},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cpanelplesk.com\/wp62\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PHP modules not loading properly on CloudLinux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#website\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/\",\"name\":\"cPanel Plesk\",\"description\":\"Blog on famous hosting control panels\",\"publisher\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cpanelplesk.com\/wp62\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13\",\"name\":\"Farooq Omer\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png\",\"contentUrl\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png\",\"width\":300,\"height\":44,\"caption\":\"Farooq Omer\"},\"logo\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/73d573cc7eaaf6625cf0dbd72191a648\",\"name\":\"Seemab Saleem\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6a87ff2e53b03e6839250e5278a6bd46?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6a87ff2e53b03e6839250e5278a6bd46?s=96&d=mm&r=g\",\"caption\":\"Seemab Saleem\"},\"description\":\"Linux Server Administrator, Web Hosting engineer. I'm dealing with Linux servers since 2014. I started this blog to share the work i love with the world . let me know if you need any assistance. Thanks!!\",\"sameAs\":[\"https:\/\/cpanelplesk.com\/wp62\"],\"url\":\"https:\/\/cpanelplesk.com\/wp62\/author\/cmb\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PHP modules not loading properly on CloudLinux - cPanel Plesk","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:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/","twitter_card":"summary_large_image","twitter_title":"PHP modules not loading properly on CloudLinux - cPanel Plesk","twitter_description":"We were facing this problem on one of our server, Those websites using server\u2019s native PHP version were not loading properly. The modules in CloudLinux\u2019s PHP versions are not loading correctly. They are not selected by default. Our server has latest cPanel installed with EasyApache 4 . [...]Continue Reading...","twitter_image":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/06\/cloudlinux.png","twitter_misc":{"Written by":"Seemab Saleem","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/#article","isPartOf":{"@id":"https:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/"},"author":{"name":"Seemab Saleem","@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/73d573cc7eaaf6625cf0dbd72191a648"},"headline":"PHP modules not loading properly on CloudLinux","datePublished":"2016-11-02T09:33:13+00:00","dateModified":"2021-02-02T05:38:02+00:00","mainEntityOfPage":{"@id":"https:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/"},"wordCount":348,"commentCount":0,"publisher":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13"},"image":{"@id":"https:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/#primaryimage"},"thumbnailUrl":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/06\/cloudlinux.png","articleSection":["Cpanel","Linux"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/","url":"https:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/","name":"PHP modules not loading properly on CloudLinux - cPanel Plesk","isPartOf":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/#primaryimage"},"image":{"@id":"https:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/#primaryimage"},"thumbnailUrl":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/06\/cloudlinux.png","datePublished":"2016-11-02T09:33:13+00:00","dateModified":"2021-02-02T05:38:02+00:00","breadcrumb":{"@id":"https:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/#primaryimage","url":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/06\/cloudlinux.png","contentUrl":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2015\/06\/cloudlinux.png","width":200,"height":200},{"@type":"BreadcrumbList","@id":"https:\/\/cpanelplesk.com\/wp62\/php-modules-not-loading-properly-cloudlinux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cpanelplesk.com\/wp62\/"},{"@type":"ListItem","position":2,"name":"PHP modules not loading properly on CloudLinux"}]},{"@type":"WebSite","@id":"https:\/\/cpanelplesk.com\/wp62\/#website","url":"https:\/\/cpanelplesk.com\/wp62\/","name":"cPanel Plesk","description":"Blog on famous hosting control panels","publisher":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cpanelplesk.com\/wp62\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13","name":"Farooq Omer","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/","url":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png","contentUrl":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png","width":300,"height":44,"caption":"Farooq Omer"},"logo":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/"}},{"@type":"Person","@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/73d573cc7eaaf6625cf0dbd72191a648","name":"Seemab Saleem","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6a87ff2e53b03e6839250e5278a6bd46?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6a87ff2e53b03e6839250e5278a6bd46?s=96&d=mm&r=g","caption":"Seemab Saleem"},"description":"Linux Server Administrator, Web Hosting engineer. I'm dealing with Linux servers since 2014. I started this blog to share the work i love with the world . let me know if you need any assistance. Thanks!!","sameAs":["https:\/\/cpanelplesk.com\/wp62"],"url":"https:\/\/cpanelplesk.com\/wp62\/author\/cmb\/"}]}},"_links":{"self":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/posts\/5532","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/comments?post=5532"}],"version-history":[{"count":0,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/posts\/5532\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/media\/2350"}],"wp:attachment":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/media?parent=5532"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/categories?post=5532"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/tags?post=5532"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}