How to be a good IT professional

Você pode ver este post em português também. I’ll continue below this post of Elton Luís Minetto, complementing your ideas about everything I learned on IT environments. Here we go: Graduate yourself. I know people that leave the graduation behind and are going well, and I can garantee that this kind of people is rare. Different from @eminetto, I joined to the graduation at 2004 with some experience on IT (I started at 1997). And even tought the graduation expanded (better, it did try and applied) knowledge on fields which I had never heard before, and it was really valuable;

READ MORE

Load Balancing with DNS

Você pode ler este post em português também. Hello! The article of this month will show how is easy to balance the load of an application using your DNS. However, you must be able to do the following actions: Take from your web server the responsibility of storing the session data of your application; To have access to the DNS server that holds the records of your domain; To have more than one web server to holds the requests (obvious, but it’s good to say…). If your application is written in PHP, you can treat the first item above trough the session_set_save_handler.

READ MORE

MySQL: Copy only the structure of table

Você pode ler este post em português também. Hello! Last month I had to copy the structure of a table to a new one. More than two people were surprised with the way and ease which I did it, so I decided to post it here instead of another performance comparison inside PHP. Below is an example. Enjoy and feel free to share ideas about it. [arglbr@t64 ~]$ mysql -AD test Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 20 Server version: 5.1.47 Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

READ MORE

Excel/Calc workbook generator with PHP

Você pode ler este post em português também. I wrote a interesting function: Execute it with a given filename and an array in this format: Array ( [plan1] => Array ( [0] => Array ( [id] => 1, [name] => Adriano ), [1] => Array ( [id] => 2, [name] => Rodrigo ), [2] => Array ( [id] => 3, [name] => Manoel ) ) ) And the response will be: Cool! It’s a generic function, so you can use it with your helper class/functions, etc. This function use the Spreadsheet_Excel_Writer class from PEAR. The source code you can get in Github here, so you can be notified about updates.

READ MORE

Error compiling PHP with GD support

Você pode ler este post em português também. Hi Folks! If you try to compile PHP with the –with-gd in a system that has 1.4 or higher version of libpng, you will have a compilation error. The solution until the PHP developers does not release the next stable version with the fix is very simple, but requires that you change one line in the source code of PHP. Short way: Open the file ext/gd/libgd/gd_png.c, go to the line 148 and you will find this: if (!png_check_sig (sig, 8)) { /* bad signature */ Comment it (better) or remove it (worse), replacing with this: if (png_sig_cmp (sig, 0, 8)) { /* bad signature */

READ MORE