473,902 Members | 5,024 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP is looking for php.ini file in c:\windows

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

Jul 11 '06 #1
17 15597

~john wrote:
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

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

Jul 11 '06 #2

~john wrote:
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

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

Flamer.

Jul 11 '06 #3
Hi John,

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.
There are a few options to accomplish this. I usually use the
environment variable PHPRC. Set it to the folder where your php.ini
resides (C:\PHP in your case).
For other options see: http://nl3.php.net/manual/en/configuration.php
HTH.
Peter.
--
http://www.phpforums.nl
Jul 11 '06 #4
I don't want to move the php.ini file to my windows directory. As the
installation text suggests, I'd rather keep everything inside the
c:\php folder.

What do you mean change the path? The path of "doc_root"? It's pointed
to c:\php. Plus It's not going to do much good to change anything in
the .ini file if it's looking for the .ini file in the wrong
location... ie nothing I do in the php.ini file is going to be noticed
since it's not using it unless I copy it to the windows directory.

~john
flamer di******@hotmai l.com wrote:
~john wrote:
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


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

Flamer.
Jul 11 '06 #5
>Peter van Schie wrote:
For other options see: http://nl3.php.net/manual/en/configuration.php
>From the link...
"Please note that the SetEnv PHPRC "directory/to/phpini/" only works
when using PHP as CGI"

I'm not using the CGI

Jul 11 '06 #6
~john schreef:
>Peter van Schie wrote:
For other options see: http://nl3.php.net/manual/en/configuration.php
>>From the link...

"Please note that the SetEnv PHPRC "directory/to/phpini/" only works
when using PHP as CGI"

I'm not using the CGI
Neither am I, that's simply a faulty statement. But if you really don't
want to use the PHPRC environment variable, use the registry key for
instance. There's enough options.

Peter.

--
http://www.phpforums.nl
Jul 11 '06 #7
On 11 Jul 2006 15:26:50 -0700, "~john" <So********@gma il.comwrote:
>>Peter van Schie wrote:
For other options see: http://nl3.php.net/manual/en/configuration.php
>>From the link...

"Please note that the SetEnv PHPRC "directory/to/phpini/" only works
when using PHP as CGI"

I'm not using the CGI
That user contributed note could be much better worded. It's saying that
SetEnv in httpd.conf won't have any effect on PHP as an Apache module, because
SetEnv in httpd.conf only affects subprocesses spawned by Apache - i.e. CGI.

PHPRC works fine for PHP as Apache module when you set it as an environment
variable for the Apache process itself, i.e. you set it before Apache starts
up.

--
Andy Hassall :: an**@andyh.co.u k :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Jul 11 '06 #8
Not to be prude but all these "work-arounds" go against what the
included instructions in the official PHP download say to do. It
explicitely says "leave the php.ini file in the c:\php folder"... Did
the PHP team just make a mistake in the installation instructions or is
this a bug with the current release of PHP 5.1.4? It just seems a
little aggravating...

~john
Andy Hassall wrote:
On 11 Jul 2006 15:26:50 -0700, "~john" <So********@gma il.comwrote:
>Peter van Schie wrote:
For other options see: http://nl3.php.net/manual/en/configuration.php
>From the link...
"Please note that the SetEnv PHPRC "directory/to/phpini/" only works
when using PHP as CGI"

I'm not using the CGI

That user contributed note could be much better worded. It's saying that
SetEnv in httpd.conf won't have any effect on PHP as an Apache module, because
SetEnv in httpd.conf only affects subprocesses spawned by Apache - i.e. CGI.

PHPRC works fine for PHP as Apache module when you set it as an environment
variable for the Apache process itself, i.e. you set it before Apache starts
up.

--
Andy Hassall :: an**@andyh.co.u k :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Jul 12 '06 #9
~john wrote:
Not to be prude but all these "work-arounds" go against what the
included instructions in the official PHP download say to do. It
explicitely says "leave the php.ini file in the c:\php folder"... Did
the PHP team just make a mistake in the installation instructions or is
this a bug with the current release of PHP 5.1.4? It just seems a
little aggravating...

~john
Andy Hassall wrote:
>>On 11 Jul 2006 15:26:50 -0700, "~john" <So********@gma il.comwrote:

>>>>Peter van Schie wrote:
For other options see: http://nl3.php.net/manual/en/configuration.php

From the link...

"Please note that the SetEnv PHPRC "directory/to/phpini/" only works
when using PHP as CGI"

I'm not using the CGI

That user contributed note could be much better worded. It's saying that
SetEnv in httpd.conf won't have any effect on PHP as an Apache module, because
SetEnv in httpd.conf only affects subprocesses spawned by Apache - i.e. CGI.

PHPRC works fine for PHP as Apache module when you set it as an environment
variable for the Apache process itself, i.e. you set it before Apache starts
up.

--
Andy Hassall :: an**@andyh.co.u k :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

No, it's unclear documentation at all. All versions of PHP I've used
have been that way.

Personally I leave it in the C:\Windows folder, along with other
configuration files. But if you want to leave it in C:\php, you can
either set the environment variable or edit the registry.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Jul 12 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
12325
by: SP | last post by:
Please advice. I am not familiar with the concepts of windows service. I am trying to access a xml configuration file from windows service. But it is failing. configuration file is in the same directory from where I install windows service. I dont want to give an absolute path to the location of file. When I try to start windows service, it is expecting the XML file to be in c:\windows\system32\. Please let me know whether there is a...
2
4506
by: muttu2244 | last post by:
hi all could anybody please tell me how can i copy a file from windows file systems like FAT12, FAT16,FAT32 and NTFS to EXT2, and EXT3. Is their any function in python that we can do the above Thanks in advance Yogi
2
1886
by: Steven.Xu | last post by:
how to launch .exe file when windows starting?
3
1574
bajajv
by: bajajv | last post by:
Hi, I have linux and windows xp on my machine. I have a 1 GB file on linux. And I want to access it from windows. I tried by mapping but I am able to get only read only access. But I need to copy it. Can you suggest any method for that. Its urgent. Thanks.
0
1031
by: zitizonx | last post by:
Hello all, I am looking a way to read the .MBOX file in Windows environment using .Net and write the file content in to HTML files. But I cant find any library files or documentation around this. Anyone have any experience around this? Any help? Thanks in heaps ! Rav
9
9982
by: akoymakoy | last post by:
Good Day: as the title says i am creating a program that will copy a file from windows to a linux machine. any help would be appreciated. i tried looking for it on google but i dont see a real help. a sample code will be a huge help.. ive tried a few times but to no avail and im running out of ideas thanks in advance
6
4387
JustRun
by: JustRun | last post by:
I have two windows application projects in the same solution, The solution contains an application that has a reference to another application in the same solution, When I tried to publish the project that contains the reference it gave me that error : Error 8 :Could not find file 'Microsoft.Windows.CommonLanguageRuntime, Version=2.0.50727.0 And another question: If I will use the project 1 with all my project is it correct to make...
0
1739
JustRun
by: JustRun | last post by:
Hi All This is a very urget, Plz answer me I have two windows application projects in the same solution, The solution contains an application that has a reference to another application in the same solution, When I tried to publish the project that contains the reference it gave me that error : Error 8 :Could not find file 'Microsoft.Windows.CommonLanguageRuntime, Version=2.0.50727.0
1
2325
by: TechBabu | last post by:
I'm trying to read data from config file in windows service in OnStart(), but it is throwing error "Object reference not set to an instance of an object". Is there any seeting required to use config file in Windows Service. my config file name as <appName>.exe.config. Even I placed it in the System32 folder also. Plz help me out how to handle config file in Windows Service. I'm using VS2008, C#. Thanks in advance.
1
2496
by: Praveen St | last post by:
Hi, I need a perl script on windows which deletes the newline characters from a file and merges all the lines into one line and then write into another file in windows system %temp% directory. For example, this script is to delete newlines and create a sigle line and write into another file in %TEMP% I have script which deletes the newlines but the output goes to STDOUT I am not able to create a file in %TEMP% and redirect the...
0
9997
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11279
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10981
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9673
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8047
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7205
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5893
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
4306
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3323
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.