<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>潘锦的空间 &#187; zend framework</title>
	<atom:link href="https://www.phppan.com/tag/zend-framework/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.phppan.com</link>
	<description>SaaS SaaS架构 团队管理 技术管理 技术架构 PHP 内核 扩展 项目管理</description>
	<lastBuildDate>Sat, 04 Apr 2026 01:19:58 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.9.40</generator>
	<item>
		<title>第一次用zend framework遇到的一些问题</title>
		<link>https://www.phppan.com/2009/12/zend-framework-question/</link>
		<comments>https://www.phppan.com/2009/12/zend-framework-question/#comments</comments>
		<pubDate>Sat, 12 Dec 2009 01:36:57 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.phppan.com/?p=423</guid>
		<description><![CDATA[1、出现错误 Zend_Controller_Dispatcher_Exception: Invalid co [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>1、出现错误 Zend_Controller_Dispatcher_Exception: Invalid controller specified (error) in Standard.php on line 242<br />
此时是应用程序出错，zend framework在默认情况下将错误指向error controller，而此时却没有创建此contraller，所以会出现此问题。<br />
解决方案是在controller下面建立ErrorController.php 加errorAction事件；并在views/scripts建立文件夹error，建立error.phtml文件</p>
<p>2、在apache中使用别名浏览zend framework创建的项目时，可能存在路由不通的情况，<br />
     即文件夹的名字要与路径名字对应，如果你是http://localhost/zf/public/customers<br />
这样的访问路径，则项目根目录应该是zf,index.php所在的目录是public</p>
<p>3、.htaccess文件无法生效，可能存在的问题：<br />
   apache的mod_rewrite没有开启，<br />
  或者.htaccess文件语法错误，比如说在[NC,L]这种格式中加一个空格，出现错误的单词；不过此种情况下会报错：Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request.<br />
  或者，在apache的配置中  Options 没有设置为FollowSymLinks, AllowOverride 没有设置成All<br />
或者，在apache的错误日志中显示 Invalid command &#8216;RewriteEngine&#8217;, perhaps misspelled or defined by a module not included in the server configuration<br />
这个是没有开启mod_rewrite模块，加载rewrite模块，在httpd.conf文件里最后加上如下代码：<br />
LoadModule rewrite_module modules/mod_rewrite.so<br />
或者原本配置文件中的就有这行代码，只不过是注释了，也可以直接去掉LoadModule rewrite_module modules/mod_rewrite.so前的注释“#”</p>
<p>这些都是有可能出问题的。</p>
<p>4、权限问题<br />
  将zend framework的library放在没有权限的目录，比如说放在php.ini中的open_basedir以外的地方等等</p>
<p>5、出现404错误<br />
可能是apache的DocumentRoot设置问题（如果是使用别名调试）</p>
]]></content:encoded>
			<wfw:commentRss>https://www.phppan.com/2009/12/zend-framework-question/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
