centos 下zend framework安装手册
来源:互联网 发布:大连贵金属看盘软件 编辑:程序博客网 时间:2024/06/05 17:36
1.下载zend framework。链接自己找。
2.解压安装包。
3.cd bin;
./zf.sh --help
提示PHP Fatal error: Cannot access self:: when no class scope is active in /root/zend/library/Zend/Tool/Framework/Provider/Signature.php on line 355
这个是因为使用的是php5.1的原因。因为centos 提供的php的安装包是5.1。而zend推荐使用php5.2。
所以先升级到php5.2。方法如下:
[root@QA-Server ~]# rpm --import http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
[root@QA-Server ~]# vim /etc/yum.repos.d/utterramblings.repo
[root@QA-Server ~]# vim /etc/yum.repos.d/utterramblings.repo
[utterramblings]
name=Jason's Utter Ramblings Repo
baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
[root@QA-Server ~]# yum update php
升级完成。
执行./zf.sh --help。应该没有问题了。
然后执行./zf.sh show version 也会出错,提示你没有include_path。
然后错误提示,执行相关的设置就可以了。
安装完成后,
zf.sh create project proejct_name创建你的项目结构。
具体见zh.sh --help
然后将安装包中library->Zend 复制到你的项目中library下。
配置apache或者nginx到你的public。
注意添加rewrite规则。
然后就可以访问你的页面了
Create a virtual host
Within your httpd.conf (or httpd-vhosts.conf on some systems), you will need to do two things. First, ensure that the NameVirtualHost is defined; typically, you will set it to a value of "*:80". Second, define a virtual host:
- <VirtualHost *:80>
- ServerName quickstart.local
- DocumentRoot /path/to/quickstart/public
- SetEnv APPLICATION_ENV "development"
- <Directory /path/to/quickstart/public>
- DirectoryIndex index.php
- AllowOverride All
- Order allow,deny
- Allow from all
- </Directory>
- </VirtualHost>
There are several things to note. First, note that the DocumentRoot setting specifies the public subdirectory of our project; this means that only files under that directory can ever be served directly by the server. Second, note the AllowOverride, Order, and Allow directives; these are to allow us to use htacess files within our project. During development, this is a good practice, as it prevents the need to constantly restart the web server as you make changes to your site directives; however, in production, you should likely push the content of your htaccess file into your server configuration and disable this. Third, note the SetEnv directive. What we are doing here is setting an environment variable for your virtual host; this variable will be picked up in the index.php and used to set the APPLICATION_ENV constant for our Zend Framework application. In production, you can omit this directive (in which case it will default to the value "production") or set it explicitly to "production".
在Nginx上配置ZendFramework
location / {
if (!-e $request_filename) {
rewrite . /index.php last;
break;
}
}
在Apache上设置环境变量是使用SetEnv APPLICATION_ENV development,在Nginx里对应的语法是:
fastcgi_param APPLICATION_ENV development;
对应的配置文件是nginx/conf/fastcgi_params
- centos 下zend framework安装手册
- ubuntu下安装zend-framework
- zend framework手册
- Zend Framework中文手册
- Zend Framework手册 中文版
- Zend Framework手册 中文版
- centos下安装zend扩展
- Apache下Zend Framework的安装
- Xampp环境下安装zend framework
- Zend Framework手册中文版更新
- Zend Framework手册中文版更新
- Zend Framework手册中文版更新
- Zend Framework手册中文版更新
- Zend Framework手册中文版更新
- Zend Framework手册中文版更新
- Zend Framework手册中文版更新
- Zend Framework手册中文版更新
- Zend Framework手册中文版更新
- Sql NewId() 随机数 (转)
- asp.net获取当前时间
- 深入浅析Linux库文件的搜索路径
- 终于成为会员了……
- 使用comm在java程序中管理本地端口
- centos 下zend framework安装手册
- 修改CAS登陆后返回给客户端的数据,增加密码字段
- Stock ZS Yingliang
- JVM的垃圾回收机制详解和调优
- 十件你生命中无能为力的事
- nginx module 开发谈(2)
- Android横竖屏切换的解决方法
- js 日期正则表达式支持月日验证
- 解压密码