Well, finally I found the error, after searching a lot I came to find this post (http://blog.codyjung.com/2011/05/29/problems-with-lampp-and-exec/)
It turns out that lampp uses his own libraries, so I got to override /opt/lampp/lib/libgcc_s.so.1 library with the server one (/lib/libgcc_s.so.1), restart apache, and it works right away.