Solved

changes to php.ini and want to see in iis7

Posted on 2014-01-11
31
3,122 Views
Last Modified: 2014-05-05
Windows server 2008 using iis7
I made a change to php.ini and want to see change in php.info

I do not want to restart server.
What steps do I need to take.  
Do I restart iis? How?
0
Comment
Question by:rgb192
  • 17
  • 8
  • 5
  • +1
31 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 39773678
You don't need to restart the server, just IIS

In IIS Manager goto the site and click stop/start

http://technet.microsoft.com/en-us/library/cc732317(v=ws.10).aspx
0
 
LVL 108

Assisted Solution

by:Ray Paseur
Ray Paseur earned 71 total points
ID: 39773839
This script, shown here in its entirety, will show you the current PHP settings.
<?php phpinfo();

Open in new window

0
 

Author Comment

by:rgb192
ID: 39774020
in iis7 manager

username->restart server
website->restart server

stop/ start also


failed to change the phpinfo() browser output

In the past I would just manually restart the windows server 2008 to see the change in phpinfo() browser output
0
 
LVL 58

Expert Comment

by:Gary
ID: 39774027
Are you sure you are editing the correct php.ini file - when you load phpinfo it will give the path of the file being used.
If so then try restarting IIS  and not just your site.
0
 

Author Comment

by:rgb192
ID: 39774973
C:\php\php.ini

how to restart iis


I previously:

in iis7 manager

username->restart server
website->restart server

stop/ start also
0
 
LVL 58

Assisted Solution

by:Gary
Gary earned 215 total points
ID: 39774983
How have you got PHP installed? FastCGI, ISAPI ? (probably ISAPI)

Try this
Command Prompt (admin) enter inetmgr.
In Application Pools select DefaultAppPool and recycle
0
 

Author Comment

by:rgb192
ID: 39775190
How have you got PHP installed? FastCGI, ISAPI ? (probably ISAPI)
Server API      CGI/FastCGI

I tried both application pool of website and default and clicked recycle
0
 
LVL 58

Assisted Solution

by:Gary
Gary earned 215 total points
ID: 39775214
Weird
You may have already done this but if not select the update from the list here
http://ruslany.net/2010/03/important-update-for-iis-7-0-fastcgi-module/

Then from the command prompt run (checking the path is correct)

%windir%appcmd.exe set config -section:system.webServer/fastCgi ^
/[fullPath='C:\PHP\php-cgi.exe',arguments=''].monitorChangesTo:"C:\PHP\php.ini" ^
/commit:apphost


This should force php.ini to reload if it is changed.

More info
http://ruslany.net/2010/03/php-on-iis-monitorchangesto-setting-in-fastcgi/
0
 

Author Comment

by:rgb192
ID: 39775268
php-cgi.exe is located at c/php/php-cgi.exe

but I am not sure if I use which .exe is the fastcgi file


what command do I type
0
 
LVL 58

Expert Comment

by:Gary
ID: 39775274
Missing \

%windir%\appcmd.exe set config -section:system.webServer/fastCgi ^
/[fullPath='C:\PHP\php-cgi.exe',arguments=''].monitorChangesTo:"C:\PHP\php.ini" ^
/commit:apphost
0
 

Author Comment

by:rgb192
ID: 39775558
same outputsame output
0
 
LVL 58

Assisted Solution

by:Gary
Gary earned 215 total points
ID: 39775673
Do a search for appcmd.exe (maybe in system32\inetsrv) and change the cli above to reflect the path instead of %windir%

(This is why I always say if you are using PHP then use LINUX, the Windows add on is not real and just causes more problems) Windows is for .net/Linus is for php - mixing the two only creates problems.
0
 

Author Comment

by:rgb192
ID: 39776843
which file
which file should I use?
0
 

Author Comment

by:rgb192
ID: 39809611
0
 
LVL 58

Expert Comment

by:Gary
ID: 39809627
Try this
%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi ^
/[fullPath='C:\PHP\php-cgi.exe',arguments=''].monitorChangesTo:"C:\PHP\php.ini" ^
/commit:apphost
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:rgb192
ID: 39816945
Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Users\j3>%windir%\system32\inetsrv\appcmd.exe set config -section:system.webS
erver/fastCgi ^
More? /[fullPath='C:\PHP\php-cgi.exe',arguments=''].monitorChangesTo:"C:\PHP\php
.ini" ^
More? /commit:apphost
ERROR ( message:Unknown attribute "[fullPath='C:\PHP\php-cgi.exe',arguments=''].
monitorChangesTo".  Replace with -? for help. )

C:\Users\j3>

Open in new window

0
 

Author Comment

by:rgb192
ID: 39872423
What additional information should I provide?
0
 
LVL 58

Expert Comment

by:Gary
ID: 39873696
Check the location of php-cgi.exe, and if not in c:\php then change the path in the following and then run from the cmd

%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi /[fullPath='C:\PHP\php-cgi.exe',arguments=''].monitorChangesTo:"C:\PHP\php.ini" /commit:apphost 

Open in new window

0
 

Author Comment

by:rgb192
ID: 39881162
c:\php\php-cgi.exe

is here

but I am not sure if it is used,  many files and folders
0
 

Author Comment

by:rgb192
ID: 39911424
Is this possible or should I just reset server because of fastcgi configuration?
0
 

Author Comment

by:rgb192
ID: 39964959
What other information should I provide?
0
 
LVL 38

Assisted Solution

by:Aaron Tomosky
Aaron Tomosky earned 214 total points
ID: 39987904
If you install php manager (comes with php if you use the web platform installer, you can set the php.ini that IIS watches for changes. Make and change and it automatically recycles for you without interrupting other sites.
0
 
LVL 38

Expert Comment

by:Aaron Tomosky
ID: 39987907
If you install php manager (comes with php if you use the web platform installer, you can set the php.ini that IIS watches for changes. Make and change and it automatically recycles for you without interrupting other sites.
0
 

Author Comment

by:rgb192
ID: 39996374
I am not sure if i installed php has php manager.  How to check?
0
 
LVL 38

Accepted Solution

by:
Aaron Tomosky earned 214 total points
ID: 39996563
0
 

Author Comment

by:rgb192
ID: 40004842
http://www.iis.net/downloads/community/2010/09/php-manager-for-iis-7

I installed

and I clicked on web-platform-installer

web platform installer has a icon in server manager

there is now icon for php manager.

I am not paid to update php 5.2 and if I do, then client will be upset if there is downtime on production server
php manager
0
 
LVL 38

Assisted Solution

by:Aaron Tomosky
Aaron Tomosky earned 214 total points
ID: 40004880
thats fine, click the link "c:\php\php.ini" and change it to where your php file actually is. Probably c:\program files(x86)\php\v5.2\php.ini
0
 

Author Comment

by:rgb192
ID: 40014799
C:\php\php.ini

but this is a production server

what is the php.ini file that I have opened (I search and do not see php.ini)

I do not want to break the production server
0
 
LVL 38

Expert Comment

by:Aaron Tomosky
ID: 40015247
By default IIS looks for c:\php\php.ini
This is not usually where your php.ini is
You need to find your php installation folder, probably where I said above, and choose that as the location to watch. This setting will not affect anything except the ability for IIS to watch this file. That's why everything works when this setting is wrong.
0
 

Author Comment

by:rgb192
ID: 40028443
I investigated for days if I should make change
But then I realized that no change needs to be made because php manager is looking for  
c:\php\php.ini
and this is where php.ini is
I can verify by running php script of phpinfo()

I clicked on
configuration-recommendations

configuration-recommendations
0
 

Author Closing Comment

by:rgb192
ID: 40043577
I will install windows updates and then break this large question into smaller questions.

One question will be how to configure php manager for iis.

Thanks for teaching me.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Lync server 2013 Backup Service Error ID 4049 – After File Share Migration
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now