Looks like Nvidia aren’t the only ones who cheated in benchmarks! Although the Register dubbed it, “optimised code”.
They conclude, “Or toss a coin – just as valid a basis for judgement as benchmarks these days” when buying a new graphics card.
Install Sendmail – 6.0
It’s been a while, but I released a new version of Install Sendmail today. This version now works on Red Hat 9, or other modern Linux/Unix systems with Sendmail 8.12.x (Thanks to Brent D Miller!)
I also added a Polish translation by Michal Gawron, thanks!
PHP: Process Control Functions
I had quite forgotten that PHP can fork a process just like in C! This might be a useful thing to know for doing background tasks, but to be honest the extra complexity required will probably put me off doing it. That’s where this Thread class comes in handy..
<?php
include ("threadClass.php");class testThread extends Thread {
function testThread($name) {
$this->Thread($name); // calls the parent constructor and assign its name
}function run() {
while(true) {
sleep(1);
print time() ."-" . $this->getName() . " said ok...\n"; // every second we're going to print this line...
}
}
}
// Main program. Bring up two instances of the same class (testThread).
// They runs concurrently. It's a multi-thread app with a few lines of code!!!$test1 = new testThread ("Thread-1");
$test2 = new testThread ("Thread-2");
$test1->start();
$test2->start();print "This is the main process. Press [CTRL-CANC] to terminate.\n";
while(true) {sleep(1);}?>
Busy
You can tell I’m busy. No posts today so far. Installing Apache, MySQL, PHP on a new machine, and fiddling with firewalls.
Anyone good at iptables stuff? How do I let MSN Messenger through? The following would work fine if not for Messenger!
# /etc/sysconfig/iptables
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Lokkit-0-50-INPUT - [0:0]
-A INPUT -j RH-Lokkit-0-50-INPUT
-A FORWARD -j RH-Lokkit-0-50-INPUT# lan
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp -s 192.168.1.0/255.255.255.0 -d 0/0 -j ACCEPT# ssh
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 22 --syn -j ACCEPT# smtp
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 25 --syn -j ACCEPT# dns
-A RH-Lokkit-0-50-INPUT -p udp -m udp -s dns1_server1 --sport 53 -d 0/0 -j ACCEPT
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp -s dns_server2 --sport 53 -d 0/0 -j ACCEPT# localhost
-A RH-Lokkit-0-50-INPUT -i lo -j ACCEPT# reject everything else
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --syn -j REJECT
-A RH-Lokkit-0-50-INPUT -p udp -m udp -j REJECT
COMMIT
I found reAim which is a compact transparent proxy designed to be run on or behind a Linux IPTables based firewall.
Trying to proxy through Squid didn’t work either, I got the following error:
TCP_DENIED/403 1020 CONNECT messenger.hotmail.com:1863 – NONE/- –
That’s annoying.
b2++ forum and documentation
I added a discussion forum and documentation site for b2++. Both are quite empty right now, but you can post to the forum if you have any queries or comments about b2++, and if you’d like to contribute to the documentation feel free to email me and I’ll setup an account for you to edit pages in the Wiki.
The documentation is handled by WakkaWiki but I’ve limited editing by requiring a username/password.
The forum is running a stock version of phpBB.
b2++ 0.7 released
b2++ 0.7 is out. Read the announcement on the b2 forums.
I’ve also installed a wiki and phpBB2 on this site. If anyone would like to contribute to the documentation effort, or can test/verify a phpBB2 install I’d appreciate it. That said, installing it was quite easy and may influence the install of b2++ in the future!
Go download it now!
nightly GTK2/XFT Mozilla Firebird Linux/x86 builds available
Hmm, must take a look at this build of Moz FB. As it uses GTK2 the GUI’ll be anti-aliased too!
The b2 future – WordPress
Michel’s back, and announced details about the future of b2.
WordPress is going to be the next version of b2 and is developed by Mike Little and Matt Mullenweg. I’ve exchanged brief emails with both on different matters and hope to continue exchanging ideas and code as we’re working on a similar codebase. Tim has more on the announcement too.
With b2++ and WordPress around, the future of b2 looks good! 🙂
On another note, there’s a security hole in the blog import tools shipped with b2. I bundled these scripts with b2++. The easiest way of fixing that is by deleting gm-2-b2.php and blogger-2-b2.php.
Using Transactions with MySQL 4.0 and PHP
Short tutorial on using transactions. Issuing a rollback is fine, but you need to program around it too – your code should be aware the rollback occured. Set some return variable to false
and take evasive action!
Can your car roll uphill?
Good explanation of this strange phenomenon 🙂
Whilest there is this slope of 1 in 86 upwards from the bend at the Glen, the configuration of the land on either side of the road provides an optical illusion making it look as if the slope is going the other way.
There’s even a Wikipedia page on the phenomenon.