Zend Framework 1 tutorial

      Be sure the path of zend framework doesn’t have spaces in parent directories!

  1.  Define the environment variables of PHP:

·         Adding php.exe to path environment variable
·         Test that PHP is working through typing in cmd console
Php –v, it must show the PHP version.

     2. Define the environment variables of ZEND framework:

·         Add zf.bat to the path environment variable
·         Test zend in cmd console through typing
Zf create project test, it must create project in the same path of zend package.

Before testing, restart for PC is needed.

Through defining PHP environment variable, if you face the following problem
Go to winodows\php.ini and uncomment these two lines


and be sure that php_mbstring.dll includes before php_exif.dll

           3.   Add php.exe and zf to netbeans tools-> options  
           4.  Enable mod_rewrite in httpd.conf in conf folder..
·         Uncomment this line LoadModulerewrite_module modules/mod_rewrite.so
Restart for apache server is needed!

·         Andmake the value of AllowOverride all in the directory tag in the same file

<Directory />
     Options FollowSymLinks ExecCGI Indexes
    AllowOverride all
     Order deny,allow
     Deny from all
     Satisfy all

        5. Add the path of zend framework library  to the include_path in PHP.ini file
E.g: include_path = ".;c:\php\includes;E:\GCC\ZendFramework-1.11.11\library"

        6. Create first project of zendframewok through cmdconcole
Zf  create project quickstart

         7.  Creating Virtual host

·         Activate virtual host command in httpd.conf
     Remove comment from this line Include conf/extra/httpd-vhosts.conf
·         In  C:\Windows\System32\drivers\etc    

TIP:If you face permission problems, then open properties of host file and grant edit permission for the user.

·         Define the project path and the server name in httpd-vhost.conf in D:\wamp\bin\apache\Apache2.2.21\conf\extrafoder
You should write the following tags.

<VirtualHost *:80>
DocumentRoot "C:/AppServ/www/zf/quickstart/public"
ServerName quickstart

You should add the following lines to the same file httpd-vhost.conf in order not to make conflict between the host and whole server
                          <Directory c:/appserv/www>
                                  Order Deny,Allow
                                    Allow from all
                           <VirtualHost *:80>
                                   DocumentRoot c:/appserv/www
                                   ServerName localhost

     8.   Prevent proxy of the url of this project

            9.   Now open the URL of the project

Eg: quickstart                                               
        The index page of project will be shown

                   Congratulation you setup the configurations of ZEND framework successfully :)

No comments:

Post a Comment