Monthly Archives: October 2012

Feedburner unsubscribe Error 404

Published by:

If you get this error, it means you are logged in to a Google account that doesn’t support Feedburner (usually a business account).

First copy the link to the unsubscription (right mouse copy link)

Log out from the account (sign out), Go to www.feedburner.com and login with a gmail.com account.

Then paste the link and execute. Click on unsubscribe.

Feedburner will work again.

BBox2 Sagem Blocked – NAT out failed First packet in connection is not a SYN packet (part 2)

Published by:

I have been experimenting again with the ” First packet in connection is not a SYN packet: TCP 192.168.1.51:1036->157.55.133.202:80 on ppp0 ” error in my SAGEM F@ST router.

What I found was that the Sagem firewall and/or NAT throws this messages whenever tcp packets are fragmented and this has to do with the MTU (maximum transmission unit)

In short this means:
IP packets have a maximum load of 1500 bytes without fragmentation. If the load is bigger, the package will be split in multiple fragments that are transmitted separately. (fragmentation). When a PC (browser) communicates with a server, they agree on a maximum packet size (mtu) and that will be used for the remainder of the communication. Both your computer and server use the internal MTU and they don’t care about the MTU of devices and routes in between. Windows usually has a MTU of 1500, meaning it will squeeze every last bit in one packet. This is fine on a local LAN, without routers. But when the packet needs to be transmitted over PPPoE (ADSL), there is some additional 8 bytes of header-information that needs to be added, thus making the packet 1508 bytes, which is to big and will be fragmented. (learn more about this here)

Normally fragmentation is handled fine by routers in between, but the Sagem seems to mess things up.

What we need to do is lowering the MTU on the computer. This may avoid fragmentation and maybe with it this problem. To do that I used TCP/IP Optimizer 3 found here.

This program needs to run as Administrator. Put it on “Custom” (bottom right) and select you Network Adapter. Then set MTU to something like 1492 (or if you want to be absolutely safe 1460) and press Apply changes. Reboot.

If found that using a setting less then 1492 would reduce the “NAT out failed First packet” errors somewhat, but not completely. I still believe there is no real fix, unless there is a firmware upgrade (doubtful).

Please let me know in the comments what results you had.

All-in-One Event Calendar custom template code php

Published by:

I recently used All-in-One Event Calendar on a WordPress site. It’s a very rich plugin with a lot of options. Tough there is a whole theme structure behind the plug-in, real customization is a little tricky. There is that possibility to use short-codes in posts, but when I wanted to use these in WordPress templates, I got stuck. For starters there’s almost no documentation (that I know of) on functions and or queries to use for custom pages. Thus leaving me no other option that to go through the plugin code myself and figure out what to do.

Now, if you are in the same situation, I’dd like to share with you what I did.

What I want is the following: A page based on a template, displaying two sets of events both in a different event category.

All-in-One Event Calendar events are stored in WordPress as normal posts with the post-type set to ‘ai1ec_event’. For the categories it uses taxonomies. At first this looks simple enough by doing a query on the post type including (or excluding) the categories. But a bug in Worpress prevents me from doing that. The categories are ignored, because of that bug. It’s two years old and they just closed the topic and moved on without fixing it. /Sadface.

ok, now for the solution.

To get around this, I decided to take a OO approach using the events object. I did this by using the code I found here: http://pastebin.com/dxCTht6S
Then, to display the event’s I used a foreach loop (something like this):

To get the categories working, I used the $filter option. I changed it to:

You find the categorie number if you hover above the categorie (in the post or in the editor).

If you want to display other fields of the event, you can access them in the event object. There is no map of the object, but I did a var_dump for you.

Note that some of the properties are part of the object “post”, which is in it’s part a property in the object $event, so to access them you need to use: $event->post->…

You’ll notice the $event->start is a timestamp, so you need to convert it. Use date() for this. Like so:

If you want it in your langueage, convert it using strftime() by using the locale settings. Like so:

That’s about it. Have fun.
Post questions or remarks in the comment section below.

Bad Behavior has blocked 1844 access attempts in the last 7 days.