Re: php installed on IIS: changes to php.ini not takingaffect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I think the issue with php failing to execute may have been a result of my having C:\PHP in my system PATH and my PHPRC variables. I was previously trying to run php on IIS. I removed C:\PHP from both variables and now I can run php with my php.ini in my C:\Directory.

I am still having the same problem that I can't edit my ini file and have the changes take affect.

I apologize for all the posts.


Kevin Ruiz wrote:
dropping it in C:\windows\system32 yields the same results as C:\windows.

It seems I can place the ini file in any directory other than the directory where php is installed.

Daniel Kaliel wrote:
What happens if you put it in c:\Windows\system32

-----Original Message-----
From: Kevin Ruiz [mailto:kevinruiz@xxxxxxxxxxxxxxx] Sent: January 11, 2007 10:54 AM
To: php-windows@xxxxxxxxxxxxx
Subject: Re:  php installed on IIS: changes to php.ini not
taking affect

I can't let this go...I can't get anything else done until I can figure
this out...I'm pretty sure this will ultimately lead to my demise.

Okay, so I installed apache thinking it'd be good to test this problem
with another server. I'm having the same problem with apache. If I have
my ini file in C:\PHP php will not execute properly...if I remove the
ini file php executes but uses the default settings and looks for the
ini file in C:\Windows.

I'm not a windows expert...is there something I'm overlooking?


tg-php@xxxxxxxxxxxxxxxxxxxxxx wrote:
Try checking out phpinfo() when it works and compare that to what's in
your php.ini and look for the differences.  Maybe some option or
extension or something you're trying to run is exploding.  Maybe print
out the successful phpinfo() and your php.ini that's causing the trouble
and go over both with a fine toothed comb.
-TG

= = = Original message = = =

Thanks for the suggestion...I tried that...i didn't make a difference.

Here's another thing I noticed. PHP seems to be using the default settings. When I drop a php.ini file in C:\Windows (where php is looking for my ini file) php fails execute. If I remove the ini file...the code executes fine.

tg-php@xxxxxxxxxxxxxxxxxxxxxx wrote:
Could be a permissions issue with reading the new php.ini file you
created.
On this page, it tells you how to figure out what user your IIS is
executing as:
http://www.php.net/manual/en/install.windows.iis.php

"
1. In IIS Admin, go to Application Pools 2. Right click on the pool your site is running under and click properties. 3. Go to the Identity tab and see what user is selected. 4. Give that user permissions to your php files/directory.
"

If all else fails and you want to see if it's a permissions thing,
set permissions to "Everyone - Full Control" on your php.ini file.  Bad
security, but it should tell you if it's a permissions issue or not.
-TG

= = = Original message = = =

okay...turns out there was something strange going on with my ini
file.
I copied its contents into a new file, saved that as "php.ini"...now whenever I drop that in either C:\Windows or C:\PHP php will not execute. If I move the file out of either of those two directories, it executes fine.

Does this make any sense?


tg-php@xxxxxxxxxxxxxxxxxxxxxx wrote:
I had a similar issue a couple years ago when I was running
Apache/PHP on a Windows box at a previous job.  The information below
helped.  Check all the locations (regardless of what PHP is reporting
it's using for php.ini's path).  Try making some simple change that will
show up on phpinfo().  You should find it eventually.
Good luck!

-TG

http://www.php.net/manual/en/install.windows.php

"php.ini is searched in these locations (in order):

* SAPI module specific location (PHPIniDir directive in Apache 2, -c

command line option in CGI and CLI, php_ini parameter in NSAPI, PHP_INI_PATH environment variable in THTTPD)
* The PHPRC environment variable. Before PHP 5.2.0 this was checked
after the registry key mentioned below.
* HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath (Windows Registry location)
* Current working directory (for CLI)
* The web server's directory (for SAPI modules), or directory of PHP

(otherwise in Windows)
* Windows directory (C:\windows or C:\winnt) (for Windows), or
--with-config-file-path compile time option"
= = = Original message = = =

I have php 5.2 up and running on IIS 5.1.

phpinfo tells me php is looking for my ini file in C:\Windows...I place the file there, edit it, restart the server but I don't see the changes I've made.

I've been dealing with this for a day and can't seem to find any information as to what's causing this problem.

I've tried adding C:\PHP to my system path where C:\PHP is where php

lives. I also have PHPRC pointing ot C:\PHP...not sure if either of those would have anything to do with my problem.


Does anyone have any ideas?
___________________________________________________________
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

--
PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php




--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux