4th Sem Contd

This is in continuation to my previous post. I suggest please go through the post before continuing.

So, where was I ??  My previous post contained information till March 12th.

March 12th onwards : 2nd Sessionals went pretty well, better than the first one though Maths was pretty disappointing. After the sessionals, I applied for a internship at Pictualize through Let Me Know. Needless to say( confident or over confident ?), I was accepted after a small test. I was very excited and quickly signed the NDA( Non Disclosure Agreement ). During the rest of the month, I was busy making a Facebook Application as part of my internship. Facebook has a great library for PHP. I will write a entire post about the application I developed once it’s launched( PS: The launch will take another month or so).

April : April started with disappointment, I was admitted into hospital for the first time. I am not going to drag about that. I recuperated fast enough and was back to work in a week. Well, I couldn’t delay as I had my sessionals coming. The sessionals went far better than expected especially Maths. After the sessionals, another bombshell fell, rejection from ETRI, Korea. Two major disappointments were more than enough. April ended with my three lab end semester exams. All went pretty well. More about April in this post.

May : With May, my end semester exams came. While everyone else was busy studying, I found a whole lot of time to catch up with my work. But this time, due to my less than average performance in the internals I studied a lot more to maintain the required GPA. Exams went pretty peacefully without any major hiccups. I got my first domain on May 18th (http://www.mkartik.com)

That’s all for this Semester. Overall, this semester has played a very important role in shaping my future. I had many disappointing yet they were great learning experiences.

Installing a copy of Zend Server onto your localhost

Zend¬† is a very famous open source framework for PHP. It’s known for its MVC (Model View Controller) architecture.

Zend at Wiki

MVC at Wiki

Suppose you have a web server using Zend Framework and you want to migrate it to your localhost, just follow the steps to get your local copy working :
( I use Ubuntu 10.04 along with Apache2 )

  • Install Zend Framework from the Ubuntu repos. You would need the following packages : zend-framework, libzend-framework-php and zend-framework-bin. Others : just download the framework from here : http://www.zend.com/en/community/downloads. Zend_Tool is automatically installed. It is a command line utility which is very useful for creating projects, controllers, action etc . More about Zend_Tool here http://devzone.zend.com/article/3811
  • Now open a terminal and type “zf show version” . It should show the current version. This acts like a checkpoint.
  • Then create a project using “zf create project <project-name>”. You would notice that a directory by your ‘project-name’ has been created in your ‘www’ folder.
  • Open /etc/hosts with root access and insert a line :  [your-name].localhost
  • Then go to /etc/apache2/sites-available and make a new file with the name [your-name].localhost and insert this :
    ServerName [your-name].localhost
       DocumentRoot [directory]
       SetEnv APPLICATION_ENV development
    DirectoryIndex index.php
           AllowOverride All
           Order allow,deny
           Allow from all

    Just remember to enter your directory in place of [directory] eg. My directory is “/home/kartik/www/testrun/public”. In my case “/home/kartik/www/” is my Document Root

  • Now type sudo a2ensite [your-name].localhost. This enables the virtual host
  • Now restart Apache by sudo /etc/init.d/apache2 restart
  • Now download all the files from the server and just copy them into your project folder. Replace all of them.
  • Insert this line into your index.php file inside the public directory :

    This includes the Zend Library.

  • Now open a browser and type ” http://[your-name].localhost . Your homepage should show up

Tada !! You just got your local copy working. Happy Debugging !!

#zftalk on irc.freenode.net
Zend Framework

Comments as always are highly welcome. If anyone faces a problem, please leave it as a comment