Friday, October 29, 2010

JSON with Apache, Centos 4.4 and PHP 5.1.6

Although CentOS 4.4 and PHP 5.1.6 sounds a little ancient in these days, it can happen even in the best family when suddenly you're realizing one day you have to work with a configuration like that in order to keep a development environment entirely compatible with a live system (which is totally reasonable).

It's quite easy to upgrade Centos 4.4 to PHP 5.1.6 and it's also easy to add PEAR, PECL and JSON.
It's not necessary to mention how easy to add the JSON.so module properly to the CLI version of PHP and to Apache as well - here is a good description for that.

So now you have PHP 5.1.6, Apache2, Centos 4.4.
You type PHP -m and you see the JSON module is loaded.
You run the webserver on a page which containts PHPINFO(); and you can see the json.ini file is loaded.

But hey! The Webserver doesn't loads the .SO! What's going on?

It took me a couple of hours to figure out, and since I haven't found this solution, I'll provide it here - hopefully Google will cache it for other poor souls trapped in the same way and save a couple of hours for them.

The solution is:

cd /usr/lib/php/modules (or your modules directory where the json.so file is)
strip json.so
apachectl restart


As you can see, in some cases Apache doesn't loads unstripped shared binaries so you need to fix it manually if your scripts and compiler didn't do so already.

Enjoy!

Sunday, June 27, 2010

Extending a mixed Time Capsule / Airport Extreme Network

DSL Router -> Airport Extreme -> WIFI -> Time Capsule

Time Capsule CAN join to an extended (WDS) Airport Extreme network just like any other Airport Extreme device, but manual setup often says "This network cannot be extended". The real problem is the discrepancy between the manual and automatic configuration options. So instead of manual setup, press continue (or 'assist me') and go over the functions. Just ignore the first 'ethernet is not connected' part.
Everything should work fine in this way.

Sometimes the time capsule backup will work only if the name of the device is short and alphanumeric only (no space or any special characters).

Wednesday, October 22, 2008

Maxmind GeoIP Memory Leak

Configuration:
  • PHP 5.2.6
  • Pecl GEOIP 1.0.3
  • Geoip 1.4.4
It wasn't easy to find out, but finally I found the reason why our scripts eating up all the memory:
geoip_org_by_name() function currently has a memory leak. Hopefully Maxmind will fix it soon, until that we'll use my Memory Leak Protector class.

Submitted to the PECL module page.

Monday, May 21, 2007

Modern Rules of Web Developing

In the last years there is a huge hype around web 2.0 (despite the fact there is not any people on the Earth who thinks the same about the meaning of this) and most of the people thinks it's just about shiny graphics, large fonts & Ajax on the pages. I think it's not important what web 2.0 means (and it's also not important to define this buzzword) - but below this hype, the rules of web developing slowly and silently changed - I think we have to notice, analyze & adapt these changes to work efficiently and to produce quality works.

Modern Rules of Web Developing:

  1. Connectivity: Never try to reinvent the wheel. If there is an already running, working solution what can be a part of your product - use that! There is hundreds of APIs out at the web - build the next step, don't begin everything from the scratch.
  2. Materialize: If you got the idea, put it online as you can. Don't hesitate, or plan too much - try to keep the quality, use just the necessary features, put it online - the visitors & customers will know and report what kind of features they want so you can prioritize the features later.
  3. Usability: Usability is everything. Don't think a simple design or a lot of features means usability - you have to be a user, as we are all users, when you think about that.

Welcome & Philosophy

Dear Visitor,

this blog is not the first one what I open here at Blogger but this is my first attempt to create something in English - since I have to improve my English skills some misspellings or other language errors may occur - sorry about that - I hope my English will be better in every post! :)

I'm a 29 years old IT professional from Hungary, currently living & working in Dublin. My interests to computers comes from the age when Commodore 64 was a superb computer with excellent graphics & music features. Internet is one of the most powerful tech thing what I ever saw to born in my life - I think we are still just at the very beginning of something amazing, unbelievable thing - today's Internet (the name what we use today) is just the first step to this direction.

This blog is mainly about Web based technologies and Internet related philosophies, but I will include more pragmatic issues about productivity, lifestyle, about how a modern web worker can live & work with the best practices.

Have a nice day :)