{"id":2133,"date":"2014-10-30T21:05:29","date_gmt":"2014-10-31T00:05:29","guid":{"rendered":"http:\/\/tangopardo.com.ar\/2cf7\/?p=2133"},"modified":"2014-10-30T21:05:29","modified_gmt":"2014-10-31T00:05:29","slug":"chasing-misterious-500-errors-within-php","status":"publish","type":"post","link":"https:\/\/tangopardo.com.ar\/2cf7\/2014\/10\/30\/chasing-misterious-500-errors-within-php","title":{"rendered":"Chasing misterious 500 errors within php."},"content":{"rendered":"<p>For the last couple of days I&#8217;ve been investing time learning doing some (serious) things with Drupal and I quite like it, given that for my previous gig involving php I had to manually compile and patch php 5.2 in order to work with a monstrosity made with Textpattern and CakePHP (and a spice of hand crafted databased code).<\/p>\n<p>Last morning I was almost ecstatic reading about Features and went on to make a new one just to try it out.<\/p>\n<p>I select a few components, hit &#8220;Download feature&#8221; and after a while, nothing. Same happened with &#8220;Generate feature&#8221;.<\/p>\n<p>On the error.log I see:<br \/>\n<code>2014-10-29 07:49:31: (mod_fastcgi.c.2543) unexpected end-of-file (perhaps the fastcgi process died): pid: 11992 socket: unix:\/tmp\/php.socket-3<br \/>\n2014-10-29 07:49:31: (mod_fastcgi.c.3329) response not received, request sent: 1106 on socket: unix:\/tmp\/php.socket-3 for \/some_site\/index.php?q=admin\/structure\/features\/create, closing connection<\/code><\/p>\n<p>That was a bit odd, since the memory limit is set to an ample 256M and it died long before the time limt.<\/p>\n<p>Just to be sure I tried using Apache instead of Lighttpd but no dice.<\/p>\n<p>On the system log I see:<br \/>\n<code><br \/>\nphp-cgi[13015]: segfault at bf7c6fcc ip b738201a sp bf7c6fd0 error 6 in libpcre.so.3.13.1[b736d000+3f000]<br \/>\n<\/code><\/p>\n<p>With that clue I edit php.ini and shave a couple of zeros out of pcre.recursion_limit from the default of 100000. After restarting the server everything worked fine.<\/p>\n<p>I shudder thinking of something that <em>really<\/em> needs a call stack 100 thousand levels deep. But on the other hand I cut my teeth on a micro with 68 bytes of ram.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For the last couple of days I&#8217;ve been investing time learning doing some (serious) things with Drupal and I quite like it, given that for my previous gig involving php I had to manually compile and patch php 5.2 in order to work with a monstrosity made with Textpattern and CakePHP (and a spice of [&hellip;]<\/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":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[30,24,22],"tags":[],"class_list":["post-2133","post","type-post","status-publish","format-standard","hentry","category-art","category-hacks","category-software-libre"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pmnbC-yp","_links":{"self":[{"href":"https:\/\/tangopardo.com.ar\/2cf7\/wp-json\/wp\/v2\/posts\/2133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tangopardo.com.ar\/2cf7\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tangopardo.com.ar\/2cf7\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tangopardo.com.ar\/2cf7\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tangopardo.com.ar\/2cf7\/wp-json\/wp\/v2\/comments?post=2133"}],"version-history":[{"count":3,"href":"https:\/\/tangopardo.com.ar\/2cf7\/wp-json\/wp\/v2\/posts\/2133\/revisions"}],"predecessor-version":[{"id":2136,"href":"https:\/\/tangopardo.com.ar\/2cf7\/wp-json\/wp\/v2\/posts\/2133\/revisions\/2136"}],"wp:attachment":[{"href":"https:\/\/tangopardo.com.ar\/2cf7\/wp-json\/wp\/v2\/media?parent=2133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tangopardo.com.ar\/2cf7\/wp-json\/wp\/v2\/categories?post=2133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tangopardo.com.ar\/2cf7\/wp-json\/wp\/v2\/tags?post=2133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}