Wednesday, August 30, 2006

My first use of awk command

Hi, today I has to detect the machines IP. So I thought to make use of "awk" for it and got build this command ifconfig eth0 | awk '/inet addr:/ {print $2}' | cut -d\: -f2 first get the ifconfig output to awk, find "inet addr:" in it (for ip version 6 use "inet6 addr" ) than cut it in piece and pick the second one as simple as that Sumit Gupta

Tuesday, August 29, 2006

Quality assurance

Hi, One of my friend told me that they have a QA department in their company. I ask him what is QA ? and get this old word in new look "Quanlity Assurance". At that time I neglect that word and doesn't bother about it, as i don't know what it is. and thought why we need it. Today, I have been asked that why I haven't check the coding pattern of developers working under me. Hmm , as a project manager and handling 15 projects at one go is it possible for me to check those things ? my answer is NO. not sure my boss love it or not( and ofcourse he will not love it). But now its time for him to think of it. Can they get enough time to think even to check the coding, or about any such things? Its partical problem in Small Software companies, they spend money, but on programmers only. But to make a application click we need more than just programmers or maybe we need to re-read SDLC to know that we been a software company we need more than junior level programmers. And also a Good programmer cannot do miracles. Software programming is Team work, Senior programmer/team leader/project manager all are good if their complete team is. Sumit Gupta

Friday, August 25, 2006

Three things to do for File upload using PHP and Apache

Recently I have been ask by a developer to check the Apache configuration as his PHP script is not able to upload files more than 512KB. I looked around with my basic knowledge to see whats the cause of problem. And found these three things need to be modify in order to correctly upload file using PHP with Apache Webserver. 1) Check the php.ini for upload_max_size it must be greater than what you required for example to upload 10 MB file you need upload_max_size 10M in PHP.ini or php_flag upload_max_size 10M in .htaccess (it will only work if Apache is not using SUExec , not sure why is it so) 2) Check the PHP.ini for post_max_size in PHP.ini it should be post_max_size 11M ( as you will be having some text field with your 10 MB file so make space for them, it should always be greater than upload_max_size otherwise you are not able to upload full size files ) 3) Its not necessary is set by default. And not sure whats its default value, but if you are getting this error in your Apache Error log Requested content-length of xxx is larger than the configured limit of xxx, referer: http://www.vikasumit.com than you need this in your httpd.conf file <Files *.php> SetOutputFilter PHP SetInputFilter PHP LimitRequestBody 11534336 </Files> this will set the PHP to have upload 11MB of body text, and header is not counted here. Again this must be set great than upload_max_size setting for php.ini Now you can upload any file upto 10MB on your server. Enjoy file uploading ... Sumit Gupta

Tuesday, August 15, 2006

Need guidance

Not sure, i should post it or not, but I am definately looking for guidance from someone. As I was working on a complex project from last 6 months, which is totally new thing for me to learn and develop. I was going all smooth till my company plan to expand my development team by providing me there Best Programmer to my project..ah sorry, not programmer but project managers. They are far more experince than me and are very good at there job. Now, they are working on part of project that totally related to development of interface, based on my research on how to perform that action, with their knowledge of development tools for interface. I am using PHP2GO web framework when I start the application, that provides all the feature one should require to develop a web interface in PHP. It has its own Email class, Database connectivity class, XML parsing class etc etc. But as this new team start working and after two months of their involvment in this project, I still can observe that they are using traditional freely available classes for all operation I mentioned, I mean now my project has two classes for same operation because these senior members doesn't take their time to read current architecture of application. Now, my problem is should I ask them to use their own method or should I close my eye ? Why I'm asking is simple, Once I have been told to not pressurize my collegue that are there because of their working abilities. Because they are not any junior programmer. Since than, I always keep asking myself, what should I do in this respect? Is there anyone going to guide me??? Please post a Comment to this blog entry I am waiting for it. Sumit Gupta

Thursday, August 10, 2006

Patching Source Code in Linux

Recently I download one source code for linux box, But unfortuntely that code is too old (2002) so we need to patch the source code as its available for my Linux distro. Command is simple for it though we need a PATCH installer package first. Command is patch -p1 < [Patch_file_name] this will patch your source code... Ah one thing, your patch file must be in root of your source code :) So enjoy your patched codes Sumit Gupta

Tuesday, August 08, 2006

Life Changed

Yes ... my life is changed now, why? simple I am engaged now. I know its too late to make it public, its already but now I am engaged and doesn't have much time to do coding and other techincal stuffs :o). Have got much important work now. but will be back on coding sooner or later in full flow, for now I am not taking coding too serious. So Just enjoying my life as I need that refreshment as well :o), I deserve that Sumit Gupta