{"id":521,"date":"2021-07-23T12:32:01","date_gmt":"2021-07-23T12:32:01","guid":{"rendered":"https:\/\/ssdsunucum.com\/blog\/select-a-php-binary\/"},"modified":"2021-07-23T12:32:01","modified_gmt":"2021-07-23T12:32:01","slug":"select-a-php-binary","status":"publish","type":"post","link":"https:\/\/ssdsunucum.com\/blog\/select-a-php-binary\/","title":{"rendered":"Select a PHP Binary"},"content":{"rendered":"<\/p>\n<div class=\"col-md-9\">\n<div class=\"flex-column flex-md-row article-header\"><\/div>\n<hr>\n<h2 id=\"overview\">Overview<\/h2>\n<p>The cPanel Server Daemon (<code>cpsrvd<\/code>) <strong>must<\/strong> know the path to the specific PHP binary that you wish to use to process PHP scripts (for example, <code>phpMyAdmin<\/code>). There are several PHP binaries from which you may choose.<\/p>\n<h2 id=\"the-cpanel-provided-php-binary\">The cPanel-provided PHP binary<\/h2>\n<p>The <code>\/var\/cpanel\/usecpphp<\/code> file, when it exists, causes the <code>cpsrvd<\/code> daemon to use a non-system PHP that cPanel, L.L.C. provides. You may wish to use this functionality if Apache\u2019s version of PHP does not include all of the features to run inside of the <code>cpsrvd<\/code> daemon. This PHP binary contains all of the necessary options to run inside of the <code>cpsrvd<\/code> daemon.<\/p>\n<p>The cPanel-provided PHP binary exists on the system as one of the following files:<\/p>\n<ul>\n<li><code>\/usr\/local\/cpanel\/3rdparty\/bin\/php<\/code><\/li>\n<li><code>\/usr\/local\/cpanel\/3rdparty\/bin\/php-cgi<\/code><\/li>\n<\/ul>\n<div class=\"callout callout-warning\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n        The system prefers the <code>php-cgi<\/code> file over the php file if both are available and executable.\n    <\/div>\n<\/div>\n<h2 id=\"php-binary-use\">PHP binary use<\/h2>\n<p>If <code>\/var\/cpanel\/usecpphp<\/code> does <strong>not<\/strong> exist, WHM uses the PHP binary (<code>\/usr\/local\/cpanel\/3rdparty\/bin\/php-cgi<\/code>). You can modify the behavior in the <code>\/var\/cpanel\/3rdparty\/bin\/php<\/code> file. If the binary exists, is executable, and the <code>\/var\/cpanel\/usecpphp<\/code> file exists, then the <code>cpsrvd<\/code> daemon will always use this binary.<\/p>\n<p>Use the following flowchart to determine which PHP binary the <code>cpsrvd<\/code> daemon uses:<\/p>\n<figure>\n    <img src=\"https:\/\/ssdsunucum.com\/blog\/wp-content\/uploads\/2021\/07\/php-logic-flow.png\" title=\"php-logic-flow\"><br \/>\n<\/figure>\n<p><em>cPanel &#038; WHM PHP binary flowchart<\/em><\/p>\n<div class=\"callout callout-success\">\n<div class=\"callout-heading\">Remember:<\/div>\n<div class=\"callout-content\">\n<ul>\n<li>The system prefers the <code>php-cgi<\/code> file over the <code>php<\/code> file if both are available and executable.<\/li>\n<li>The system only uses the <code>\/usr\/bin\/php<\/code> file if the <code>usecpphp<\/code> file does not exist and the request is for a third-party product.<\/li>\n<\/ul><\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Overview The cPanel Server Daemon (cpsrvd) must know the path to the specific PHP binary that you wish to use to process PHP scripts (for example, phpMyAdmin). There are several PHP binaries from which you may choose. The cPanel-provided PHP binary The \/var\/cpanel\/usecpphp file, when it exists, causes the cpsrvd daemon to use a non-system &hellip;<\/p>\n","protected":false},"author":1,"featured_media":522,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/521"}],"collection":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/comments?post=521"}],"version-history":[{"count":0,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/521\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media\/522"}],"wp:attachment":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media?parent=521"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/categories?post=521"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/tags?post=521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}