# Patch: Rasmus statcallpatch with configure option

- Thread: https://externals.io/message/12793
- Original archive: https://news-web.php.net/php.internals/12793
- Started by Derick Rethans on 2004-09-14T12:10:52+00:00
- Messages: 11
- 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

---

## #12793 — Derick Rethans — 2004-09-14T12:10:52+00:00

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

Hei,

This is Rasmus' patch including a configure option
"--disable-path-normalization" to enable this patch. By default this
option is of course turned off.

I am planning to commit this patch after 4.3.9 is released too, in case
there are no good objections.

Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

---

## #12794 — Wez Furlong — 2004-09-14T12:40:52+00:00

URL: https://externals.io/message/12793#12794 · In reply to: #12793

There's an #if 0 in there that probably shouldn't be

--Wez.


On Tue, 14 Sep 2004 14:10:52 +0200 (CEST), Derick Rethans
<derick@derickrethans.nl> wrote:
> Hei,
> 
> This is Rasmus' patch including a configure option
> "--disable-path-normalization" to enable this patch. By default this
> option is of course turned off.
> 
> I am planning to commit this patch after 4.3.9 is released too, in case
> there are no good objections.
> 
> Derick
> 
> --
> Derick Rethans
> http://derickrethans.nl | http://ez.no | http://xdebug.org

---

## #12795 — Derick Rethans — 2004-09-14T12:46:28+00:00

URL: https://externals.io/message/12793#12795 · In reply to: #12794

> There's an #if 0 in there that probably shouldn't be

Yeah, the whole stuff can be removed, as it's added in later again :)
I'll create a new patch for it here.

Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

---

## #12796 — Derick Rethans — 2004-09-14T12:50:09+00:00

URL: https://externals.io/message/12793#12796 · In reply to: #12795

> 
>
> > […]
>
> Yeah, the whole stuff can be removed, as it's added in later again :)
> I'll create a new patch for it here.

hmm, no, this was a different patch. No clue why he put that in; Rasmus,
can you clarify?

Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

---

## #12797 — Wez Furlong — 2004-09-14T13:02:28+00:00

URL: https://externals.io/message/12793#12797 · In reply to: #12796

To eliminate an `fstat()` most likely; it can stay, but it should
probably changed to #ifndef SKIP_PATH_CHECKS instead.

--Wez.


On Tue, 14 Sep 2004 14:50:09 +0200 (CEST), Derick Rethans
<derick@php.net> wrote:
> 
> 
> > […]
> 
> hmm, no, this was a different patch. No clue why he put that in; Rasmus,
> can you clarify?
> 
> 
> 
> Derick
> 
> --
> Derick Rethans
> http://derickrethans.nl | http://ez.no | http://xdebug.org

---

## #12798 — Zeev Suraski — 2004-09-14T13:18:58+00:00

URL: https://externals.io/message/12793#12798 · In reply to: #12793

I don't think we should have this patch in the distribution.  It shouldn't 
be that accessible as it has the potential to break behavior of both apps 
and plugins.  I think it belongs in a patches repository such as 
http://www.zend.com/zend/week/pat/ (doesn't have to be that one in 
particular, but something like that).

(There are also several coding style issues with the patch if we do decide 
to accept it)

Zeev

At 15:10 14/09/2004, Derick Rethans wrote:
>Hei,
>
>This is Rasmus' patch including a configure option
>"--disable-path-normalization" to enable this patch. By default this
>option is of course turned off.
>
>I am planning to commit this patch after 4.3.9 is released too, in case
>there are no good objections.
>
>Derick
>
>--
>Derick Rethans
>http://derickrethans.nl | http://ez.no | http://xdebug.org

---

## #12799 — Rasmus Lerdorf — 2004-09-14T14:54:28+00:00

URL: https://externals.io/message/12793#12799 · In reply to: #12796

> 
>
> > […]
>
> hmm, no, this was a different patch. No clue why he put that in; Rasmus,
> can you clarify?

That should have been a #ifndef SKIP_PATH_CHECKS there.  And it is there
to get rid of a non-critical `ftell()`.

And yes, there is no doubt that this patch can critically alter the way
PHP works and has the potential to break all sorts of stuff.  Anything
that relies on PHP knowing the full path will break.  I had to fix both
xdebug and APC, for example.  At the same time, enough people have asked
me about it that it probably should be more accessible.

-Rasmus

---

## #12802 — Derick Rethans — 2004-09-14T16:29:25+00:00

URL: https://externals.io/message/12793#12802 · In reply to: #12799

> That should have been a #ifndef SKIP_PATH_CHECKS there.  And it is there
> to get rid of a non-critical `ftell()`.

Attached is the patch with this corrected, and corrected white space.

> And yes, there is no doubt that this patch can critically alter the way
> PHP works and has the potential to break all sorts of stuff.  Anything
> that relies on PHP knowing the full path will break.  I had to fix both
> xdebug and APC, for example.  At the same time, enough people have asked
> me about it that it probably should be more accessible.

I agree, there are a lot of people who might benefit from it (and do
already!) and thus the reason for me to put it into something usable for
everybody so that 1) rasmus doesn't have to maintain the patch anymore
and 2) users don't have to keep updating their PHP whenever they upgrade
PHP.

Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

---

## #12804 — Andrey Hristov — 2004-09-14T17:18:15+00:00

URL: https://externals.io/message/12793#12804 · In reply to: #12802

Derick Rethans wrote:
> 
> 
> 
> > […]
> 
> 
> Attached is the patch with this corrected, and corrected white space.
> 
> 
> > […]
> 
> 
> I agree, there are a lot of people who might benefit from it (and do
> already!) and thus the reason for me to put it into something usable for
> everybody so that 1) rasmus doesn't have to maintain the patch anymore
> and 2) users don't have to keep updating their PHP whenever they upgrade
> PHP.
> 
> Derick
> 
Both points make sense. Just name the configure option well and put big warnings there
that when the option is switched on this _may_ lead to crashing applications.

Andrey

---

## #12805 — Andi Gutmans — 2004-09-14T17:22:40+00:00

URL: https://externals.io/message/12793#12805 · In reply to: #12793

Hey Derick and all,

As I mentioned in the past, I think solving it in a completely compatible 
manner is the best way to go.
I sent out the `realpath()` cache patch which addresses the most problematic 
file system issues (and if there are any other things we could probably 
address too).
I think there's a big advantage in having something which is completely 
compatible because we could enable it by default and all PHP users would 
benefit from it.
I volunteer to put some gas on getting this patch production ready. Maybe I 
can send a new version in a couple of days and discuss what else it is missing?

Andi

At 02:10 PM 9/14/2004 +0200, Derick Rethans wrote:
>Hei,
>
>This is Rasmus' patch including a configure option
>"--disable-path-normalization" to enable this patch. By default this
>option is of course turned off.
>
>I am planning to commit this patch after 4.3.9 is released too, in case
>there are no good objections.
>
>Derick
>
>--
>Derick Rethans
>http://derickrethans.nl | http://ez.no | http://xdebug.org

---

## #12821 — Derick Rethans — 2004-09-15T07:03:43+00:00

URL: https://externals.io/message/12793#12821 · In reply to: #12804

> Both points make sense. Just name the configure option well and put big warnings there
> that when the option is switched on this _may_ lead to crashing applications.

Nothing will crash, it's just that include_once might fail if you're
using two different paths to include it. No big deal and easy to fix too
IF you need this kind of performance increase. Big warnings is fine with
me :)

Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org
