论坛首页 编程语言技术论坛

Appserv php_exif.dll 未加载的bug解决 以及Zend_Tool的使用

浏览 3806 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2010-07-16   最后修改:2010-07-16
PHP
问题 写道
日志信息
PHP Startup: Unable to load dynamic library D:/AppServ/php5/ext/php_exif.dll

在控制台输入 php -v 则爆出 php_mbstring.dll未加载


 

http://www.onbno.com/?p=391 中答案,谢谢这位大哥

 

写道
写了一个导入数据的程序,发现老是执行到一半就直接报页面不能载入的错误
查日志发现了一条

PHP Warning: PHP Startup: Unable to load dynamic library ‘e:/AppServ/php5/ext\\php_exif.dll’ – \xd5\xd2\xb2\xbb\xb5\xbd\xd6\xb8\xb6\xa8\xb5\xc4\xc4\xa3\xbf\xe9\xa1\xa3\r\n in Unknown on line 0

于是上网搜索 关于 php_exif.dll的加载问题,发现了一条关于php分配内存和php_exif.dll的内容,眼前一亮,意识到可能是php分配内存不成功导致页面不能访问
原来php_exif.dll要求php_mbstring.dll引伸使能。 并且必须在php_exif.dll 之前使能php_mbstring.dll,所以
php_mbstring.dll必须在php_exif.dll加载之前加载,可惜php.ini的加载顺序是按字母顺序排的,手动改加载顺序,重启 apache,OK!

 

 

在 PHP.INI中 将 php_exif.dll 放置到 php_mbstring.dll之后 就行

 

 

这个问题解决之后,使用Zend_Tool 来从控制台创建就没有问题了

 

例如: 将 ZendFramework-1.10.6-minimal.tar.gz 解压缩到D盘 ,并将其下的bin目录加到环境变量中

 

打开控制台界面,输入 zf.bat create project zfbookstore

写道
Creating project at D:/zfiamsese/zfbookstore
Note: This command created a web project, for more information setting up your V
HOST, please see docs/README

 

成功 呵呵

 

   发表时间:2010-07-16  
引用

Zend Framework Command Line Console Tool v1.10.6
Usage:
    zf [--global-opts] action-name [--action-opts] provider-name [--provider-opts] [provider parameters ...]
    Note: You may use "?" in any place of the above usage string to ask for more specific help information.
    Example: "zf ? version" will list all available actions for the version provider.

Providers and their actions:
  Version
    zf show version mode[=mini] name-included[=1]
    Note: There are specialties, use zf show version.? to get specific help on them.

  Config
    zf create config
    zf show config
    Note: There are specialties, use zf enable config.? to get specific help on them.
    Note: There are specialties, use zf disable config.? to get specific help on them.

  Phpinfo
    zf show phpinfo

  Manifest
    zf show manifest

  Profile
    zf show profile

  Project
    zf create project path name-of-profile file-of-profile
    zf show project
    Note: There are specialties, use zf show project.? to get specific help on them.

  Application
    zf change application.class-name-prefix class-name-prefix

  Model
    zf create model name module

  View
    zf create view controller-name action-name-or-simple-name

  Controller
    zf create controller name index-action-included[=1] module

  Action
    zf create action name controller-name[=Index] view-included[=1] module

  Module
    zf create module name

  Form
    zf create form name module

  Layout
    zf enable layout
    zf disable layout

  DbAdapter
    zf configure db-adapter dsn section-name[=production]

  DbTable
    zf create db-table name actual-table-name module force-overwrite
    Note: There are specialties, use zf create db-table.? to get specific help on them.

  ProjectProvider
    zf create project-provider name actions



引用


When you crate module using Zend_Tool, it is not working until this line:

resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"

is added in /application/configs/application.ini
It would be nice to have it done automatically.
(tested on latest incubator)

0 请登录后投票
   发表时间:2010-07-16  
创建module模块下的Index  控制器
引用
zf create controller Index  --module=admin
0 请登录后投票
   发表时间:2010-07-16  
引用
>zf create action login -c Index  -m admin

创建一个 action
0 请登录后投票
   发表时间:2010-07-23  
此时会出现问题,一个是类自动加载,第二个不能找到model,解决方法

1. 解决 类自动加载
application/Bootstrap.php 文件中的构造函数改成
public function __construct($application){
		// 设置类自动加载
		$application->getAutoloader()->setFallbackAutoloader($application->getOption('classfallbackautoloader'));
		parent::__construct($application);
	}


2. 解决 不能找到model
在配置文件中加入: includePaths.models = APPLICATION_PATH "/models"
例如
[production]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
includePaths.library = APPLICATION_PATH "/../library"
includePaths.models = APPLICATION_PATH "/models"

bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.frontController.params.displayExceptions = 0

classfallbackautoloader = 1

[staging : production]

[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1



0 请登录后投票
论坛首页 编程语言技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics