Archive for the ‘php’ Category
Debian fails
Generalizations are fun, they always are because they tend to offend people and offended people by stupid shit is usually lots of fun.
Here Debian, as a whole, fails; it sucks. Here Debian blows ass, the entire project is whack.
My good friend Chris Lee sent me this:
If you can't see the above iframe, go here.
Debian, full of fail. Wasn't this generalization fun?
Let the non-sense bullshit horses be released.
Large PHP scripts truncated on nginx
I spent a couple of hours yesterday trying to debug an issue that made me hit my head against the wall while it lasted.
I run multiple instances of WordPress, and with it, comes a nice little editor bundled called TinyMCE. But on my main WordPress installation (this very blog, dear reader, where you are reading this from), TinyMCE wouldn't come up, it wouldn't render properly on the browser, it didn't matter if it was my main browser, Chrome, or Firefox, Safari, cached, uncached, it was just broken. Since I hadn't have the time to go through this issue before, I was using a different editor installed as a plugin. LAME. And coward.
Anyway, I found out that one of the scripts wp-tinymce.php was being returned truncated. Because of that, Firebug would report that some TinyMCE bullshit wasn't defined (JavaScript, oh I'm not very fond of you). Oh, well. I tested calling that script under curl separately and in fact, it was only returning a fraction of the script, 44K out of the actual 200+K. I also found out that even though my nginx installation had gzip compression enabled and the PHP had zlib as well, the script wouldn't process the tinymce.js.gz but it was returning directly tinymce.js. It's alright, I just wanted it to work, no matter if it wouldn't go through gzip, that'd be a matter of some other day.
After a lot of googling I ended up reading this blog post (in Portuguese), suggesting to make sure the file permissions for both the client_body_temp and fastcgi_temp directories allowed the user running nginx (www-data in my case) to write in them. Apparently large scripts would start writing to disk on them temporarily while processing the shit. Of course, you wouldn't have this issue if you are running an nginx from your operating system package manager (like Debian's), but this might very well happen when you are running a custom nginx with separate modules and all sorts of crap on top of it:
chown www-data:www-data -R /usr/local/nginx/fastcgi_temp/; chmod -R 777 /usr/local/nginx/fastcgi_temp/; chown www-data:www-data -R /usr/local/nginx/client_body_temp/; chmod -R 777 /usr/local/nginx/client_body_temp/;
Obrigado, republicavirtual.com.br
Attending WordCamp NYC
I'll be attending WordCamp NYC this upcoming weekend. There's a lot of very interesting talks and people speaking at the conference, so it was basically a no-brainer since it's being held in Manhattan. Plus, WordPress is one of the platforms I've always liked and admired on how they have achieved to become a mainstream product with a huge amount of active users and developers. I started using it way back in 2004 when it was b2/cafelog, so it's been a long ride.
If you'll be around, poke me.



