{"id":349,"date":"2016-01-30T16:41:35","date_gmt":"2016-01-30T16:41:35","guid":{"rendered":"http:\/\/peintinger.com\/?p=349"},"modified":"2016-01-30T16:41:35","modified_gmt":"2016-01-30T16:41:35","slug":"running-custom-php-modules-in-plesk-on-an-ubuntu-server-memcached","status":"publish","type":"post","link":"https:\/\/peintinger.com\/?p=349","title":{"rendered":"Running Custom PHP Modules in Plesk on an Ubuntu Server: MemCached"},"content":{"rendered":"<div>This article is inspired by\u00a0<a href=\"https:\/\/devblog.plesk.com\/2015\/08\/adding-custom-php-modules-in-plesk\/\">https:\/\/devblog.plesk.com\/2015\/08\/adding-custom-php-modules-in-plesk\/<\/a>. It was written for CentOs\/Fedora\/RedHat servers having yum instead of apt.\u00a0I run Ubuntu 12.04 LTS on a virtual server. Among other applications I host WordPress and OwnCloud here.\u00a0Plesk allows to use newer PHP versions (5.6.x and 7.0.x) instead of the dated one (5.4.x) that comes with my old Ubuntu.<\/div>\n<div><\/div>\n<div>\n<figure id=\"attachment_350\" aria-describedby=\"caption-attachment-350\" style=\"width: 660px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/peintinger.com\/wp-content\/uploads\/2016\/01\/2016-01-30-08_52_48-Settings-for-5.6.17-FastCGI-application-Peintinger-Vimperator.png\" rel=\"attachment wp-att-350\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"350\" data-permalink=\"https:\/\/peintinger.com\/?attachment_id=350\" data-orig-file=\"https:\/\/i0.wp.com\/peintinger.com\/wp-content\/uploads\/2016\/01\/2016-01-30-08_52_48-Settings-for-5.6.17-FastCGI-application-Peintinger-Vimperator.png?fit=1173%2C467&amp;ssl=1\" data-orig-size=\"1173,467\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"2016-01-30 08_52_48-Settings for 5.6.17 FastCGI application &amp;#8211; Peintinger &amp;#8211; Vimperator\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/peintinger.com\/wp-content\/uploads\/2016\/01\/2016-01-30-08_52_48-Settings-for-5.6.17-FastCGI-application-Peintinger-Vimperator.png?fit=525%2C209&amp;ssl=1\" class=\"wp-image-350 size-large\" src=\"https:\/\/i0.wp.com\/peintinger.com\/wp-content\/uploads\/2016\/01\/2016-01-30-08_52_48-Settings-for-5.6.17-FastCGI-application-Peintinger-Vimperator-1024x408.png?resize=525%2C209\" alt=\"No MemCached module available\" width=\"525\" height=\"209\" srcset=\"https:\/\/i0.wp.com\/peintinger.com\/wp-content\/uploads\/2016\/01\/2016-01-30-08_52_48-Settings-for-5.6.17-FastCGI-application-Peintinger-Vimperator.png?resize=1024%2C408&amp;ssl=1 1024w, https:\/\/i0.wp.com\/peintinger.com\/wp-content\/uploads\/2016\/01\/2016-01-30-08_52_48-Settings-for-5.6.17-FastCGI-application-Peintinger-Vimperator.png?resize=300%2C119&amp;ssl=1 300w, https:\/\/i0.wp.com\/peintinger.com\/wp-content\/uploads\/2016\/01\/2016-01-30-08_52_48-Settings-for-5.6.17-FastCGI-application-Peintinger-Vimperator.png?resize=768%2C306&amp;ssl=1 768w, https:\/\/i0.wp.com\/peintinger.com\/wp-content\/uploads\/2016\/01\/2016-01-30-08_52_48-Settings-for-5.6.17-FastCGI-application-Peintinger-Vimperator.png?resize=600%2C239&amp;ssl=1 600w, https:\/\/i0.wp.com\/peintinger.com\/wp-content\/uploads\/2016\/01\/2016-01-30-08_52_48-Settings-for-5.6.17-FastCGI-application-Peintinger-Vimperator.png?w=1173&amp;ssl=1 1173w\" sizes=\"auto, (max-width: 525px) 100vw, 525px\" \/><\/a><figcaption id=\"caption-attachment-350\" class=\"wp-caption-text\">No MemCached module available<\/figcaption><\/figure>\n<\/div>\n<div><\/div>\n<div>Here are the necessary steps:<\/div>\n<div><\/div>\n<ol>\n<li>Install required packages to compile modules for PHP\n<pre>$ apt-get install gcc\u00a0build-essential plesk-php56-dev plesk-php70-dev libmemcached-dev libmemcache0\u00a0zlib1g-dev<\/pre>\n<p>Be aware that there may be some other packages that you need to install that I did not list here since they probably were already installed on my server. If you run into missing headers this might be an indicator for that.<\/li>\n<\/ol>\n<ol start=\"2\">\n<li>Install the memcached module:\n<pre>$ \/opt\/plesk\/php\/5.6\/bin\/pecl install memcached<\/pre>\n<\/li>\n<li>\u00a0You will be asked for the &#8220;libmemcached directory [no] :&#8221;<br \/>\nThe default is &#8220;no&#8221;. If you have no need for sasl answer:<\/p>\n<pre>no --disable-memcached-sasl<\/pre>\n<p>If you need memcached with sasl2 support you can install it manually following this <a href=\"http:\/\/blog.memcachier.com\/2014\/11\/05\/ubuntu-libmemcached-and-sasl-support\/\" target=\"_blank\">advice<\/a>.<\/li>\n<li>After the installation is finished you need to register the module with Plesk:\n<pre>$ echo \"extension=memcached.so\" &gt; \/opt\/plesk\/php\/5.6\/etc\/php.d\/memcached.ini\r\n$ plesk bin php_handler --reread<\/pre>\n<\/li>\n<\/ol>\n<div><\/div>\n<div>\n<figure id=\"attachment_351\" aria-describedby=\"caption-attachment-351\" style=\"width: 660px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/peintinger.com\/wp-content\/uploads\/2016\/01\/2016-01-30-09_20_54-Best-Zend-OpCache-Settings_Tuning_Config-Vimperator.png\" rel=\"attachment wp-att-351\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"351\" data-permalink=\"https:\/\/peintinger.com\/?attachment_id=351\" data-orig-file=\"https:\/\/i0.wp.com\/peintinger.com\/wp-content\/uploads\/2016\/01\/2016-01-30-09_20_54-Best-Zend-OpCache-Settings_Tuning_Config-Vimperator.png?fit=1173%2C467&amp;ssl=1\" data-orig-size=\"1173,467\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"2016-01-30 09_20_54-Best Zend OpCache Settings_Tuning_Config &amp;#8211; Vimperator\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/peintinger.com\/wp-content\/uploads\/2016\/01\/2016-01-30-09_20_54-Best-Zend-OpCache-Settings_Tuning_Config-Vimperator.png?fit=525%2C209&amp;ssl=1\" class=\"wp-image-351 size-large\" src=\"https:\/\/i0.wp.com\/peintinger.com\/wp-content\/uploads\/2016\/01\/2016-01-30-09_20_54-Best-Zend-OpCache-Settings_Tuning_Config-Vimperator-1024x408.png?resize=525%2C209\" alt=\"MemCached module available\" width=\"525\" height=\"209\" srcset=\"https:\/\/i0.wp.com\/peintinger.com\/wp-content\/uploads\/2016\/01\/2016-01-30-09_20_54-Best-Zend-OpCache-Settings_Tuning_Config-Vimperator.png?resize=1024%2C408&amp;ssl=1 1024w, https:\/\/i0.wp.com\/peintinger.com\/wp-content\/uploads\/2016\/01\/2016-01-30-09_20_54-Best-Zend-OpCache-Settings_Tuning_Config-Vimperator.png?resize=300%2C119&amp;ssl=1 300w, https:\/\/i0.wp.com\/peintinger.com\/wp-content\/uploads\/2016\/01\/2016-01-30-09_20_54-Best-Zend-OpCache-Settings_Tuning_Config-Vimperator.png?resize=768%2C306&amp;ssl=1 768w, https:\/\/i0.wp.com\/peintinger.com\/wp-content\/uploads\/2016\/01\/2016-01-30-09_20_54-Best-Zend-OpCache-Settings_Tuning_Config-Vimperator.png?resize=600%2C239&amp;ssl=1 600w, https:\/\/i0.wp.com\/peintinger.com\/wp-content\/uploads\/2016\/01\/2016-01-30-09_20_54-Best-Zend-OpCache-Settings_Tuning_Config-Vimperator.png?w=1173&amp;ssl=1 1173w\" sizes=\"auto, (max-width: 525px) 100vw, 525px\" \/><\/a><figcaption id=\"caption-attachment-351\" class=\"wp-caption-text\">MemCached module available<\/figcaption><\/figure>\n<\/div>\n<div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>This article is inspired by\u00a0https:\/\/devblog.plesk.com\/2015\/08\/adding-custom-php-modules-in-plesk\/. It was written for CentOs\/Fedora\/RedHat servers having yum instead of apt.\u00a0I run Ubuntu 12.04 LTS on a virtual server. Among other applications I host WordPress and OwnCloud here.\u00a0Plesk allows to use newer PHP versions (5.6.x and 7.0.x) instead of the dated one (5.4.x) that comes with my old Ubuntu. Here &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/peintinger.com\/?p=349\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Running Custom PHP Modules in Plesk on an Ubuntu Server: MemCached&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[29,25],"tags":[32,30,31],"class_list":["post-349","post","type-post","status-publish","format-standard","hentry","category-webhosting","category-whatilearnedtoday","tag-memcached","tag-php","tag-plesk"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6W04n-5D","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/peintinger.com\/index.php?rest_route=\/wp\/v2\/posts\/349","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/peintinger.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/peintinger.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/peintinger.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/peintinger.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=349"}],"version-history":[{"count":3,"href":"https:\/\/peintinger.com\/index.php?rest_route=\/wp\/v2\/posts\/349\/revisions"}],"predecessor-version":[{"id":354,"href":"https:\/\/peintinger.com\/index.php?rest_route=\/wp\/v2\/posts\/349\/revisions\/354"}],"wp:attachment":[{"href":"https:\/\/peintinger.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=349"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/peintinger.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=349"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/peintinger.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=349"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}