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

unset ($year); $year = new Year(2010);

Você pode ler este post em português também. Hello! 2009 ended as the begin of 2010: rush, despite of my vacation. Moreover, marvelous vacation. Dear visitors, I apologize for the lack of website update. Soon, another post about PHP performance. My first hint for this year is: Ivo Nascimento started with something that we call mini-podcast. Each one has 5 minutes, where something about PHP is coverage. Check it! And a very happy 2010 for us! Cheers!

READ MORE

Echo, print, printf: Who's the fastest?

Você pode ler este post em português também. Who’s the fastest at CPU? Echo, Print or printf? Sample material: Machine: HP Pavilion dv6058cl Notebook; Operation system: ArchLinux, x86-64 architecture; PHP version 5.3.0 Environment: Bash, without X. XFS filesystem. File echo.php: <?php for ($i = 0; $i < 100000; $i++) { echo "This is a simple test\n"; } ?> File print.php: <?php for ($i = 0; $i < 100000; $i++) { print "This is a simple test\n"; } ?> File printf.php: <?php for ($i = 0; $i < 100000; $i++) { printf("This is a simple test\n"); } ?

READ MORE

Home cleaning

Você pode ler este post em português também. After the first post at 16/03/2006, it’s time for a cleaning. I wrote 219 posts in ~ 176 weeks … is a good average. The article “Kernel compilation on Fedora Core 4” was removed. Enjoy the new blog!

READ MORE