A lot of reading for me to do about how to build online communities!
Author Archives: Jay Jay
Resizing images with PHP
Read an article today about Resizing images with PHP which has a follow up about Retaining Transparency with PHP Image Resizing.
I haven’t had to do this yet, but I see it in my future. :)
Configure Postfix for DNS Blackhole Lists
Followed the instructions in this article Configure Postfix for DNS Blackhole Lists such as dsbl.org / spamhaus.org database to configure my Postfix email server to stop spam. I used the whole recommendation:
smtpd_recipient_restrictions =
reject_invalid_hostname,
reject_non_fqdn_hostname,
reject_non_fqdn_sender,
reject_non_fqdn_recipient,
reject_unknown_sender_domain,
reject_unknown_recipient_domain,
reject_unauth_destination,
permit_mynetworks,
reject_rbl_client list.dsbl.org,
reject_rbl_client sbl-xbl.spamhaus.org,
reject_rbl_client cbl.abuseat.org,
reject_rbl_client dul.dnsbl.sorbs.net,
permit
Before that my settings where:
smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination
I kept the permit_sasl_authenticated setting too.
PHP error handling and reporting
Quick and dirty PHP error handling:
error_reporting( E_ALL | E_STRICT ); ini_set( 'display_errors', 'on' );
HTML5 autocomplete
Apparently the autocomplete attribute is now supported in HTML5.
Apache2 MaxClients directive
Learned about the Apache2 MaxClients directive which I set in my /etc/apache2/apache2.conf file. To figure out which MPM section to put the setting in I ran:
# apache2 -V | grep MPM
Apache2 mod_status
I learned about Apache2 mod_status today. This can be used to monitor the status of your Apache server!
ab – Apache HTTP server benchmarking tool for apache stress test
Read an article ab – Apache HTTP server benchmarking tool for apache stress test about the ‘ab’ command which can be used to stress test a website.
I used it and figured out that my webserver could handle about 100 requests per second.
The command I used was:
# ab -c 100 -t 10 -r http://www.example.org/test.php
Smallest 1×1 pixel transparent GIF image
Looking for a small 1×1 pixel transparent GIF image to use in your website? Here is a 1×1 pixel transparent GIF image. You could use a transparent PNG instead, but then the file size would be bigger, so why would you do that? :)
How many requests per second does a load balancer support?
I’m working on an application that is going to need to scale, and I haven’t done this before. One of the things I wanted to know what how many requests per second I could expect a single load balancer to support. I found this article Benchmarking Load Balancers in the Cloud which says that on average you can get about 5000 requests/sec through a load balancer.