我正在使用在命令行中启动 php 的 Drush。我将我的初始 php.ini 复制到我的本地目录中,以便 php 使用相同的配置,就好像它是由 Web 服务器启动的一样。与 Web 服务器一起使用时,它运行良好。不幸的是,当使用命令行启动时,当 drush 调用 mysqli_fetch_array 和/或 mysqli_fetch_object 时 PHP 崩溃,而调用 mysqli_fetch_row 时一切正常……我在 Windows 下使用 EasyPHP 5.2.10。
错误消息: php.exe [5772] 中出现未处理的 win32 异常。Just-In_time 调试此异常失败,并出现以下错误:没有安装的调试器启用了 Just-In_time 调试。在 Visual Studio 中,可以从 Tools/Options/Debugging/Just-In-Time 启用 Just-In-Time 调试。
根据评论中的要求,这里是关于 PHP 和 MySQLi 模块的信息。 备注:Client API 库版本和 Cient API 标头版本不同。但是,在使用 web 服务器 phpinfo() 时它们是相同的......这可能是问题吗?然而,它是一个全新的 easyPHP 安装...哦。
php -v
PHP 5.2.10 (cli)(构建时间:2009 年 6 月 17 日 16:16:57) 版权所有 (c) 1997-2009 The PHP Group Zend Engine v2.2.0,版权所有 (c) 1998-2009 Zend Technologies
php -i
phpinfo() PHP 版本 => 5.2.10
系统 => Windows NT APOLLON 5.1 build 2600 构建日期 => 2009 年 6 月 17 日 16:16:01 配置命令 => cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" " --with-snapshot-template=d:\php-sdk\snap _5_2\vc6\x86\template" " --with-php-build=d:\php-sdk\snap_5_2\vc6\x86\php_build" "- -with-pdo-oci=D:\php-sdk\oracle\instantclient10\sdk,shared " "--with-oci8=D:\php-sdk\oracle\instantclient10\sdk,shared" 服务器 API => 命令行接口虚拟目录支持 => 启用配置文件 (php.ini) 路径 => C:\WINDOWS 加载的配置文件 => C:\Program Files\EasyPHP5.2.10\www\drush\php.ini 扫描此目录以获取其他 .ini files => (none) 解析的附加 .ini 文件 => (none) PHP API => 20041225 PHP Extension =>20060613 Zend Extension => 220060519 Debug Build => no Thread Safety => 启用 Zend Memory Manager => 启用 IPv6 Support => 启用 Registered PHP Streams => php, file, data, http, ftp, compress.zlib Registered Stream Socket Transports = > tcp, udp 注册流过滤器 => convert.iconv。, string.rot13, string.toupper, string.tolower, string.strip_tags, 转换。, 消耗, zlib.*
该程序使用 Zend 脚本语言引擎:Zend Engine v2.2.0,版权所有 (c) 1998-2009 Zend Technologies
配置
PHP 核心
指令 => 本地值 => 主值 allow_call_time_pass_reference => Off => Off allow_url_fopen => On => On allow_url_include => Off => Off always_populate_raw_post_data => Off => Off arg_separator.input => & => & arg_separator.output = > & => & asp_tags => 关闭 => 关闭 auto_append_file => 无值 => 无值 auto_globals_jit => 开启 => 开启 auto_prepend_file => 无值 => 无值 browscap => 无值 => 无值 default_charset => 无value => no value default_mimetype => text/html => text/html define_syslog_variables => Off => Off disable_classes => no value => no value disable_functions => no value => no value display_errors => STDOUT => STDOUT display_startup_errors = > 开启 => 开启 doc_root => 无价值 =>no value docref_ext => no value => no value docref_root => no value => no value enable_dl => On => On error_append_string => no value => no value error_log => no value => no value error_prepend_string => no value => no value error_reporting => 6143 => 6143 expose_php => On => On extension_dir => C:\Program Files\EasyPHP5.2.10\php\ext\ => C:\Program Files\EasyPHP5.2.10\php\ext \ file_uploads => On => On highlight.bg => #FFFFFF => #FFFFFF highlight.comment => #FF8000 => #FF8000 highlight.default => #0000BB => #0000BB highlight.html => #000000 => #000000 highlight.keyword => #007700 => #007700 highlight.string => #DD0000 => #DD0000 html_errors => Off => Off ignore_repeated_errors => Off => Off ignore_repeated_source => Off =>Off ignore_user_abort => Off => Off implicit_flush => On => On include_path => .;C:\php5\pear => .;C:\php5\pear log_errors => On => On log_errors_max_len => 1024 => 1024 magic_quotes_gpc => 关闭 => 关闭 magic_quotes_runtime => 关闭 => 关闭 magic_quotes_sybase => 关闭 => 关闭 mail.force_extra_parameters => 无价值 => 无价值 max_execution_time => 0 => 0 max_input_nesting_level => 64 => 64 max_input_time => - 1 => -1 memory_limit => 128M => 128M open_basedir => 无值 => 无值 output_buffering => 0 => 0 output_handler => 无值 => 无值 post_max_size => 8M => 8M 精度 => 14 => 14 realpath_cache_size => 16K => 16K realpath_cache_ttl => 120 => 120 register_argc_argv => On => On register_globals => Off =>Off register_long_arrays => Off => Off report_memleaks => On => On report_zend_debug => Off => Off safe_mode => Off => Off safe_mode_exec_dir => no value => no value safe_mode_gid => Off => Off safe_mode_include_dir => no value => 没有值 sendmail_from => 没有值 => 没有值 sendmail_path => 没有值 => 没有值 serialize_precision => 100 => 100 short_open_tag => 关闭 => 关闭 SMTP => localhost => localhost smtp_port => 25 => 25 sql.safe_mode => Off => Off track_errors => On => On unserialize_callback_func => no value => no value upload_max_filesize => 2M => 2M upload_tmp_dir => ${path}\tmp\ => ${path}\tmp \ user_dir => 无值 => 无值 variables_order => GPCS => GPCS xmlrpc_error_number => 0 => 0 xmlrpc_errors =>Off => Off y2k_compliance => On => On zend.ze1_compatibility_mode => Off => Off
[跳过]
mysqli
MysqlI 支持 => 启用客户端 API 库版本 => 5.1.42 客户端 API 标头版本 => 5.0.51a MYSQLI_SOCKET => /tmp/mysql.sock
指令 => 本地值 => 主值 mysqli.default_host => 无值 => 无值 mysqli.default_port => 3306 => 3306 mysqli.default_pw => 无值 => 无值 mysqli.default_socket => 无值 => 无值 mysqli.default_user => 无值 => 无值 mysqli.max_links => 无限 => 无限 mysqli.reconnect => 关闭 => 关闭
任何的想法?
问候。