Re: [PHP] blocking exec() silently

2007-09-14 Thread Nathan Nobbe
shared hosting environments are interesting; ive sometimes wondered how i might configure the environment in such a scenario. after revoking access to the exec() command you could allow the errors to be sent to the browser and recommend to users override the stock error handler as mentioned before

RE: [PHP] blocking exec() silently

2007-09-14 Thread Zoltán Németh
2007. 09. 14, péntek keltezéssel 08.31-kor Instruct ICC ezt írta: > > Instruct ICC schrieb: > > > I was going to mention > > > http://php.he.net/manual/en/features.safe-mode.functions.php and ask > > > you if you need any of those functions, but I prefer Nathan's answer. > > > You may be able to

Re: [PHP] blocking exec() silently

2007-09-14 Thread Samuel Vogel
Actually I can not do that. The point of my question was, that I'm running kilu.de, a German Freehosting service. But many of our users can not cope with the error messages, occurring from the disabled_functions! I can't log to the error log, because the errors need to be displayed to our use

RE: [PHP] blocking exec() silently

2007-09-14 Thread Instruct ICC
> From: [EMAIL PROTECTED] > Actually in this example, there is an error handling function provided > in the comments. I'm commenting again because I want to stress the distinctions between errors E_ERROR, warnings E_WARNING, *USER* and other "messages/notices/etc.": http://php.net/manual/en/ref

RE: [PHP] blocking exec() silently

2007-09-14 Thread Instruct ICC
> Instruct ICC schrieb: > > I was going to mention > > http://php.he.net/manual/en/features.safe-mode.functions.php and ask > > you if you need any of those functions, but I prefer Nathan's answer. > > You may be able to set the error reporting in conjunction with > > disable_functions and be

Re: [PHP] blocking exec() silently

2007-09-13 Thread Chris
Samuel Vogel wrote: Hey, Thanks for the replies! safe-mode is not an option unfortunately! But changing the Error reporting, is the first thing I wanted to do, but when I asked if this was possible on this list, somebody replied, that it this is not possible! Could you point me to a way, how

Re: [PHP] blocking exec() silently

2007-09-13 Thread Samuel Vogel
Actually in this example, there is an error handling function provided in the comments. I can't test it right now, but would it be possible that a functions emulates the built-in error handling of php? Or would that need much more lines of code? If this would be the case, then I could modifiy th

Re: [PHP] blocking exec() silently

2007-09-13 Thread Nathan Nobbe
hmm; you can define you own error handler via set_error_handler() this would be something like overriding the stock session_handler, or maybe a little similar to extending the stock exception handler. anyway, i think that would be a lot of

Re: [PHP] blocking exec() silently

2007-09-13 Thread Samuel Vogel
Hey, Thanks for the replies! safe-mode is not an option unfortunately! But changing the Error reporting, is the first thing I wanted to do, but when I asked if this was possible on this list, somebody replied, that it this is not possible! Could you point me to a way, how I can achieve, that

Re: [PHP] blocking exec() silently

2007-09-13 Thread Instruct ICC
On 9/12/07, Samuel Vogel <[EMAIL PROTECTED]> wrote: > > Hey guys, > > Actually I'm still looking for a way to block for example the exec() > function without throwing an error! From: "Nathan Nobbe" <[EMAIL PROTECTED]> i dont know why you wouldnt just use the disable_functions directive in php.i

Re: [PHP] blocking exec() silently

2007-09-12 Thread Nathan Nobbe
i dont know why you wouldnt just use the disable_functions directive in php.ini disable_functions = "exec" this will indeed raise an error, well a warning rather, from my test [12-Sep-2007 19:22:24] PHP Warning: exec() has been disabled for security reasons but i always suppress warnings and er

Re: [PHP] blocking exec() silently

2007-09-12 Thread Chris
Samuel Vogel wrote: Hey guys, Actually I'm still looking for a way to block for example the exec() function without throwing an error! Since there seems to be no way to do this, without hacking the code of php, it seems like that is what I'll have to do... Why do you have to do this and not

[PHP] blocking exec() silently

2007-09-12 Thread Samuel Vogel
Hey guys, Actually I'm still looking for a way to block for example the exec() function without throwing an error! Since there seems to be no way to do this, without hacking the code of php, it seems like that is what I'll have to do... Do you people think it would be a good way to just look