本文介绍了无法找到"扩展"我的php.ini文件的一部分,在Apache 2.0的,在哪里呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图增加对在我的Ubuntu,阿帕奇2,PHP框中GD扩展支持。但是我的php.ini文件似乎并没有相同的INI文件的大多数版本,看来,他们没有;扩展的意见或为他们的占位符。在哪里做这种举动?是他们添加扩展的新位置和新的方法?

I'm trying to add support for the GD extension on my Ubuntu, Apache 2, php box. However my php.ini file does not seem to be the same as most versions of the INI file and it appears that their are no ;extensions comments or a place holder for them. Where did this move to? Is their a new location or new method for adding extensions?

我不知所措,我只找到2的php.ini文件。一个为Apache 2,一个用于命令行界面。

I'm at a loss, I only found 2 php.ini files. One for Apache 2 and one for the command line interface.

最后我问这个问题,因为错误的正常修复未定义抵消:1 [...] images.php上线50致命错误:调用未定义功能imagecreatefrompng()[.. ]线309的functions.php 不起作用。

Ultimately I'm asking this question because the normal fix for the error Undefined offset: 1 in [...]images.php on line 50 Fatal error: Call to undefined function imagecreatefrompng() in [...]functions.php on line 309 does not work.

推荐答案

大多数发行版,Ubuntu的收录,一般保持PHP扩展.ini文件从主.ini文件中一个单独的子目录。

Most distros, Ubuntu included, generally keep PHP extensions' .ini files in a seperate sub-dir from the main .ini file.

您应该有一个的/ etc / PHP5 目录,用 conf.d 子DIR为主要配置和阿帕奇 CLI 子显示目录的各个版本。

You should have a /etc/php5 directory, with conf.d sub-dir for the main configuration, and apache and cli sub-dirs for the individual versions.

不过,Ubuntu有一个PHP5-GD包,它会自动安装扩展,因此黑客攻击了.ini文件不应该是必要的,除非你有编译GD自己。

However, Ubuntu has a php5-gd package which will install the extension automatically, so hacking up the .ini files should NOT be necessary, unless you have to compile a specific version of GD yourself.

这篇关于无法找到"扩展"我的php.ini文件的一部分,在Apache 2.0的,在哪里呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 05:40