Firefox PHP

Planet Phorum

This is a collection of the Phorum development team's personal blog posts that relate to Phorum.

MAMP and virtual local hosts / IPv6

Thursday, November 24, 2011

Recently I recognized that my local access to virtual hosts created with MAMP ( http://mamp.info/ ) is pretty slow. It takes a couple of seconds to actually send the request.
MAMP (Pro) adds virtual hosts to the /etc/hosts file on mac with 127.0.0.1 as its IP-address, so that I could just enter http://myapplicationname:8888 to get to the local development environment of my app.
As I got similar timeouts accessing my hosts when I enabled IPv6 for them I guessed that there was a connection.
Adding the 127.0.0.1 equivalent for IPv6 ( ::1 ) did the trick then finally.
Add
::1 myapplicationname
to the /etc/hosts and it works blazing fast as regular.

Seems like OSX nowadays always does an IPv6 lookup, even for localhosts.


Phorum has moved to Github

Friday, July 01, 2011

Long time, no post :) .

Effective by today Phorum has moved to GitHub (https://github.com/Phorum/Core).
That means that our code repository was converted to git (I’ve had to use svn2git as the github-internal import didn’t pick up our tags and branches) and the trac tickets were imported to github issues (I wrote my own php script for that because none of the two existing scripts worked for me. Somehow they all barfed at some broken charset characters from trac or didn’t take the api request limit from github, 60 requests per minute, into account. So I wrote my own script which was taking like 3 hours to import our 900 tickets but was a breeze to implement with the well documented github api – and its php library ;-) ).
The issues in github don’t support attachments yet which means that only the comments are ported over – and a link back to the trac install is provided.

One missing part is the wiki import but I’ll see what I can use of the old data.
Also our release scripts aren’t changed yet but I’ve got to see if they might just stuff the generated docs into the tagged release as github creates tarballs / zip archives from the existing tags already. Now we’d just need to download and put them on phorum.org too ;-) .

It took me a while to get my local development environment to work with git but a first commit to our 5.2 branch is done now, so that actually works. Working with branches in git made my head hurt but as long as works I don’t really mind. I’m currently evaluating phpStorm for my development work which has internal github and git support and seems to handle that in an accessible way without having me to look into the internals of git too much.


IPv6 experiments / lessons learned

Wednesday, November 18, 2009

During the last couple of days I did some experiments with IPv6 connectivity / applications / configuration.
For nearly two years I already got two sixxs.net tunnels. One for a server and one for my home connectivity.
I never got aiccu working on Mac OSX so the home tunnel was down most of the time.

Finally it got to me and I worked on getting 2 subnets now, again, one for the home network and one for the servers.
For the gentoo servers I used the router howto from http://www.gentoo.de/doc/de/ipv6.xml with the radvd configuration.
RADVD is a router advertisement daemon for ipv6 networks. IPv6 has a mechanism for auto configuration where the router advertisement daemon sends advertisements about the supported prefix (aka network/netmask in IPv4 world) and its own ip address for the gateway. So far it seems like most ipv6 stacks have this auto configuration included by default so every IPv6 enabled server in the reachable network suddenly has a IPv6 address. I never knew that that many servers of mine are IPv6-enabled and even quite some servers of my isp were suddently connected through IPv6 (getting me a curious call of my ISP ;-) ).
Thats the first thing to be worried about, suddenly they are all connected to the big bad internet without correct reverse dns entries, firewalls and the like.
Speaking of firewalls, usually you don’t have a IPv6 firewall up at this moment. Your old ipv4 firewall rules won’t catch any ipv6 traffic. Therefore, again, every IPv6 enabled host is exposed to the world without proper protection. Thats even worse if you open a tunnel to your home network as the home network is most often connected through some router doing nat and internally just using private ip addresses so that the hosts are not exposed to the outside world at all. With opening the tunnel and enabling the radvd service you got them out in the open world either.

On my home network I got a CentOS5 server running which is doing some smb service and the like.
I got that one connected to the sixxs tunnel and started the radvd service on that box. So far so good, Mac OSX has IPv6 enabled with autoconfiguration by default so. So the hosts got the IPv6 addresses and routing.
ping6 worked (btw. nice to have most tools available as ipv6 cmds with just 6 at the end) but the browser delivered no IPv6 website. There you are, CentOS5 / RHEL HAVE a ip6tables ruleset enabled by default and that one was just open for icmp (ping) messages. Good protection but cost me a while to diagnose. So I opened some more loopholes for the IPv6 connection on the home network for smtp, imap, http, https and dns and still let the radvd daemon running.
At the server network I disabled the radvd service and manually set ipv6 addresses and gateway so that I won’t disturb neighbours in the network anymore :-) . A strict ip6tables ruleset was enabled too.
For fun I went through the IPv6 certification by HE.net and got as far as to prove that I got:

  • ipv6 connectivity
  • an ipv6 enabled webserver
  • an ipv6 enabled mailaddress (yes my main mysnip.de mail address is now ipv6 enabled!)
  • reverse dns entries for my ipv6 enabled hosts (powerdns has no problems with that)

The step which still gives me trouble is that I can’t give fully ipv6 enabled nameservers to the outside world. My main nameserver is ipv6 enabled but the secondary ones from inwx.de don’t have ipv6 connectivity or AAAA entries so there’s not much I can about it.
Skimming through the maillogs on my mailserver I was stunned to see that *a lot* of spam is trying to deliver through IPv6 already. postgrey is working with ipv6 without trouble, amavis / spam assassin too so there’s not really a problem. Seems like spammers adapt more quickly to the new technologies though. On the other hand I found that freenet.de (a german ISP) got its mailservers connected through IPv6 already and is publishing AAAA entries for them. Therefore some mail is already delivered through IPv6.
In the near future I might try to offer some experimental IPv6 access to the services provided but without any native ipv6 connectivity (anyone knows if TeliaSonera is offering it and if it poses additional costs?) that doesn’t make too much sense for production.

At least now I can check how the applications I’m using and providing are working with IPv6. Also Phorum needs to be checked for that.

MySQL in Gentoo …

Wednesday, October 14, 2009

Merely as a note to myself I just looked around the Gentoo bugtracker to learn about the current state of MySQL in Gentoo.
So far I found two related bugs:
About 5.0.x
http://bugs.gentoo.org/show_bug.cgi?id=279493

What I learned from this bug:
Recent dev-db/mysql versions contain most of the percona patchsets already (neat!). Dunno about xtradb so far.
Latest in tree is 5.0.84 which I’m trying on a backup system now (even though is marked as ~x86/~amd64 aka testing.

About 5.1/5.4
http://bugs.gentoo.org/show_bug.cgi?id=194561
5.1 is going to be put into dev-db/mysql too (not in dev-db/mysql-community as it was before because of the changed development model)
Quoting Robin Johnson:

“I intend to issue a package move after we’ve had a few versions >=5.0.83 in stable, but there is no further need to make new -community ebuilds.”

So there will be 5.1.x in tree once some more recent 5.0.x versions were released as stable. Latest stable mysql version in tree is 5.0.70.

Seems like he’s also keeping back because of some more breakage in earlier 5.1 versions.
As another quote:

“I’m aware that 5.1.30 is out. However it’s still in bad bad shape. [...] It certainly ate some of my data when I tested it.”

For the topic whats keeping them from stabilizing later mysql (> 5.0.70) versions I found some quote from Robin Johnson too (who seems to be THE mysql maintainer in Gentoo):

My most defining test for putting MySQL builds in the tree has been that it
passes both of the following:
1. Passes it’s own testcases (upstream has been atrociously bad at this, see
status2 in 5.0.72 for example)
2. It doesn’t eat my data or break my systems.

#1 is pretty easy as a start point, seeing if it works.
#2 is a lot tougher:
- 5.0.70 is the best option for now.
- 5.0.72 breaks most of the statistics code out there really badly (I filed
upstream bug 41131) – changes to SHOW behaviour as well as the ‘Questions’
variable.
[...]
Having upstream do sane releases is part of why there has been so long between
my 5.0.x bumps, because they haven’t passed my personal testing.

So far its mostly general stuff and I don’t know if MySQL-5.0.x still doesn’t pass its own testcases or anything. I couldn’t find more detailed stuff in the bugtracker.

MySQL proliferation

Monday, October 12, 2009

Long time no post but thats some stuff lingering in my head for a while looking at the mysql ecosystem lately.

For a long time I had to stay with MySQL-4.0 (sick I know) but there’s a lot of software to adapt to the new version(s) but lately I’m pushing it more and more into mysql 5.0.
MySQL 5.1 would be also interesting and even MySQL-5.4 … but thats where the trouble starts.
MySQL-5.4 came out of the dark, no one expected it and it gave numerous improvements … though its still in beta.
With that release (or at least around this time) MySQL started to change its release model to something new where the version numbers matter far less and where there should be regularly released. Well, Oracle has bought Sun which owns MySQL … so we will see what the next “release model” will be.
On the other hand there are some “forks” of mysql out there which offer more improvements or at least they are supposed to do this.
For one there is XtraDB which is supposed to be just a replacement for the InnoDB-plugin now … while it had more patches to the main mysql server before as far as I remember – so its not really a fork, just another storage engine.
Then there is MariaDB which should be a “… community developed branch of the MySQL database that uses the Maria engine by default.” (quote from the linked page) which is developed by Monty Program AB and the OpenDatabaseAlliance.
Being “only” a collection of patches and builds of MySQL with patches is OurDelta.
I’m pretty sure that there are more forks or patch collections out there, please forgive me if yours isn’t listed.

But here is the question. Which MySQL version / patchset / fork should one use?
Previously it was just the question of using the commercial enterprise or the community version. Now I’m just confused.

Next problem is the distribution on linux …
Nearly all my servers are using Gentoo as the linux distribution but have you ever looked at the status of mysql in there?
The latest “stable” version is dev-db/mysql-5.0.70. dev-db/mysql-community-5.1.21_beta is in there, but not marked as stable (5.1.39 being the last one on the mysql homepage), 5.4.x is nowhere to be seen, same for XtraDB, MariaDB … . I don’t blame it on the maintainers – who should keep up with that flow of releases, different branches and/or forks. I also heard rumours that all the latest versions are failing numerous tests for the maintainer(s) and therefore won’t go in.
If I want to use a recent stable version or one of the enhancements I will have to do my own builds instead of using the great gentoo infrastructure for that. I could, sure, but time is low and I would get far further if I could use the regular way to install (and update) software on Gentoo. I don’t have a full blown infrastructure team to keep the systems going.

If I wouldn’t have too many software using raw database calls in php or perl I would seriously consider switching to some other database, PostgreSQL or the like. I heard even Maurice considering switching to Postgresql in the future and supporting the Postgresql layer for Phorum.

If there is no one stopping this proliferation of the mysql ecosystem and providing reliable and regular stable builds of a tree, I think Oracle won’t have to worry about MySQL anymore. There will be not too much left of its userbase and community.
But maybe its just me, paiting things black, who knows ;-) .

Interview with WebDevRadio

Saturday, May 03, 2008

While I was at the MySQL Conference, I sat down with Michael Kimsal of WebDevRadio and recapped the two talks that I gave at the conference.  I have uploaded the slides so you can follow along if you want.

One to a Cluster - The evolution of the dealnews.com architecture.

MySQL Tips and Tricks - Some simple tips and some of the more advanced SQL we use in Phorum.

Thanks Michael.  Any time you need a guest, just let me know.

MySQL Conference Swag

Thursday, May 01, 2008

I was reading a post about The Swag Report and realized that I stayed so busy at the Phorum booth (and a little at the memcached booth) and preparing for my talks, I did not bother to go around and collect any swag from the conference.  So, if you are a vendor and want to mail me some swag that I missed, you can send it to: Brian Moon, 198 S. Hillcrest Rd., Odenville, AL  35120.  Of course, I expect nothing.  But, ya never know what product I might pimp because of a t-shirt. =)

2008 MySQL Conference, part 1

Thursday, April 17, 2008

It is always surprising what I learn when I go to a conference these days. Years ago, I could go to any talk and just suck it all in. Now, it is the little nuggets. The topics as a whole do more to confirm what I have already developed while running the Phorum project and building the infastructure for dealnews.com. That confirmation is still nice. You know you are not the only one that thought a particular solution was a good idea.

One of the confirmations I have had is that the big sites like Flickr, Wikipedia, Facebook and others don’t use exotic setups when it comes to their hardware and OS. During a keynote panel, they all commented that they did not do any virtualization on their servers. Most did not use SANs. Some ran older MySQL versions but some were running quite recent versions. I have kept thinking that I did not have the desire to get to fancy with that stuff and clearly I am not the only one.

One of the little nuggets that will likely change my world is index_merge in MySQL. I feel silly as this has been around since 5.0.3 but I was not aware of it. Basically MySQL will now use more than one key to resolve a where clause and possibly an order by depending on the query. This could lead to me removing several keys from tables in both Phorum and at dealnews.

There were others, but I am tired and trying to get OpenID into the Phorum trunk right now so I will have to think of more later.

Phorum turns 10

Thursday, April 17, 2008

So, I am at the MySQL Conference this week with my Phorum co-developers. We got to talking last night about how old Phorum is. We knew it was about 10 years. We pulled up some old archived zip file of version 1.5 and found in the this in the comment block.


* Created 04/16/1998

Whoa! That means that yesterday was the 10th birthday of the Phorum project. I would guess that is the date I originally put the code up on my personal web site for people to download. I remember sending that email to the PHP General mailing list. I told people they could have the code if they would help debug it. Later I officially made a GPL license and then a BSD style license as I became more knowledgeable about the open source and free software world.

So, for kicks we decided to install version 1.6 on the phorum.org site. Keep in mind the release date for that was March 30, 1999. The only hurdles were a default value on an auto increment column in the .sql file, needing register_globals and adding .php3 to be parsed as PHP. That got it up and running. I had hoped to post the URL for fun, but sadly, 5 lines in were sql injection vulnerabilties. Ah, the good ol’ days.

Sadly, I don’t have my emails from 1998. I lost everything in 2001 due to either a hard drive crash or some shady deal I had with someone hosting the Phorum site at the time. I can’t remember. If anyone happens to have UseNet archives or mailing list archives of the PHP General list from April 1998, please let me know. I would love to have that old stuff.