windows下Zendframe Work 框架的建立

1,配置虚拟主机: apache文档里详细说明了各种配置方法这里用的是第一种:同一个IP不同的主机

     首先,加载:LoadModule rewrite_module modules/mod_rewrite.so

之后,在apache配置文件中加入:

NameVirtualHost 127.0.0.1:808
<VirtualHost 127.0.0.1:808>
        ServerName localhost
        DocumentRoot D:/AppServ/www
        RewriteEngine Off
</VirtualHost>

<VirtualHost 127.0.0.1:808>
        ServerName phpweb
        DocumentRoot D:/AppServ/www/php20/htdocs
        RewriteEngine Off
        RewriteCond %{REQUEST_URI} !^.*(/.css|/.js|/.gif|/.png|/.jpg|/.jpeg)$
        RewriteRule ^(/.*)$ /index.php
</VirtualHost>

同时确保listen 相应端口

最后, 修改C:/WINDOWS/system32/drivers/etc/hosts

127.0.0.1       localhost

127.0.0.1        phpweb

×记得重启服务器

2,Fatal error: Uncaught exception 'Zend_Config_Exception' with message 'syntax error, unexpected $end in ../settings.ini on line 13 ' in D:/AppServ/php6/library/Zend/Config/Ini.php:117 Stack trace: #0 D:/AppServ/www/php20/htdocs/index.php(7): Zend_Config_Ini->__construct('../settings.ini', 'development') #1 {main} thrown in D:/AppServ/php6/library/Zend/Config/Ini.php on line 117
解: 结构错误异常的末尾在../settings.ini on line 13 。到那个文件里最后一行加了一个空格,问题解决

3,Fatal error: Uncaught exception 'Zend_Log_Exception' with message '"/var/www/phpweb20/data/logs/debug.log" cannot be opened with mode "a"' in D:/AppServ/php6/library/Zend/Log/Writer/Stream.php:66 Stack trace: #0 D:/AppServ/www/php20/htdocs/index.php(12): Zend_Log_Writer_Stream->__construct('/var/www/phpweb...') #1 {main} thrown in D:/AppServ/php6/library/Zend/Log/Writer/Stream.php on line 66
解:好好看看,问题在路径上。这也是这本书中一个很大的问题,网站上下载的代码很多都是Linux的路径写的都不对应该针对windows的实际情况改过来。

4,Warning: Zend_Loader::include_once(Templater.php) [zend-loader.include-once ]: failed to open stream: No such file or directory in D:/AppServ/php6/library/Zend/Loader.php on line 83

Warning: Zend_Loader::include_once() [function.include ]: Failed opening 'Templater.php' for inclusion (include_path='.;c:/php/includes;D:/AppServ/php6/library') in D:/AppServ/php6/library/Zend/Loader.php on line 83

Fatal error: Class 'Templater' not found in D:/AppServ/www/php20/htdocs/index.php on line 33

找不到 Templater 类 这个类当然不在 php的那些目录里,那怎么办改php的配置文件?牺牲太大了,这里可以加载一些路径:set_include_path (".;c:/php/includes;D:/AppServ/php6/library;D:/AppServ/www/php20/include");

5,Strict standards: strftime() [function.strftime ]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /var/www/newframe/libs/jpgraph-2.3/src/jpgraph.php on line 357

解: 这里好像是一个关于时间的问题 在.htaccess里写上

php_value date.timezone Asia/Chongqing
php_value magic_quotes_gpc 0
php_value magic_quotes_runtime 0

6,关于.htaccess文件没有文件名如何创建: 不要再上传文件了直接用写字板另存为所有格式就可以了,多简单。

7,Fatal error: Uncaught exception 'Zend_Db_Adapter_Exception' with message 'The PDO extension is required for this adapter but not loaded'

php.ini去掉
;extension=php_pdo.dll
;extension=php_pdo_mysql.dll
这两项前的分号,重启apache!

8,Fatal error: Uncaught exception 'Zend_Db_Adapter_Exception' with message 'The mysql driver is not currently installed'

extension=php_pdo_ mysql.dll这项扩展打开,就完成了,如果没有这项扩展,你可以自行添加。

 

你可能感兴趣的:(windows,exception,timezone,include,Zend,extension)