PHP正在c:\windows中寻找php.ini文件 [英] PHP is looking for php.ini file in c:\windows

查看:41
本文介绍了PHP正在c:\windows中寻找php.ini文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如安装txt建议的那样,我把我的php.ini文件留在了

c:\ php目录...但是运行phpinfo()显示我的php.ini

文件位于c:\ windows中,如下所示。


配置文件(php.ini路径) - C:\ WINDOWS

嗯,我的windows目录中没有php.ini文件,所以我不确定

在哪里得到它的配置设置...除非我想如果没有找到php.ini文件,那么它们会被内置到可执行文件中。

我的问题是 - 为什么php没有找到我的php.ini文件

位于c:\ php目录?我宁愿不把它移到

windows目录,所以我可以像

安装文件所说的那样保持一切美观。


顺便说一句 - 这是一台全新的笔记本电脑,我正在安装PHP,因此在c:\windows目录中有(我只需要双重检查)没有PHP.ini文件。

路径设置为包含c:\ php ...并打开DOS提示符并键入

" php"是一个可识别的命令,无论我当前的目录。

这是我遇到同样问题的第二台机器。我仍然感到很困惑...


有什么想法吗?


谢谢

As the installation txt suggests, I have left my php.ini file inside
the c:\php directory... but running phpinfo() shows that my php.ini
file is in c:\windows as shown below.

Configuration File (php.ini path) - C:\WINDOWS

Well there is no php.ini file in my windows directory, so I''m not sure
where it''s getting it''s configuration settings from... unless I suppose
they''re built into the executable somewhere if no php.ini file is
found. My questions is - why php is not locating my php.ini file that
is located in the c:\php directory? I''d rather not move it to the
windows directory so I can keep everything nice and tidy like the
installation file suggests.

BTW - This is a brand new laptop I''m installing PHP on so there is (I
just double checked) no PHP.ini file in the c:\windows directory. The
path is set to include c:\php... and opening a DOS prompt and typing
"php" is a recognizable command regardless of my current directory.
This is the 2nd machine I have had this same problem with. I''m still
confused...

Any thoughts?

thanks

推荐答案



~john写道:

~john wrote:

作为安装txt建议,我把我的php.ini文件留在了

c:\ php目录...但运行phpinfo()显示我的php.ini

文件位于c:\ windows中,如下所示。


配置文件(php.ini路径) - C:\ WINDOWS


好吧,我的windows目录中没有php.ini文件,所以我不确定

它从哪里得到它的配置设置...除非我想

如果找不到php.ini文件,那么它们会被内置到可执行文件中。我的问题是 - 为什么php没有找到我的php.ini文件

位于c:\ php目录?我宁愿不把它移到

windows目录,所以我可以像

安装文件所说的那样保持一切美观。


顺便说一句 - 这是一台全新的笔记本电脑,我正在安装PHP,因此在c:\windows目录中有(我只需要双重检查)没有PHP.ini文件。

路径设置为包含c:\ php ...并打开DOS提示符并键入

" php"是一个可识别的命令,无论我当前的目录。

这是我遇到同样问题的第二台机器。我仍然感到很困惑...


有什么想法吗?


谢谢
As the installation txt suggests, I have left my php.ini file inside
the c:\php directory... but running phpinfo() shows that my php.ini
file is in c:\windows as shown below.

Configuration File (php.ini path) - C:\WINDOWS

Well there is no php.ini file in my windows directory, so I''m not sure
where it''s getting it''s configuration settings from... unless I suppose
they''re built into the executable somewhere if no php.ini file is
found. My questions is - why php is not locating my php.ini file that
is located in the c:\php directory? I''d rather not move it to the
windows directory so I can keep everything nice and tidy like the
installation file suggests.

BTW - This is a brand new laptop I''m installing PHP on so there is (I
just double checked) no PHP.ini file in the c:\windows directory. The
path is set to include c:\php... and opening a DOS prompt and typing
"php" is a recognizable command regardless of my current directory.
This is the 2nd machine I have had this same problem with. I''m still
confused...

Any thoughts?

thanks



嗯..要么停止IIS然后将php.ini复制到\窗口,要么更改配置文件中的

路径设置。


Well.. either stop IIS then copy the php.ini to \windows, or change the
path setting in your config file.




~john写道:

~john wrote:

正如安装txt所示,我将我的php.ini文件留在了

c:\ php目录...但运行phpinfo()表明我的php.ini

文件在c中: \窗口如下图所示。


配置文件(php.ini路径) - C:\ WINDOWS


那么没有php .ini文件在我的windows目录中,所以我不确定

哪里有它的配置设置......除非我想

如果找不到php.ini文件,那么它们就被内置到可执行文件中。我的问题是 - 为什么php没有找到我的php.ini文件

位于c:\ php目录?我宁愿不把它移到

windows目录,所以我可以像

安装文件所说的那样保持一切美观。


顺便说一句 - 这是一台全新的笔记本电脑,我正在安装PHP,因此在c:\windows目录中有(我只需要双重检查)没有PHP.ini文件。

路径设置为包含c:\ php ...并打开DOS提示符并键入

" php"是一个可识别的命令,无论我当前的目录。

这是我遇到同样问题的第二台机器。我仍然感到很困惑...


有什么想法吗?


谢谢
As the installation txt suggests, I have left my php.ini file inside
the c:\php directory... but running phpinfo() shows that my php.ini
file is in c:\windows as shown below.

Configuration File (php.ini path) - C:\WINDOWS

Well there is no php.ini file in my windows directory, so I''m not sure
where it''s getting it''s configuration settings from... unless I suppose
they''re built into the executable somewhere if no php.ini file is
found. My questions is - why php is not locating my php.ini file that
is located in the c:\php directory? I''d rather not move it to the
windows directory so I can keep everything nice and tidy like the
installation file suggests.

BTW - This is a brand new laptop I''m installing PHP on so there is (I
just double checked) no PHP.ini file in the c:\windows directory. The
path is set to include c:\php... and opening a DOS prompt and typing
"php" is a recognizable command regardless of my current directory.
This is the 2nd machine I have had this same problem with. I''m still
confused...

Any thoughts?

thanks



嗯..要么停止IIS然后将php.ini复制到\窗口,要么更改配置文件中的

路径设置。


Flamer。


Well.. either stop IIS then copy the php.ini to \windows, or change the
path setting in your config file.

Flamer.


嗨John,

Hi John,


好吧,我的windows目录中没有php.ini文件,所以我不确定

哪里有它的配置设置...除非我想

如果没有找到php.ini文件,那么它们会内置到可执行文件中。我的问题是 - 为什么php没有找到我的php.ini文件

位于c:\ php目录?我宁愿不把它移到

windows目录,所以我可以像

安装文件建议的那样保持一切美观。
Well there is no php.ini file in my windows directory, so I''m not sure
where it''s getting it''s configuration settings from... unless I suppose
they''re built into the executable somewhere if no php.ini file is
found. My questions is - why php is not locating my php.ini file that
is located in the c:\php directory? I''d rather not move it to the
windows directory so I can keep everything nice and tidy like the
installation file suggests.



有几个选项可以实现这一目标。我通常使用

环境变量PHPRC。将它设置为php.ini

所在的文件夹(在你的情况下为C:\ PHP)。

其他选项请参阅: http://nl3.php.net/manual/en/configuration.php

HTH。

彼得。

-
http://www.phpforums.nl


这篇关于PHP正在c:\windows中寻找php.ini文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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