Alex (SirShurf) Frenkel's Blog

A web log of a PHP professional

Posts Tagged ‘development

Library to create a tables in Zend Framework PDF

with 2 comments

I had to create a PDF with a tables in a Zend Framework project I am making.

I have searched the web and have not found any library that can be used for this from the box, but I have found on GitHub a start of the library I was needed:
https://github.com/btm6084/Zend_PDF_Helper

Unfortunately the library was incomplete and not maintained, so I contacted the owner and he gave me the permission to take the code and do what I like with it.

So here is my version (working one) of the library that can create tables in PDF using Zend Framework PDF library.

Zend Framework PDF Table Helper

I will write a working example soon and post it here and on GitHub.

Written by Alex (Shurf) Frenkel

July 24, 2011 at 11:04 am

SVN (Subversion) and UTF files…

leave a comment »

Recently I had a strange problem.

One of my SVN hooks was failing and I had to login to the server to run the hook manually. At first I have thought that it’s a simple permission error but when I was running the same hook using the same user it was working.

After some googleing I have found that the SVN hook runs not in the user environment but without it, and in order to simulate it I need to run my hook in the same way.

The command to do it is: “env – ./post-commit”.

In this case I have seen the error and understood it. Since the SVN hook is not runs under the environment, the UTF-8 characters in file names are not visible in SVN Update.

If you have this problem all you need to do is to add next lines to your hook:


export LANG=en_US.UTF-8
export LANGUAGE=en_US:en
export LC_CTYPE="en_US.UTF-8"
export LC_NUMERIC="en_US.UTF-8"
export LC_TIME="en_US.UTF-8"
export LC_COLLATE="en_US.UTF-8"
export LC_MONETARY="en_US.UTF-8"
export LC_MESSAGES="en_US.UTF-8"
export LC_PAPER="en_US.UTF-8"
export LC_NAME="en_US.UTF-8"
export LC_ADDRESS="en_US.UTF-8"
export LC_TELEPHONE="en_US.UTF-8"
export LC_MEASUREMENT="en_US.UTF-8"
export LC_IDENTIFICATION="en_US.UTF-8"
export LC_ALL=

That will set your environment for the SVN hook request to work with UTF characters!

Written by Alex (Shurf) Frenkel

May 19, 2011 at 5:26 pm

Posted in IDE, SVN

Tagged with , , ,

Remove .svn files from directory list

with 4 comments

One of my projects had an old .svn files from the ckeditor checkout.

The problem was that there are too many directories to remove it manually so after some searches and tries here is the command to clean this .svn files.

find ./ -name ".svn" | xargs rm -Rf

Have Fun

Written by Alex (Shurf) Frenkel

May 4, 2011 at 4:52 pm

Posted in IDE, Uncategorized

Tagged with , , ,

Lost connection to MySQL server at ‘reading initial communication packet’, system error: 111

leave a comment »

For the past couple of days, for some reason I was unable to connect to the MySQL database on the system I worked, it was not a problem till now, since all I needed was a data grid, but now I had to use workbench.

The error I was getting was: Lost connection to MySQL server at ‘reading initial communication packet’, system error: 111

Well, it took me a couple of hours to gast that but I have finally found the reasone.

Early this week we have changed the bind address of the MySQL server in the my.inf file to be the external address of the system.

What i had to do was to match the address of the bind from localhost to the external one, so the correct command was:

ssh -v -f -N -L 3307:192.168.0.1:3306 user@host.server.com

Written by Alex (Shurf) Frenkel

May 5, 2010 at 9:46 pm

Posted in Uncategorized

Tagged with , ,