Welcome to WebmasterWorld Guest from 107.20.122.81

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Turn off php notice error reporting for site running on windows

     

andrewsmd

5:33 pm on Aug 13, 2012 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



I want to know if there is a way to turn of php notice error reporting for an entire site running in IIS and windows? I understand I could turn it off in my .ini file, but that would turn it off for every php site on the server. I also know I could turn it off using the error_reporting function, but I'd have to put that on every page. Is there a way I can just turn this off for the entire site, but only one site?

coopster

10:49 pm on Aug 15, 2012 (gmt 0)

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I'm not familiar with IIS but does it not have some type of support for multiple domains and individual domain configuration? In Apache they are called "VirtualHost" containers. I would assume IIS has something similar.

andrewsmd

3:34 pm on Aug 16, 2012 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



Yes, it's called a web.config file. But that has nothing to do with PHP. Unfortunately, I think I'm stuck going through the pages and adding an include file or the code manually.

coopster

7:11 pm on Aug 17, 2012 (gmt 0)

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I found this in the online manual:

When running PHP on Windows, the configuration values can be modified on a per-directory basis using the Windows registry.


[php.net...]
[php.net...]

andrewsmd

2:39 pm on Aug 18, 2012 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



I will look into that. I'm not a big fan of editing the registry. What happens if I leave this place and this system get's migrated somewhere, who's going to know I did that. But, it looks like it's my only option.

coopster

1:30 pm on Aug 29, 2012 (gmt 0)

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Well, there are other options, like installing Apache on the server. You can run Apache on a Windows server.

Also, you may consider posting in the Microsoft IIS Web Server and ASP.NET Forum:
[webmasterworld.com...]
There are some wise folks hanging out in there that may be able to assist or offer better alternatives on how to set up multiple hosts/domains with differing configurations.

andrewsmd

1:39 pm on Aug 29, 2012 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



Hahaha, not installing Apache. I've ran both in my years and IIS is just much easier to work with. I posted on the IIS forums before I posted here and got no response. This place taught me PHP so I thought I'd give it a try and it came through with a solution, as usual. I think I'll just end up making and include and putting it in every file. I have multiple find and replace, so I should be able to search for all php files and replace <?php with <?php
include("myFile.php"); Unfortunately, I didn't build this, otherwise there would already be a file included in every php file. I always do that, even though I don't use it most of the time.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month