(Perspective from Germany)
I've been programming for an IT start up as undergrad student (got in contact when one of the founders gave a presentation in a series of business start-up talks) and later done data analysis a few hours a week as PhD student for another company. It is done, also in Europe.
Big companies offer positions on their web pages, e.g. Merck
However, if you receive funding for your PhD project (scholarship), that often forbids further work for hire.
The PhD may technically be your "private fun", depending on the field/university/country. If that is the case (here), you often get a teaching assistant part-time job assigned to earn some money. Refusing this may create a lot of bad blood. But it will usually go right to the limit which you need to obey in order not to loose the student status. So in fact, you cannot go for a paid industry job, neither.
These rules, however, do not forbid to volounteer in e.g. in open source projects.
You may consider Google Summer of Code and similar programs (e.g. Season of KDE).
It may be easier to convince your funder/employer that participating in such a program has much more importance than just earning some money, and that your contract with them could go dormant for the months in question.
Disclaimer: I've been mentoring at GSoC before and hopefully will again. :-)