我的php.ini是从哪里加载的? [英] From where is my php.ini being loaded?

查看:100
本文介绍了我的php.ini是从哪里加载的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行



我们可以看到 php.ini 应该位于

  / usr / local / etc / php 

这就是我在/ usr / local / etc /

中的内容



但是里面没有php.ini。



另一方面,我有php.ini内部





所以,我的php.ini到底是从哪里加载的?



我们甚至没有运行php进程,但是php似乎还可以-在phpinfo中显示



解决方案

尝试作为答案:



它根本不存在,这意味着php将运行默认选项。



查看您的docker文件,它从一个干净的操作系统开始,在其中安装了Apache和PHP。但是它从未将PHP安装中的php.ini文件复制到/ usr / local / etc / php中。实际上,在第31和32行中,它创建了conf.d目录。



所以我建议在docker文件的末尾添加要复制的代码php.ini-production到/usr/local/etc/php.ini,并根据需要进行编辑。或使用默认选项。


I am running this Docker instance of a linux debian:jessie with php 5.6.

This is part of my phpinfo :

As we can see the php.ini should be located at

/usr/local/etc/php

And this is what I have inside /usr/local/etc/

But there is no php.ini inside it.

I the other hand, I have the php.ini inside

So, from where exactly is my php.ini being loaded?

We dont even have a php process running but the php seems to be ok - being displayed phpinfo in the screen.

解决方案

Let try it as an answer:

It does not exist at all, which means php will run the default options.

Look at your docker file, it starts from a "clean" OS, installs Apache and PHP in it. But it never copies the php.ini file from the PHP installation into /usr/local/etc/php. Actually in lines 31 and 32 it creates the conf.d directory but that is it.

So I would suggest, at the end of your docker file, add code to copy php.ini-production to /usr/local/etc/php.ini, and edits as required. Or use default options.

这篇关于我的php.ini是从哪里加载的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆