PHP-CGI 未加载扩展

发布于 2024-08-03 02:52:05 字数 721 浏览 0 评论 0原文

我有一个运行 PHP-GCI 5.3.0 的本地服务器,但是当我运行 phpinfo() 时,它显示正常信息,但有扩展名。

没有任何关于扩展的内容,我正在使用其正常的 ext 文件夹。

这可能与我的文件夹有空格有关吗? (即这是我的 php.ini C:\Arquivos de programas\Winco\Winconnection4\php.ini

我需要在使用 CGI 时做一些不同的事情来加载扩展?

这是我的 php.ini:

[PHP] zend_extension="ext/php_xdebug-2.0.5-5.3-vc6.dll"
register_globals=关闭
安全模式=开启
cgi.force_redirect = 关闭
扩展目录=“扩展名”
session.bug_compat_warn=关闭;

#ATIVANDO A COMPACTAÇË DA PAGINA
#zlib.output_compression = 开

error_reporting = E_ALL & ~E_通知

显示错误=打开

扩展名=php_sqlite3.dll

I have a local server running PHP-GCI 5.3.0, but when I run phpinfo() it shows me normal information, but extensions.

There are nothing about extensions, and I'm using its normal ext folder.

Could this be related to my folder having spaces? (i.e. this is my php.ini C:\Arquivos de programas\Winco\Winconnection4\php.ini)

I need to do something different to load extensions while using CGI?

This is my php.ini:

[PHP]
zend_extension="ext/php_xdebug-2.0.5-5.3-vc6.dll"
register_globals=Off
safe_mode = on
cgi.force_redirect = Off
extension_dir="ext"
session.bug_compat_warn=Off;

#ATIVANDO A COMPACTAÇÃO DA PAGINA
#zlib.output_compression = On

error_reporting = E_ALL & ~E_NOTICE

display_errors = on

extension=php_sqlite3.dll

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

未蓝澄海的烟 2024-08-10 02:52:05

这里有一些提示;运气好的话,其中一个可能会有所帮助:

  • 首先,您确定正在编辑正确的 php.ini 文件吗?您的计算机上可能有多个(例如,一个位于 windows/system32 目录中;另一个位于 PHP 安装目录中); phpinfo() 在输出中显示加载了哪个 php.ini 文件;确保您修改的是正确的;-)
  • 当使用 zend_extension 加载 Zend 扩展时,您应该使用绝对路径;请参阅 Xdebug - 安装
  • 对于 extension_dir 使用绝对路径怎么样?
  • 如果我没记错的话,你应该使用“;” .ini 文件中的注释不是“#”

如果您尝试通过命令行启动 PHP,您会收到任何错误吗? Apache 的日志文件也一样吗?

希望其中之一能有所帮助......

Here a a couple of pointers ; with a bit of luck, one of those might be helpful :

  • first of all, are you sure you are editing the right php.ini file ? there could be several of those on your computer (for instance, one in the windows/system32 directory ; and another one in the PHP installation directory) ; phpinfo() says in the output which php.ini file is loaded ; make sure you are modifying the right one ;-)
  • When using zend_extension to load a Zend Extension, you should use an absolute path ; see Xdebug - Installation
  • what about using an absolute path for extension_dir ?
  • If I rememeber correctly, you should use ";" not "#" for comments in .ini files

If you try launching PHP via the command line, do you get any error ? Same in Apache's log file ?

Hoping one of those will help...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文