Skip to content

Add windows property to new infrastructure#6

Merged
derickr merged 1 commit intomainfrom
add-windows-property
Mar 20, 2026
Merged

Add windows property to new infrastructure#6
derickr merged 1 commit intomainfrom
add-windows-property

Conversation

@derickr
Copy link
Owner

@derickr derickr commented Mar 19, 2026

The idea is that this replaces the current windows.php.net server, with redirects for all original content to the new location on either downloads.php.net or their integrated location on www.php.net

It's possible that I am missing better redirects for common links, so please let me know if I am missing any important ones.

/cc @shivammathur @jrfnl

@jrfnl
Copy link

jrfnl commented Mar 19, 2026

@derickr Thanks for the ping.

While redirecting makes sense, there are a couple of things I'm a little concerned about:

  • The info which is in the left sidebar of the windows.php.net page, in particular the information about Visual Studio. I remember when I first installed PHP for Windows myself (without a WAMP installer), that info saved my bacon.
  • Access to historical versions as https://www.php.net/releases/ looks to only contain the Linux versions.

I'd also be interested to know how to get to QA releases for Windows. Looks like this is via https://www.php.net/pre-release-builds.php ? If so, where can I submit a PR to make that page a little more scannable ?

I'm also not so sure about that "I want to use PHP for" dropdown - is it just me or does nothing change when you toggle between "Web development" and "CLI/library dev" ?

Comment on lines +26 to +28
RewriteRule ^/downloads/snaps https://www.php.net/pre-release-builds.php#windows [NE]
RewriteRule ^/downloads/releases/(.*) https://downloads.php.net/~windows/releases/archives/$1
RewriteRule ^/downloads/(.*) https://downloads.php.net/~windows/$1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
RewriteRule ^/downloads/snaps https://www.php.net/pre-release-builds.php#windows [NE]
RewriteRule ^/downloads/releases/(.*) https://downloads.php.net/~windows/releases/archives/$1
RewriteRule ^/downloads/(.*) https://downloads.php.net/~windows/$1
RewriteRule ^/downloads/snaps https://www.php.net/pre-release-builds.php#windows [NE]
RewriteRule ^/downloads/releases/(.*) https://downloads.php.net/~windows/releases/archives/$1
RewriteRule ^/downloads/(.*) https://downloads.php.net/~windows/$1

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wasn't the right way, but it was broken and I updated. (We use tabs for indentation, and spaces for alignment in these files).

Comment on lines +20 to +21
RewriteRule ^/$ https://www.php.net/
RewriteRule ^/download$ https://www.php.net/downloads.php?os=windows
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should redirect both to the downloads page with os=windows as the requested url is related to windows and php.net being the home page is not windows specific.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had thought www.php.net would be better, as the "main page" here just has PHP (on Windows) specific news. As news is on www.php.net (and not on https://www.php.net/downloads.php) that would be the better destination.

So I haven't changed this yet…

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. that makes sense.

RewriteRule ^/snapshots$ https://www.php.net/pre-release-builds.php#windows [NE]
RewriteRule ^/snapshots/$ https://www.php.net/pre-release-builds.php#windows [NE]
RewriteRule ^/downloads/snaps https://www.php.net/pre-release-builds.php#windows [NE]
RewriteRule ^/downloads/releases/(.*) https://downloads.php.net/~windows/releases/archives/$1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That breaks the archive links on windows.php.net: /downloads/releases/archives/... becomes /~windows/releases/archives/archives/...

/downloads/releases/and sub directories on windows.php.net should redirect to ~windows/releases and corresponding subdirectories on downloads.php.net.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ServerAlias {{ windows_domain_alias }}

ServerAdmin {{ systems_email }}
Redirect / https://qa.php.net/
Copy link
Contributor

@shivammathur shivammathur Mar 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not redirect windows.php.net webroot to qa.php.net, it should go to the downloads page with os=windows.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we should not redirect it to qa.php.net.

It should redirect to https://windows.php.net (this entry is for the http:// variant). I copied this over from the qa property and forgot to change this.

(In fact, this entry should never get used, as the CDN is configured to talk to the https:// variant anyway)

Copy link
Owner Author

@derickr derickr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While redirecting makes sense, there are a couple of things I'm a little concerned about:

  • The info which is in the left sidebar of the windows.php.net page, in particular the information about Visual Studio. I remember when I first installed PHP for Windows myself (without a WAMP installer), that info saved my bacon.

I believe we should integrate that into https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2, which already holds more up to date information.

The historical releases for Windows are (already) also available at https://downloads.php.net/~windows/releases/archives/ — I propose we add that link to the side bar of www.php.net/downloads.php as ([Windows](https://downloads.php.net/~windows/releases/archives/)) where it now says "Old Archives".

I'd also be interested to know how to get to QA releases for Windows. Looks like this is via https://www.php.net/pre-release-builds.php ? If so, where can I submit a PR to make that page a little more scannable ?

It lives at https://github.com/php/web-php/blob/master/pre-release-builds.php

Instructions on how to set up a local environment are at https://github.com/php/web-php/blob/master/README.md (it's git clone && cd web-php && php -S …).

I'm also not so sure about that "I want to use PHP for" dropdown - is it just me or does nothing change when you toggle between "Web development" and "CLI/library dev" ?

That's right, for Windows. We could add better instructions there for each. But when we set up the downloads page like this, no such instructions were available.

If you want to make a PR to add that, the following things need to be done (in https://github.com/php/web-php/blob/master/):

  • Create include/download-instructions/windows-downloads-web.php and include/download-instructions/windows-downloads-web.php containing the instructions for each variant, and then include windows-downloads.php.
  • Change https://github.com/php/web-php/blob/master/downloads-get-instructions.php#L58 to add a similar if/else for $options['osvariant'] === "{$options['os']}-downloads" as there is now for docker.

ServerAlias {{ windows_domain_alias }}

ServerAdmin {{ systems_email }}
Redirect / https://qa.php.net/
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we should not redirect it to qa.php.net.

It should redirect to https://windows.php.net (this entry is for the http:// variant). I copied this over from the qa property and forgot to change this.

(In fact, this entry should never get used, as the CDN is configured to talk to the https:// variant anyway)

Comment on lines +20 to +21
RewriteRule ^/$ https://www.php.net/
RewriteRule ^/download$ https://www.php.net/downloads.php?os=windows
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had thought www.php.net would be better, as the "main page" here just has PHP (on Windows) specific news. As news is on www.php.net (and not on https://www.php.net/downloads.php) that would be the better destination.

So I haven't changed this yet…

RewriteRule ^/snapshots$ https://www.php.net/pre-release-builds.php#windows [NE]
RewriteRule ^/snapshots/$ https://www.php.net/pre-release-builds.php#windows [NE]
RewriteRule ^/downloads/snaps https://www.php.net/pre-release-builds.php#windows [NE]
RewriteRule ^/downloads/releases/(.*) https://downloads.php.net/~windows/releases/archives/$1
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +26 to +28
RewriteRule ^/downloads/snaps https://www.php.net/pre-release-builds.php#windows [NE]
RewriteRule ^/downloads/releases/(.*) https://downloads.php.net/~windows/releases/archives/$1
RewriteRule ^/downloads/(.*) https://downloads.php.net/~windows/$1
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wasn't the right way, but it was broken and I updated. (We use tabs for indentation, and spaces for alignment in these files).

@jrfnl
Copy link

jrfnl commented Mar 20, 2026

  • The info which is in the left sidebar of the windows.php.net page, in particular the information about Visual Studio. I remember when I first installed PHP for Windows myself (without a WAMP installer), that info saved my bacon.

I believe we should integrate that into https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2, which already holds more up to date information.

I don't think that's correct. This is not about building your own version of PHP. This is about running (pre-compiled) PHP on Windows. Those VS packages need to be installed on Windows to even be able to run PHP, so this is/should be end-user facing information, not internal information.

The internals page should include a directive to update the VS related info for Windows on the end-user facing pages when a different VS is used to build the standard Windows packages.

The historical releases for Windows are (already) also available at https://downloads.php.net/~windows/releases/archives/ — I propose we add that link to the side bar of www.php.net/downloads.php as ([Windows](https://downloads.php.net/~windows/releases/archives/)) where it now says "Old Archives".

👍🏻

I'd also be interested to know how to get to QA releases for Windows. Looks like this is via https://www.php.net/pre-release-builds.php ? If so, where can I submit a PR to make that page a little more scannable ?

It lives at https://github.com/php/web-php/blob/master/pre-release-builds.php

Instructions on how to set up a local environment are at https://github.com/php/web-php/blob/master/README.md (it's git clone && cd web-php && php -S …).

I'm also not so sure about that "I want to use PHP for" dropdown - is it just me or does nothing change when you toggle between "Web development" and "CLI/library dev" ?

That's right, for Windows. We could add better instructions there for each. But when we set up the downloads page like this, no such instructions were available.

If you want to make a PR to add that, the following things need to be done (in https://github.com/php/web-php/blob/master/):

  • Create include/download-instructions/windows-downloads-web.php and include/download-instructions/windows-downloads-web.php containing the instructions for each variant, and then include windows-downloads.php.
  • Change https://github.com/php/web-php/blob/master/downloads-get-instructions.php#L58 to add a similar if/else for $options['osvariant'] === "{$options['os']}-downloads" as there is now for docker.

Thanks for those pointers. I'll have a look when I have some brain space (which may be a while).

@derickr
Copy link
Owner Author

derickr commented Mar 20, 2026

  • The info which is in the left sidebar of the windows.php.net page, in particular the information about Visual Studio. I remember when I first installed PHP for Windows myself (without a WAMP installer), that info saved my bacon.

I believe we should integrate that into https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2, which already holds more up to date information.

I don't think that's correct. This is not about building your own version of PHP. This is about running (pre-compiled) PHP on Windows. Those VS packages need to be installed on Windows to even be able to run PHP, so this is/should be end-user facing information, not internal information.

@shivammathur fixed/addressed this, with php/web-php#1869


I've also updated the PR with the comments.

@derickr derickr force-pushed the add-windows-property branch from efb9f66 to bc148ae Compare March 20, 2026 13:48
@derickr derickr merged commit bc148ae into main Mar 20, 2026
@jrfnl
Copy link

jrfnl commented Mar 20, 2026

@shivammathur fixed/addressed this, with php/web-php#1869

I've also updated the PR with the comments.

Excellent! Thank you both!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants