{"id":1009,"date":"2017-03-27T15:19:18","date_gmt":"2017-03-27T14:19:18","guid":{"rendered":"http:\/\/www.haxed.me.uk\/?p=1009"},"modified":"2017-03-27T15:19:18","modified_gmt":"2017-03-27T14:19:18","slug":"setting-seperate-memory-limit-phpmyadmin-rest-sites","status":"publish","type":"post","link":"https:\/\/haxed.me.uk\/index.php\/2017\/03\/27\/setting-seperate-memory-limit-phpmyadmin-rest-sites\/","title":{"rendered":"Setting a seperate memory limit for PhpMyAdmin to the rest of the sites"},"content":{"rendered":"<p>A common issue I see Rackspace customers with is there PhpMyAdmin not having enough memory, often I &#8216;ll see countless tickets where the memory_limit is increased for phpmyadmin, and when one of their virtualhosts falls over, it is then decreased for all of the sites, until someone wants to use phpmyadmin again. <\/p>\n<p>not very good really is it? Actually, fixing this is quite easy. Lets provide a php.ini for phpmyadmin that only phpmyadmin uses;<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\r\n# Copy original php configuration\r\ncp \/etc\/php.ini \/usr\/share\/phpMyAdmin\/php.ini\r\n\r\n# Modify \/usr\/share\/phpMyAdmin\/php.ini so that the following variable is set as a higher value\r\nmemory_limit = 256M\r\n\r\n<\/pre>\n<p>Naturally if you now goto the customerwebsite.com\/phpmyadmin\/php.ini you&#8217;ll see a nice php file waiting for you&#8230; not good&#8230; we need to protect the php.ini file as it can expose stuff we don&#8217;t want to be seen; lets make it as hard to find out the server configuration and hide php.ini altogether.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n# File to edit may differ but it can be any file inside conf.d make one if you like call it phpini.conf or something\r\nvi \/etc\/httpd\/conf.d\/php.conf\r\n<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n&lt;Files php.ini&gt;\r\n          Order allow,deny\r\n          Deny from all\r\n&lt;\/Files&gt;\r\n<\/pre>\n<p>Dont&#8217;t forget the most important step<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n# Check apache syntax\r\napachectl -t\r\n\r\n# Restart the apache process\r\napachectl graceful\r\n<\/pre>\n<p>Another pretty simples thing to do. That isn&#8217;t pretty simple until you do it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A common issue I see Rackspace customers with is there PhpMyAdmin not having enough memory, often I &#8216;ll see countless tickets where the memory_limit is increased for phpmyadmin, and when one of their virtualhosts falls over, it is then decreased &hellip; <a href=\"https:\/\/haxed.me.uk\/index.php\/2017\/03\/27\/setting-seperate-memory-limit-phpmyadmin-rest-sites\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33,18,96,61],"tags":[],"class_list":["post-1009","post","type-post","status-publish","format-standard","hentry","category-apache","category-php","category-phpmyadmin","category-rackspace"],"_links":{"self":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/1009","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/comments?post=1009"}],"version-history":[{"count":1,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/1009\/revisions"}],"predecessor-version":[{"id":1010,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/1009\/revisions\/1010"}],"wp:attachment":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/media?parent=1009"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/categories?post=1009"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/tags?post=1009"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}