Home > centOS, Fedora 12, PHP, Unix/Linux, Zend > Zend tutorial Zend framework tutorial Zf tutorial Zend getting started Zend quickstart

Zend tutorial Zend framework tutorial Zf tutorial Zend getting started Zend quickstart

Requirements:

[root@www ~]# uname -a
Linux http://www.shamun.be 2.6.18-164.11.1.el5 #1 SMP Wed Jan 20 07:39:04 EST 2010 i686 i686 i386 GNU/Linux

[root@www ~]# php -v
PHP 5.2.12
(cli) (built: Jan 31 2010 11:31:11)
Copyright (c) 1997-2009 The PHP GroupZend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies

[root@www ~]# mysql –version
mysql Ver 14.12 Distrib 5.0.90, for redhat-linux-gnu (i686) using readline 5.1

[root@www ~]# httpd -v
Server version: Apache/2.2.3
Server built: Nov 12 2009 18:43:47

Installation:

a. Find existing php

[root@www ~]# whereis php
php: /usr/bin/php /etc/php.d /etc/php.ini /usr/lib/php /usr/include/php /usr/share/php /usr/share/man/man1/php.1.gz

b. vi /etc/php.ini (add the bold path)

[root@www ~]# grep include_path /etc/php.ini

; (directory must also be in include_path or full path must
;include_path = “.:/php/includes”

include_path = “.:/usr/share/pear:/usr/share/php:/root/zend/library

;include_path = “.;c:\php\includes”


c. Now the basic uses of zf using include_path is working, thats all zend wants

[root@www ~]# zf show version
Zend Framework Version: 1.10.1


Getting started:

1. Making the zend first stage.
Practical Steps
[root@www html]# pwd/var/www/html

[root@www html]# zf create project myzf

Creating project at /var/www/html/myzf

Note: This command created a web project, for more information setting up your VHOST,
please see docs/README

[root@www myzf]# tree

.

|– application

| |– Bootstrap.php

| |– configs

| | `– application.ini

| |– controllers

| | |– ErrorController.php

| | `– IndexController.php

| |– models

| `– views

| |– helpers

| `– scripts

| |– error

| | `– error.phtml

| `– index

| `– index.phtml

|– docs

| `– README.txt

|– library (copy here the downloaded zend framwork > library )

|– public

| `– index.php

`– tests

|– application

| `– bootstrap.php

|– library

| `– bootstrap.php

`– phpunit.xml

15 directories, 11 files

[root@www myzf]#

[root@www zend]# cp -r library/ /var/www/html/myzf/

[note]: till here if i visit http://localhost/myzf/public , i will get error page

[note]: after modifying this to my /etc/httpd/conf/httpd.conf file at the end and restart apache

visit: http://dummy.com

[root@www conf]# tail -100 httpd.conf

<VirtualHost *:80>

ServerName dummy.com

DocumentRoot /var/www/html/myzf/public

SetEnv APPLICATION_ENV “development”

<Directory /var/www/html/myzf/public>

DirectoryIndex index.php

AllowOverride All

Order allow,deny

Allow from all

</Directory>

</VirtualHost>

gives:

1. Create a zend project

2. Original zend library to project library copy past

3. Setting only one time the httpd.conf file

4. Target complete



Categories: centOS, Fedora 12, PHP, Unix/Linux, Zend
  1. No comments yet.
  1. No trackbacks yet.

Leave a comment