Configure Zend framework in Ubuntu 10.10

Source: Internet
Author: User
Tags php source code zend framework

Introduction: This is a detailed page for configuring Zend framework in Ubuntu 10.10. It introduces PHP, related knowledge, skills, experience, and some PHP source code.

Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 334919 'rolling = 'no'>

I have never used frameworks to develop websites. I have always written all of them by myself and found that the efficiency is very slow.
Finally, the zendframework is successfully configured under ubuntu10.10.

Step 1
Open the rewrite module of Apache, because this step must be executed when Apache is used in Ubuntu.

1 Sudo a2enmod rewrite # activate the rewrite Module
2 Sudo/etc/init. d/apache2 restart # restart the Apache server after activation

Step 2
, Install Zend framework

1 sudo apt-get install zend-framework

The system automatically installs dependency packages, including bin and php5-cli. After successful installation, the Zend library is located in the/usr/share/PHP/libzend-framework-PHP Directory.

Step 3
, Configure the include_path path information. Modify the zend-framework.ini under the/etc/PhP5/CONF. d directory, remove the semicolon before include_path, save and exit.

Step 4
Run the ZF command to create a web application. Run the command line to enter the/usr/bin directory and enter

1 sudo zf create project

Then, enter the project path (arrange the project path according to your preferences). Some subdirectories such as application public appear in the specified directory, in this way, a ZF-based Web application is successfully created. Here, my project name is zftest.

Step 5
, Configure Apache information about this project. Because the default Apache web directory is under/var/WWW
Apache automatically locates the web application under the specified directory. Here we create a configuration file about zftest in/etc/apache2/CONF. D, called
Zftest. conf. The file content is:

01 <IfModule alias_module>
02 Alias /zftest
"/home/”xxx“/ZFTest/public/"
03 <Directory
"/home/”xxx“/ZFTest/public/"
>
04 Allow from all
05 RewriteEngine on
06 RewriteBase /zftest
07 RewriteCond %{REQUEST_FILENAME} !-f
08 RewriteRule !\.(css|js|jpg|gif|png|swf|flv)$ index.php
09 Options FollowSymlinks MultiViews
10 AllowOverride All
11 </Directory>
12 </IfModule>

Step 6
, Modify the. htaccess file in public .. Htaccess is a hidden file. You can view and display the hidden file. The file content is as follows:

1 RewriteEngine On
2 RewriteBase /zftest
3 RewriteCond %{REQUEST_FILENAME} -s [OR]
4 RewriteCond %{REQUEST_FILENAME} -l [OR]
5 RewriteCond %{REQUEST_FILENAME} -d
6 RewriteRule ^.*$ - [NC,L]
7 RewriteRule ^.*$ index.php [NC,L]

Step 7
, Restart the Apache server

1 sudo /etc/init.d/apache2 restart

Enable http: // 127.0.0.1/zftest to display

1 Welcome to the Zend Framework!
2 This is your project's main page

Even if the configuration is successful.

More articles on "Configuring Zend framework in Ubuntu 10.10"

Love J2EE follow Java Michael Jackson video station JSON online tools

Http://biancheng.dnbcw.info/php/334919.html pageno: 10.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.