# removed stuff & fatals error in HEAD

- Thread: https://externals.io/message/28570
- Original archive: https://news-web.php.net/php.internals/28570
- Started by Antony Dovgal on 2007-03-23T11:57:02+00:00
- Messages: 7
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #28570 — Antony Dovgal — 2007-03-23T11:57:02+00:00

URL: https://externals.io/message/28570#28570

Hello all.

I propose to change the error in HEAD that appears when enabling magic_quotes 
and safe_mode from `E_ERROR` to E_WARNING.
It's not something that leaves the engine in unstable state, so I believe 
 `E_ERROR` is misused in this case.

It's also impossible to know even where exactly these INI options were declared 
if they appeared in php.ini:

   # php -i
   PHP Fatal error:  Directive 'safe_mode' is no longer supported in PHP 6 and
   greater in Unknown on line 0


I'll commit the patch in the evening if there are no (well-grounded) objections.

-- 
Wbr,
Antony Dovgal

---

## #28571 — Alexey Zakhlestin — 2007-03-23T12:08:48+00:00

URL: https://externals.io/message/28570#28571 · In reply to: #28570

I believe, that it will be better to make better error-messages regarding
place of options declarations. "safe_mode" and "magic_quotes" are things,
which some projects rely on heavily, so people should be forced to disable
these manually… It's kinda psychological effect: "we told you it won't work,
but you insisted"


>
> Hello all.
>
> I propose to change the error in HEAD that appears when enabling
> magic_quotes
> and safe_mode from `E_ERROR` to E_WARNING.
> It's not something that leaves the engine in unstable state, so I believe
> `E_ERROR` is misused in this case.
>
> It's also impossible to know even where exactly these INI options were
> declared
> if they appeared in php.ini:
>
>    # php -i
>    PHP Fatal error:  Directive 'safe_mode' is no longer supported in PHP 6
> and
>    greater in Unknown on line 0
>
>
> I'll commit the patch in the evening if there are no (well-grounded)
> objections.
>
> --
> Wbr,
> Antony Dovgal
>
> --
> 
> 
>
>


-- 
Alexey Zakhlestin
http://blog.milkfarmsoft.com/

---

## #28572 — Antony Dovgal — 2007-03-23T12:37:48+00:00

URL: https://externals.io/message/28570#28572 · In reply to: #28571

> I believe, that it will be better to make better error-messages regarding
> place of options declarations. 

Looks like you misunderstood the problem.
There is no script, so the error messages refer to "Unknown" file.

> "safe_mode" and "magic_quotes" are things,
> which some projects rely on heavily, so people should be forced to disable
> these manually… It's kinda psychological effect: "we told you it won't work,
> but you insisted"


-- 
Wbr,
Antony Dovgal

---

## #28573 — johannes@php.net — 2007-03-23T12:47:31+00:00

URL: https://externals.io/message/28570#28573 · In reply to: #28570

Hi,

I'd also like to completely remove get_magic_quotes_gpc() and similar
functions instead of having them resulting in a fatal error. The effect
would be the same - the script terminates - but `function_exists()` is
much nicer as check than `version_compare()`.

Any objections?

johannes

On Fri, 2007-03-23 at 14:57 +0300, Antony Dovgal wrote: 
> Hello all.
> 
> I propose to change the error in HEAD that appears when enabling magic_quotes 
> and safe_mode from `E_ERROR` to E_WARNING.
> It's not something that leaves the engine in unstable state, so I believe 
> `E_ERROR` is misused in this case.
> 
> It's also impossible to know even where exactly these INI options were declared 
> if they appeared in php.ini:
> 
>    # php -i
>    PHP Fatal error:  Directive 'safe_mode' is no longer supported in PHP 6 and
>    greater in Unknown on line 0
> 
> 
> I'll commit the patch in the evening if there are no (well-grounded) objections.
> 
> -- 
> Wbr,
> Antony Dovgal

---

## #28574 — Alexey Zakhlestin — 2007-03-23T12:48:45+00:00

URL: https://externals.io/message/28570#28574 · In reply to: #28572

Isn't it possible to change this phrase to something like "in php's
configuration"?


>
> 
> > […]
> regarding
> > […]
>
> Looks like you misunderstood the problem.
> There is no script, so the error messages refer to "Unknown" file.
>



-- 
Alexey Zakhlestin
http://blog.milkfarmsoft.com/

---

## #28575 — Derick Rethans — 2007-03-23T12:56:43+00:00

URL: https://externals.io/message/28570#28575 · In reply to: #28573

> Hi,
> 
> I'd also like to completely remove get_magic_quotes_gpc() and similar
> functions instead of having them resulting in a fatal error. The effect
> would be the same - the script terminates - but `function_exists()` is
> much nicer as check than `version_compare()`.
> 
> Any objections?

No, remove the functions please. However, I think it's good to have an 
error if somebody tries to set them in a configuration file still. But 
we need a better error message saying in which config file they were 
used.

regards,
Derick

---

## #28576 — Antony Dovgal — 2007-03-23T12:59:59+00:00

URL: https://externals.io/message/28570#28576 · In reply to: #28574

> Isn't it possible to change this phrase to something like "in php's
> configuration"?

How would that help you?

-- 
Wbr,
Antony Dovgal
