Linux, Windows, Misc.

Strange issues with network on ubuntu linux using ADSL over PPPoA

Just a quick hint if anyone else has the same problem :)

I have moved to a new place and I was experiencing strange network issues on mu linux.

It seemed like internet was working but some websites just would not load. I noticed that it was especially bad on google products and other larger sites. Many sites would never load when on SSL!

How to install pecl amqp extension in your PHP on ubuntu 11.10

Pecl extension does not compile with the version on rabbitmq-c library shipped with ubuntu so you will have to manually install the library. Here is step by step guide how to do it.

How to add a git branch name to the command line prompt (mac/linux)

That is just a very quick tip how to get git branch name into the prompt. Friend of mine pointed me to this neat little trick just last week and i thought its pretty neat so i am sharing it.

Very interesting problem with cacti and mysql strict mode!

It was very interesting as my cacti installation began failing today. For no apparent reason. I noticed CPU usage and CPU temperature going through the roof as PHP script ran by cacti was stuck in some infinite loop or active wait state. It seemed to query database non stop without sleeping or anything and it was not doing anything either.

I looked in error log and there was nothing, looked in access log of monitored server ... nothing again. Finally i looked into cacti log and found tons of messages like this:

How to check if you have PAX in your linux kernel - address space randomization

I guess most of people have heard of address space randomization and linux kernel patches that provide that. PAX is a project that has been running for years and it is an awesome way to reduce risk of buffer overflow attacks on your linux server. The great thing about it is that it makes it harder to execute most common buffer overflows system-wide.

How to compile PHP 5.2 extensions on Mac 10.6 snow leopard with MAMP and a 64 bit CPU

It is a bit frustrating that i have to use mac and can not just use the same system that we have in production but well, that is the standard now. So to make the best of it you have to adapt and learn how to deal with operating system issues ;)

I found it a bit tricky to compile PHP extensions like PECL memcache or whatever on my mac for a few reasons. My mac comes with PHP 5.3 and i need to run my site on 5.2 that i got from MAMP. In addition i have 64 bit system that runs PHP in 32 bit mode so i have to tell compiler to use 32 bit mode only.

Ubuntu 11.10 with unity - mistake or awesomeness I cant use?

I am using new Ubuntu at home on my laptop for a while now and to be honest i still can not get used to it. There seems to be some friction wither i can not figure out there is the greatness or i am too old or it is just not that great. If you know answers to my questions please drop me a comment.

Java compilation hanging forever on javac using macosx

This is a funny problem that took forever to figure out! unreal!

Friend committed new component into the revision control system i checked it out and my maven builds would get stuck on compilation. It would take like 20 minutes to run the compilation!

Compilation with javac would take forever no matter if there was error or not. Importing any net.xxxx package would make builds stall forever.

How to keep your Linux time synchronized on virtual machines

If you do a lot of funky stuff you may need to have a few virtual machines running different images of debian. Well at least i do that. It works great but once you suspend the image it looses the current time. It is not a big deal but causes nasty errors during software updates (timestamp in the future).

The bigger problem is that if your time is not synchronized you wont be able to use Web Services Security (WS-S) extension in JAX-WS as it will complain about requests from the future as well!

How to generate self signed SSL certificate for Glassfish v3 and import it into Java keyring

Java applications that use ssl to consume web services via jax-ws or use HTTP clients may check the SSL certificate of the server in runtime. In case if your certificate is self signed or Common Name of the certificate does not match the domain name you will get connection errors.

To be able to develop applications you may need to run them on dev/qa servers and then allow your Java application consume these services. To do it you will need to import their SSL certificates into your local Java keyring (the same way you add exception rules into your browser).

Installing PHP 5.3.3 from packages on Debian Lenny with apc, xdebug, memcache etc

Building apache and PHP with all its extensions may be fun once or twice but it is a major pain in the neck. So to avoid that (and to have it before Debian Squeeze is released) you can use e special dotdeb repository of almost everything that you may need as a web dev. It is especially convenient if you have a few development servers to update with different configurations and you don't want to waste too much time on it.

Upgrade Debian Etch to Lenny

Debian is my favorite linux system since 2001 or 2002. It is awesome.

The only thing that could be better is that packages are usually very old comparing to current versions. Well but at least everything works. I have used apt-get to upgrade distributions since potato release. So far it worked every time. I think i had some small issues with upgrading samba or cups once but simply going back to previous version worked of the package worked. But after all it always worked.

PALM v3 - bundle of Php Apache Linux Memcached APC Cacti scripts

Finally i had some time to gather all the files together and make third release of my cacti monitoring scripts and graph templates.

Monitoring of application and server health is an important task, while trying to maintain high availability. Without monitoring you dont know what goes wrong and you do not know when exactly does it happen. Some time ago i realized that the graphs i used to use were not perfect. I searched the web, read a bit of documentation and decided to put together a set of simple scripts gathering key server performance metrics.

This bundle includes gathering scripts and graph templates for Memcached, APC, Apache2, Linux file system, Linux memeory, CPU and Network. It should cover all the most important aspects for a typical web server. Graphs are designed to match my expectations and to make analysis easier.

I still dont have postgres, sphinx nor mysql stats included but .... who knows .... maybe in version 4! :- )

Web Security - Part 1 - Google Hacking

Doing security reviews from time to time of web applications you can find real beauties. You see GET variables in eval, system, include and all sorts of things you would not even imagine that could run live for years without anyone noticing it :- )

Mysql linux shell commands to get tables list and basic statistics

Mysql is so common that its good idea to have some command line scripts or tricks. Sometimes you need to execute some SQL queries on set of tables or all of them or get stats or fix tables etc.

Its good to be able quickly get list of tables and basic stats.

You can make bash script of it or just type in the command line:

Syndicate content

About the author

Artur Ejsmont

Hi, my name is Artur Ejsmont,
welcome to my blog.

I am a passionate software engineer living in Sydney and working for Yahoo! Drop me a line or leave a comment.

Follow my RSS