Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/255.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
windows下的php扩展dll_Php_C++_Fastcgi - Fatal编程技术网

windows下的php扩展dll

windows下的php扩展dll,php,c++,fastcgi,Php,C++,Fastcgi,我有以下问题: 我以fastcgi IIS 7.5 windows 2008 R2 64位运行php 现在我用html编写测试函数。我将此dll编译为php扩展Visual 2012。我将其复制到php\ext文件夹 #include "stdafx.h" #include "php_ext.h" //#define PHP_COMPILER_ID "VC9" ZEND_FUNCTION(use_html); zend_function_entry use_functions[] =

我有以下问题: 我以fastcgi IIS 7.5 windows 2008 R2 64位运行php

现在我用html编写测试函数。我将此dll编译为php扩展Visual 2012。我将其复制到php\ext文件夹

#include "stdafx.h"
#include "php_ext.h"


//#define PHP_COMPILER_ID  "VC9"

ZEND_FUNCTION(use_html);

zend_function_entry use_functions[] =
{
    ZEND_FE(use_html, NULL)
    {NULL, NULL, NULL}
};

zend_module_entry use_html_module_entry =
{
    STANDARD_MODULE_HEADER,
    "Use Html",
    use_functions,
    NULL, NULL, NULL, NULL, NULL,
    "1.0.0-tutorial",
    STANDARD_MODULE_PROPERTIES
};

ZEND_GET_MODULE(use_html);

ZEND_FUNCTION(use_html)
{
     //bool useHtml;
     //if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &useHtml) == FAILURE)
     //{
     //    E_ERROR;
     //    return;
     //}
     //if(useHtml)
     //{
         php_printf("This string uses <a href='#'>Html</a>");
     //}
     //else
     //{
     //    php_printf("This string does not Html");
     //}
     return;
}
如果我调用phpinfo,它就会工作;-我看到使用Html扩展是必要的;如果我在php脚本中调用函数use_htmltrue,它将不起作用

我总是从IIS服务器获取异常 HTTP错误500.0-内部服务器错误 C:\php-5.4.6-Win32-VC9-x86\php-cgi.exe-FastCGI进程意外退出


Qouestion:它必须始终使用相同的编译器版本进行编译??或者???

您是否在php.ini extension=php_myExtension.dll中添加了它并重新启动了IIS?HTTP错误500没有说明任何特殊情况。查看日志以查看到底发生了什么。我的IIS中的日志2012-09-10 12:54:13::1 GET/phpinfo.php-80-::1 Mozilla/5.0+兼容+MSIE+9.0+Windows+NT+6.1+WOW64+三叉戟/5.0500255 2745。是否可以激活调试日志或类似的内容?