{"id":154,"date":"2010-12-06T09:38:40","date_gmt":"2010-12-06T09:38:40","guid":{"rendered":"http:\/\/www.osd.net\/blog\/?p=154"},"modified":"2010-12-09T13:00:07","modified_gmt":"2010-12-09T13:00:07","slug":"suphp-vs-mod_php-pros-and-cons","status":"publish","type":"post","link":"https:\/\/www.osd.net\/blog\/web-development\/php\/suphp-vs-mod_php-pros-and-cons\/","title":{"rendered":"suPHP vs mod_php &#8211; pros and cons"},"content":{"rendered":"<p>Somebody asked me in the past what are the differences between suPHP and mod_php and which one is the best so I will try to list the pros and cons between those two:<\/p>\n<p>Performance related mod_php and by far the winner since it is about 30% faster than suPHP.<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>How do they work:<\/strong><\/span><\/p>\n<p>suPHP<\/p>\n<ul>\n<li>&#8211; for each request the web server opens a new thread on behalf of that user<\/li>\n<\/ul>\n<p>mod_php<\/p>\n<ul>\n<li>&#8211; every request is processed on web server behalf<\/li>\n<\/ul>\n<p><span style=\"text-decoration: underline;\"><strong>Pros:<\/strong><\/span><\/p>\n<p>suPHP<\/p>\n<ul>\n<li>&#8211; the web server can be &#8230; threaded safe, and it is separated from php<\/li>\n<li>&#8211; can be isolated based on user\/environment<\/li>\n<\/ul>\n<p>mod_php<\/p>\n<ul>\n<li>&#8211; you can use <strong>php_value<\/strong> and other php settings right from <strong>.htaccess<\/strong><\/li>\n<li>&#8211; it is way faster than suPHP<\/li>\n<\/ul>\n<p><span style=\"text-decoration: underline;\"><strong>Cons:<\/strong><\/span><\/p>\n<p>suPHP<\/p>\n<ul>\n<li>&#8211; you can&#8217;t use <strong>php_value<\/strong> and other php settings from <strong>.htaccess<\/strong><\/li>\n<li>&#8211; slower<\/li>\n<li>&#8211; higher response time<\/li>\n<li>&#8211; higher CPU load<\/li>\n<\/ul>\n<p>mod_php<\/p>\n<ul>\n<li>&#8211; PHP safe mode it is not quite safe<\/li>\n<li>&#8211; higher memory consumption than suPHP<\/li>\n<li>&#8211; can&#8217;t be isolated based on user\/environment<\/li>\n<\/ul>\n<div id=\"share-and-beer-container\">\t<div id=\"buy_me_a_beer_div\" class=\"single beer\">\n\t \t\n\t\t<div class=\"buy-beer\" onclick=\"document.getElementById('buy_me_a_beer_form').submit();\">\n\t\t\t<form action=\"https:\/\/www.paypal.com\/cgi-bin\/webscr\" id=\"buy_me_a_beer_form\" method=\"post\">\n\t\t\t\t<input type=\"hidden\" name=\"cmd\" value=\"_xclick\" \/>\n\t\t\t\t<input type=\"hidden\" name=\"business\" value=\"info@directaccess.ro\" \/>  \n\t\t\t\t<input type=\"hidden\" name=\"item_name\" value=\"A Beer For suPHP vs mod_php - pros and cons\" \/>  \n\t\t\t\t<input type=\"hidden\" name=\"item_number\" value=\"1\" \/>  \n\t\t\t\t<input type=\"hidden\" name=\"return\" value=\"https:\/\/www.osd.net\/blog\/web-development\/php\/suphp-vs-mod_php-pros-and-cons\/\" \/>  \n\t\t\t\t<input type=\"hidden\" name=\"amount\" value=\"5\" \/>  \n\t\t\t\t<input type=\"hidden\" name=\"undefined_quantity\" value=\"1\" \/>  \n\t\t\t\t<input type=\"hidden\" name=\"currency_code\" value=\"USD\" \/>  \n\t\t\t<\/form>\n\t\t\t<p class=\"buy-beer-text\">If you liked this post <br \/> you can <strong>buy me a beer<\/strong><\/p>\n\t\t<\/div>\n\t<\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Somebody asked me in the past what are the differences between suPHP and mod_php and which one is the best so I will try to list the pros and cons between those two: Performance related mod_php and by far the winner since it is about 30% faster than suPHP. How do they work: suPHP &#8211; &hellip;<\/p>\n<div class=\"cta1\"><a href=\"https:\/\/www.osd.net\/blog\/web-development\/php\/suphp-vs-mod_php-pros-and-cons\/\">Read more<\/a><\/div>\n<div class=\"like-excerpt\"><div\n        class=\"fb-like\"\n        data-href=\"https:\/\/www.osd.net\/blog\/web-development\/php\/suphp-vs-mod_php-pros-and-cons\/\"\n        data-layout=\"button_count\"\n        data-action=\"like\"\n        data-show-faces=\"false\"\n        data-share=\"false\">\n        <\/div><\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[14],"tags":[43,42],"_links":{"self":[{"href":"https:\/\/www.osd.net\/blog\/wp-json\/wp\/v2\/posts\/154"}],"collection":[{"href":"https:\/\/www.osd.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.osd.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.osd.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.osd.net\/blog\/wp-json\/wp\/v2\/comments?post=154"}],"version-history":[{"count":7,"href":"https:\/\/www.osd.net\/blog\/wp-json\/wp\/v2\/posts\/154\/revisions"}],"predecessor-version":[{"id":160,"href":"https:\/\/www.osd.net\/blog\/wp-json\/wp\/v2\/posts\/154\/revisions\/160"}],"wp:attachment":[{"href":"https:\/\/www.osd.net\/blog\/wp-json\/wp\/v2\/media?parent=154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.osd.net\/blog\/wp-json\/wp\/v2\/categories?post=154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.osd.net\/blog\/wp-json\/wp\/v2\/tags?post=154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}