• =?UTF-8?Q?=e2=80=98This_Is_Not_a_Drill=e2=80=99:_Critical_PHP_Vulne?= =?UTF-8?Q?rabilities_Are_Setting_the_Internet_on_Fire?=

    From Subcommandante XDelta@vlf@star.enet.dec.com to comp.os.vms on Thu Oct 22 17:47:26 2026
    From Newsgroup: comp.os.vms

    rCyThis Is Not a DrillrCO: Critical PHP Vulnerabilities Are Setting the Internet on Fire

    https://www.wired.com/story/this-is-not-a-drill-2-php-vulnerabilities-are-setting-the-internet-on-fire/

    Just in case this impacts VMS shops.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From kludge@kludge@panix.com (Scott Dorsey) to comp.os.vms on Thu Oct 22 10:02:49 2026
    From Newsgroup: comp.os.vms

    Subcommandante XDelta <vlf@star.enet.dec.com> wrote:
    rCyThis Is Not a DrillrCO: Critical PHP Vulnerabilities Are Setting the Internet on Fire

    https://www.wired.com/story/this-is-not-a-drill-2-php-vulnerabilities-are-setting-the-internet-on-fire/

    Just in case this impacts VMS shops.

    It will. There is a VSI version of PHP out there are and it seems people
    are using it. This is a very serious vulnerability although there is no exploit in the wild yet (and the VMS exploit is likely the last to be developed). But I'd hope that VSI is at work on patches to incorporate the fixes that were released yesterday.
    --scott
    --
    "C'est un Nagra. C'est suisse, et tres, tres precis."
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Thu Oct 22 10:10:58 2026
    From Newsgroup: comp.os.vms

    On 10/22/2026 10:02 AM, Scott Dorsey wrote:
    Subcommandante XDelta <vlf@star.enet.dec.com> wrote:
    rCyThis Is Not a DrillrCO: Critical PHP Vulnerabilities Are Setting the Internet on Fire

    https://www.wired.com/story/this-is-not-a-drill-2-php-vulnerabilities-are-setting-the-internet-on-fire/

    Just in case this impacts VMS shops.

    It will. There is a VSI version of PHP out there are and it seems people
    are using it. This is a very serious vulnerability although there is no exploit in the wild yet (and the VMS exploit is likely the last to be developed). But I'd hope that VSI is at work on patches to incorporate the fixes that were released yesterday.
    PHP on VMS is a mess.

    VSI PHP is an ancient version (8.0!) and lacking extensions. I don't
    know if VSI will patch. The patch may not be a trivial "grab from
    upstream" as 8.0 is official EOL.

    Berryman PHP is much better. I don't think he has released an update
    yet.

    Latest flavor is Issinoho PHP, which is on latest and greatest 8.5.
    And he did release an updated version yesterday.

    Arne



    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Thu Oct 22 10:44:05 2026
    From Newsgroup: comp.os.vms

    On 10/22/2026 10:10 AM, Arne Vajh|+j wrote:
    On 10/22/2026 10:02 AM, Scott Dorsey wrote:
    Subcommandante XDelta-a <vlf@star.enet.dec.com> wrote:
    rCyThis Is Not a DrillrCO: Critical PHP Vulnerabilities Are Setting the >>> Internet on Fire

    https://www.wired.com/story/this-is-not-a-drill-2-php-
    vulnerabilities-are-setting-the-internet-on-fire/

    Just in case this impacts VMS shops.

    It will.-a There is a VSI version of PHP out there are and it seems people >> are using it.-a This is a very serious vulnerability although there is no
    exploit in the wild yet (and the VMS exploit is likely the last to be
    developed).-a But I'd hope that VSI is at work on patches to
    incorporate the
    fixes that were released yesterday.
    PHP on VMS is a mess.

    VSI PHP is an ancient version (8.0!) and lacking extensions. I don't
    know if VSI will patch. The patch may not be a trivial "grab from
    upstream" as 8.0 is official EOL.

    Berryman PHP is much better. I don't think he has released an update
    yet.

    Latest flavor is Issinoho PHP, which is on latest and greatest 8.5.
    And he did release an updated version yesterday.
    Of course if one just like traditional PHP code and do
    not need features from recent versions, then using Quercus
    and Tomcat avoids all this.

    https://www.vajhoej.dk/arne/articles/vmsjavaweb.html#other_php

    :-)

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From drb@drb@ihatespam.msu.edu (Dennis Boone) to comp.os.vms on Thu Oct 22 20:09:08 2026
    From Newsgroup: comp.os.vms

    This is a very serious vulnerability although there is no
    exploit in the wild yet (and the VMS exploit is likely the last to be developed).

    "No exploit in the wild" is incorrect.

    https://aws.amazon.com/es/blogs/security/amazon-threat-intelligence-identifies-php2shell-exploitation-prior-to-public-disclosure-in-madpot/

    De
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Thu Oct 22 22:43:59 2026
    From Newsgroup: comp.os.vms

    On Thu, 22 Oct 2026 10:10:58 -0400, Arne Vajh|+j wrote:

    PHP on VMS is a mess.

    s/ on VMS//

    PHP is a sorry mess, a long litany of sad design decisions.

    When I first saw PHP, it looked like they were trying to copy Perl,
    but not quite understanding what they were copying.

    Nowadays, it looks like theyrCOve moved on to trying to copy Python. But
    they still donrCOt understand what theyrCOre copying.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Alexander Schreiber@als@usenet.thangorodrim.de to comp.os.vms on Fri Oct 23 11:01:03 2026
    From Newsgroup: comp.os.vms

    Scott Dorsey <kludge@panix.com> wrote:
    Subcommandante XDelta <vlf@star.enet.dec.com> wrote:
    rCyThis Is Not a DrillrCO: Critical PHP Vulnerabilities Are Setting the Internet on Fire
    https://www.wired.com/story/this-is-not-a-drill-2-php-vulnerabilities-are-setting-the-internet-on-fire/

    Just in case this impacts VMS shops.

    It will. There is a VSI version of PHP out there are and it seems people
    are using it. This is a very serious vulnerability although there is no exploit in the wild yet

    That's right there with "this unexploded bomb is probably safe to play
    with" ;-)

    These days, given how fast we've seen AI tooling cobble together exploits,
    it should be assumed that by the time a vulnerability is known, exploits are out in the wild and used.

    (and the VMS exploit is likely the last to be
    developed).

    Maybe. Although given that anything running OpenVMS these days is most
    likely hosting something interesting (as opposed to a blog nobody cares
    about), I'd not be surprised if the platform gets more attention than previously.

    Kind regards,
    Alex.
    --
    "Opportunity is missed by most people because it is dressed in overalls and
    looks like work." -- Thomas A. Edison
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Michael S@already5chosen@yahoo.com to comp.os.vms on Fri Oct 23 12:39:38 2026
    From Newsgroup: comp.os.vms

    On Thu, 22 Oct 2026 22:43:59 -0000 (UTC)
    Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
    On Thu, 22 Oct 2026 10:10:58 -0400, Arne Vajh|+j wrote:

    PHP on VMS is a mess.

    s/ on VMS//

    PHP is a sorry mess, a long litany of sad design decisions.

    When I first saw PHP, it looked like they were trying to copy Perl,
    but not quite understanding what they were copying.

    Nowadays, it looks like theyrCOve moved on to trying to copy Python. But
    they still donrCOt understand what theyrCOre copying.
    So why are they massively more successful than perl in their very
    lucrative niche of web server-side scripting? And why at least until
    recently [in this niche] they were massively more successful than
    python?
    My guess would be that they are doing something right.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Michael S@already5chosen@yahoo.com to comp.os.vms on Fri Oct 23 12:42:56 2026
    From Newsgroup: comp.os.vms

    On Fri, 23 Oct 2026 11:01:03 +0200
    Alexander Schreiber <als@usenet.thangorodrim.de> wrote:
    Scott Dorsey <kludge@panix.com> wrote:
    Subcommandante XDelta <vlf@star.enet.dec.com> wrote:
    rCyThis Is Not a DrillrCO: Critical PHP Vulnerabilities Are Setting the >>Internet on Fire
    https://www.wired.com/story/this-is-not-a-drill-2-php-vulnerabilities-are-setting-the-internet-on-fire/

    Just in case this impacts VMS shops.

    It will. There is a VSI version of PHP out there are and it seems
    people are using it. This is a very serious vulnerability although
    there is no exploit in the wild yet

    That's right there with "this unexploded bomb is probably safe to play
    with" ;-)

    These days, given how fast we've seen AI tooling cobble together
    exploits, it should be assumed that by the time a vulnerability is
    known, exploits are out in the wild and used.

    (and the VMS exploit is likely the last to be
    developed).

    Maybe. Although given that anything running OpenVMS these days is most
    likely hosting something interesting (as opposed to a blog nobody
    cares about), I'd not be surprised if the platform gets more
    attention than previously.

    Kind regards,
    Alex.
    Hopefully, majority of those interesting VMS web servers are serving
    various intranets rather than the Internet.
    Or I am naive.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Abandoned Trolley@that.bloke@microsoft.com to comp.os.vms on Fri Oct 23 11:00:53 2026
    From Newsgroup: comp.os.vms



    So why are they massively more successful than perl in their very
    lucrative niche of web server-side scripting? And why at least until
    recently [in this niche] they were massively more successful than
    python?
    My guess would be that they are doing something right.




    Meanwhile ... around 40% of all the worlds web sites are powered by
    Wordpress
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Fri Oct 23 11:51:08 2026
    From Newsgroup: comp.os.vms

    In article <20261023123938.000065e7@yahoo.com>,
    Michael S <already5chosen@yahoo.com> wrote:
    On Thu, 22 Oct 2026 22:43:59 -0000 (UTC)
    Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:

    On Thu, 22 Oct 2026 10:10:58 -0400, Arne Vajh|+j wrote:

    PHP on VMS is a mess.

    s/ on VMS//

    PHP is a sorry mess, a long litany of sad design decisions.

    When I first saw PHP, it looked like they were trying to copy Perl,
    but not quite understanding what they were copying.

    Nowadays, it looks like theyrCOve moved on to trying to copy Python. But
    they still donrCOt understand what theyrCOre copying.

    So why are they massively more successful than perl in their very
    lucrative niche of web server-side scripting? And why at least until
    recently [in this niche] they were massively more successful than
    python?
    My guess would be that they are doing something right.

    When I first saw PHP, I assumed they were trying to provide an
    alternative to ASP and CFML, where one interleaved HTML and
    program snippets. The syntax was clearly inspired by Perl,
    which was popular at the time among the audience that PHP seemed
    targeted for.

    In product terms, PHP has been amazingly successful. From a
    language design perspective, well...maybe not so much.

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Simon Clubley@clubley@remove_me.eisner.decus.org-Earth.UFP to comp.os.vms on Fri Oct 23 12:34:56 2026
    From Newsgroup: comp.os.vms

    On 2026-10-23, Michael S <already5chosen@yahoo.com> wrote:
    On Thu, 22 Oct 2026 22:43:59 -0000 (UTC)
    Lawrence D?Oliveiro <ldo@nz.invalid> wrote:

    On Thu, 22 Oct 2026 10:10:58 -0400, Arne Vajhoj wrote:

    PHP on VMS is a mess.

    s/ on VMS//

    PHP is a sorry mess, a long litany of sad design decisions.

    When I first saw PHP, it looked like they were trying to copy Perl,
    but not quite understanding what they were copying.

    Nowadays, it looks like they?ve moved on to trying to copy Python. But
    they still don?t understand what they?re copying.

    So why are they massively more successful than perl in their very
    lucrative niche of web server-side scripting? And why at least until
    recently [in this niche] they were massively more successful than
    python?
    My guess would be that they are doing something right.


    They have a large installed base and a large ecosystem to go with it.

    That's it and that (unfortunately) is all they need to stay dominant
    until something much more dramatically better comes along.

    This is the actual vulnerability writeup:

    https://www.wiz.io/blog/php2shell-php-rce

    According to this writeup, only the last decade of releases are vulnerable.

    Simon.
    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Simon Clubley@clubley@remove_me.eisner.decus.org-Earth.UFP to comp.os.vms on Fri Oct 23 12:40:53 2026
    From Newsgroup: comp.os.vms

    On 2026-10-23, Michael S <already5chosen@yahoo.com> wrote:
    On Fri, 23 Oct 2026 11:01:03 +0200
    Alexander Schreiber <als@usenet.thangorodrim.de> wrote:

    Maybe. Although given that anything running OpenVMS these days is most
    likely hosting something interesting (as opposed to a blog nobody
    cares about), I'd not be surprised if the platform gets more
    attention than previously.


    That is something I agree with as well, and the management focus may not
    be on those VMS systems in the way that it is on the more mainstream
    operating systems.

    Hopefully, majority of those interesting VMS web servers are serving
    various intranets rather than the Internet.
    Or I am naive.


    I would hope that for something that important, those internal networks
    are treated as potentially as hostile as those external networks.

    Simon.
    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Fri Oct 23 10:04:36 2026
    From Newsgroup: comp.os.vms

    On 10/23/2026 8:40 AM, Simon Clubley wrote:
    On 2026-10-23, Michael S <already5chosen@yahoo.com> wrote:
    Hopefully, majority of those interesting VMS web servers are serving
    various intranets rather than the Internet.
    Or I am naive.

    I would hope that for something that important, those internal networks
    are treated as potentially as hostile as those external networks.
    Despite the CIO's favorite 100 slides PPT deck containing
    the acronym ZTA 37 times then probably not ...

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Fri Oct 23 10:12:37 2026
    From Newsgroup: comp.os.vms

    On 10/23/2026 8:34 AM, Simon Clubley wrote:
    This is the actual vulnerability writeup:

    https://www.wiz.io/blog/php2shell-php-rce

    According to this writeup, only the last decade of releases are vulnerable.
    It says:

    <quote>
    Every PHP version released in the last decade is affected by at least
    one of these vulnerabilities, going back to version 5.4.
    </quote>

    5.4 is from 2012.

    (last update to 5.4 was in 2015)

    I don't like the wording, but "last decade" is part of 2012-2026.

    But be careful about "only".

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Fri Oct 23 10:23:16 2026
    From Newsgroup: comp.os.vms

    On 10/23/2026 5:39 AM, Michael S wrote:
    On Thu, 22 Oct 2026 22:43:59 -0000 (UTC)
    Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
    PHP is a sorry mess, a long litany of sad design decisions.

    When I first saw PHP, it looked like they were trying to copy Perl,
    but not quite understanding what they were copying.

    Nowadays, it looks like theyrCOve moved on to trying to copy Python. But
    they still donrCOt understand what theyrCOre copying.

    So why are they massively more successful than perl in their very
    lucrative niche of web server-side scripting? And why at least until
    recently [in this niche] they were massively more successful than
    python?
    My guess would be that they are doing something right.
    ASP and PHP was widely successful because they were easy
    to use.

    MS killed ASP Classic for ASP.NET - that probably made business
    sense because the money are in enterprise web not in amateur
    programmer web, but that left the easy web market to PHP.

    Multiple generations of web developers has had PHP as sort
    of default web language.

    In some ways the popularity has been both a blessing and
    a curse for PHP.

    It is nice to be popular. But when everybody can code in
    PHP then everyone - including some that probably should not
    have - code in PHP.

    Todays PHP is many things. There is a professional PHP segment
    using Laravel, Symfony, Doctrine, Eloquent etc. powering many
    of the worlds largest web sites. And then there is the large
    number of hobby programmers that write PHP code so you want to
    cry.

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From scott@scott@slp53.sl.home (Scott Lurndal) to comp.os.vms on Fri Oct 23 14:32:15 2026
    From Newsgroup: comp.os.vms

    drb@ihatespam.msu.edu (Dennis Boone) writes:
    This is a very serious vulnerability although there is no
    exploit in the wild yet (and the VMS exploit is likely the last to be developed).

    "No exploit in the wild" is incorrect.

    https://aws.amazon.com/es/blogs/security/amazon-threat-intelligence-identifies-php2shell-exploitation-prior-to-public-disclosure-in-madpot/

    They noted 'attempts to exploit'. As of yesterday, there had been no successful attempts to my knowledge.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Fri Oct 23 10:33:53 2026
    From Newsgroup: comp.os.vms

    On 10/23/2026 6:00 AM, Abandoned Trolley wrote:
    So why are they massively more successful than perl in their very
    lucrative niche of web server-side scripting? And why at least until
    recently [in this niche] they were massively more successful than
    python?
    My guess would be that they are doing something right.

    Meanwhile ...-a around 40% of all the worlds web sites are powered by Wordpress

    WP is PHP.

    And not surprising at all.

    If one looked at the available CMS's like 15 years ago, then
    one would see 1000 in PHP, 10 in .NET, 10 in Java and 10 in
    Python. No surprise that one of the PHP based ended up on
    top.

    Also the PHP community's strong foundation among non-professional
    developers probably helped a lot creating a CMS suitable for
    ordinary people.

    Arne



    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Abandoned Trolley@that.bloke@microsoft.com to comp.os.vms on Fri Oct 23 15:59:25 2026
    From Newsgroup: comp.os.vms

    On 23/10/2026 15:33, Arne Vajh|+j wrote:
    On 10/23/2026 6:00 AM, Abandoned Trolley wrote:
    So why are they massively more successful than perl in their very
    lucrative niche of web server-side scripting? And why at least until
    recently [in this niche] they were massively more successful than
    python?
    My guess would be that they are doing something right.

    Meanwhile ...-a around 40% of all the worlds web sites are powered by
    Wordpress

    WP is PHP.



    thats the exact point I was trying to make :-\
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Fri Oct 23 11:12:14 2026
    From Newsgroup: comp.os.vms

    On 10/23/2026 10:59 AM, Abandoned Trolley wrote:
    On 23/10/2026 15:33, Arne Vajh|+j wrote:
    On 10/23/2026 6:00 AM, Abandoned Trolley wrote:
    So why are they massively more successful than perl in their very
    lucrative niche of web server-side scripting? And why at least until
    recently [in this niche] they were massively more successful than
    python?
    My guess would be that they are doing something right.

    Meanwhile ...-a around 40% of all the worlds web sites are powered by
    Wordpress

    WP is PHP.

    thats the exact point I was trying to make :-\

    OK.

    If counting web sites (meaning that both www.facebook.com and www.myauntscatshomepage.com count as one) then the web is
    40% WP + 30% all other PHP + 30% everything else.

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Bill Gunshannon@bill.gunshannon@gmail.com to comp.os.vms on Fri Oct 23 12:36:27 2026
    From Newsgroup: comp.os.vms

    On 10/23/26 10:32, Scott Lurndal wrote:
    drb@ihatespam.msu.edu (Dennis Boone) writes:
    This is a very serious vulnerability although there is no
    exploit in the wild yet (and the VMS exploit is likely the last to be
    developed).

    "No exploit in the wild" is incorrect.

    https://aws.amazon.com/es/blogs/security/amazon-threat-intelligence-identifies-php2shell-exploitation-prior-to-public-disclosure-in-madpot/

    They noted 'attempts to exploit'. As of yesterday, there had been no successful attempts to my knowledge.

    The ones you don't know about are a bigger threat than the ones you
    do know about.

    bill

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Bill Gunshannon@bill.gunshannon@gmail.com to comp.os.vms on Fri Oct 23 12:40:08 2026
    From Newsgroup: comp.os.vms

    On 10/23/26 07:51, Dan Cross wrote:
    In article <20261023123938.000065e7@yahoo.com>,
    Michael S <already5chosen@yahoo.com> wrote:
    On Thu, 22 Oct 2026 22:43:59 -0000 (UTC)
    Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:

    On Thu, 22 Oct 2026 10:10:58 -0400, Arne Vajh|+j wrote:

    PHP on VMS is a mess.

    s/ on VMS//

    PHP is a sorry mess, a long litany of sad design decisions.

    When I first saw PHP, it looked like they were trying to copy Perl,
    but not quite understanding what they were copying.

    Nowadays, it looks like theyrCOve moved on to trying to copy Python. But >>> they still donrCOt understand what theyrCOre copying.

    So why are they massively more successful than perl in their very
    lucrative niche of web server-side scripting? And why at least until
    recently [in this niche] they were massively more successful than
    python?
    My guess would be that they are doing something right.

    When I first saw PHP, I assumed they were trying to provide an
    alternative to ASP and CFML, where one interleaved HTML and
    program snippets. The syntax was clearly inspired by Perl,
    which was popular at the time among the audience that PHP seemed
    targeted for.

    In product terms, PHP has been amazingly successful. From a
    language design perspective, well...maybe not so much.



    When I first saw PHP I saw a massive security problem. Sadly, people
    still insisted on using it. Being retired I no longer have to spend my
    time cleaning up for other peoples mistakes but I doubt that the
    security behind PHP has improved.

    bill


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From kludge@kludge@panix.com (Scott Dorsey) to comp.os.vms on Fri Oct 23 14:15:06 2026
    From Newsgroup: comp.os.vms

    Michael S <already5chosen@yahoo.com> wrote:
    So why are they massively more successful than perl in their very
    lucrative niche of web server-side scripting? And why at least until
    recently [in this niche] they were massively more successful than
    python?

    This is a very good question that I have been asking myself for years.

    My guess would be that they are doing something right.

    Clearly they are doing something right but it's clearly not anything
    technical.
    --scott
    --
    "C'est un Nagra. C'est suisse, et tres, tres precis."
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Simon Clubley@clubley@remove_me.eisner.decus.org-Earth.UFP to comp.os.vms on Fri Oct 23 18:36:53 2026
    From Newsgroup: comp.os.vms

    On 2026-10-23, Scott Dorsey <kludge@panix.com> wrote:
    Michael S <already5chosen@yahoo.com> wrote:
    So why are they massively more successful than perl in their very
    lucrative niche of web server-side scripting? And why at least until >>recently [in this niche] they were massively more successful than
    python?

    This is a very good question that I have been asking myself for years.


    Because Perl is horrible to learn and use compared to PHP.

    At a technical level, PHP is a horrible language but it is easy to learn.
    It is the 21st century version of Visual Basic.

    My guess would be that they are doing something right.

    Clearly they are doing something right but it's clearly not anything technical.

    It wasn't about doing something right. They got lucky. They were able
    to establish a large foothold in an empty market segment waiting to
    be filled. Perl was starting in this segment, but it was far easier
    for people to use PHP to fill this segment.

    The PHP solutions now have the installed base advantage. Unfortunately.

    Simon.
    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Fri Oct 23 15:37:42 2026
    From Newsgroup: comp.os.vms

    On 10/23/2026 2:36 PM, Simon Clubley wrote:
    On 2026-10-23, Scott Dorsey <kludge@panix.com> wrote:
    Michael S <already5chosen@yahoo.com> wrote:
    So why are they massively more successful than perl in their very
    lucrative niche of web server-side scripting? And why at least until
    recently [in this niche] they were massively more successful than
    python?

    This is a very good question that I have been asking myself for years.

    Because Perl is horrible to learn and use compared to PHP.

    There are people that like Perl.

    Does not include me though.

    At a technical level, PHP is a horrible language but it is easy to learn.
    It is the 21st century version of Visual Basic.

    True.

    It seems that generally simple easy to learn languages
    tend to become more popular than complex hard to learn
    languages.

    My guess would be that they are doing something right.

    Clearly they are doing something right but it's clearly not anything
    technical.

    It wasn't about doing something right. They got lucky. They were able
    to establish a large foothold in an empty market segment waiting to
    be filled. Perl was starting in this segment, but it was far easier
    for people to use PHP to fill this segment.

    I would not say that they filled an empty space.

    PHP and ASP delivered something people wanted.

    ASP was more popular than PHP.

    But then MS killed ASP with .NET and left amateur web
    programming to PHP.

    PHP did not overtake ASP until the mid 00's.

    The PHP solutions now have the installed base advantage. Unfortunately.
    PHP is still rather unique with a low barrier to entry skill wise.

    What web technologies today are easy to use for spaghetti programming?

    Plain PHP without one of the PHP MVC frameworks can still do it.

    JSF with Facelets : no
    ASP.NET web form : no
    Spring MVC with Thymeleaf : no
    Ktor : no
    Grails : no
    ASP.NET MVC with Razor : no
    RoR : no
    Django : no

    Anything where the tutorial start with model/view/controller
    or component is more or less limiting the user base to IT
    professionals.

    Arne





    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Fri Oct 23 19:51:33 2026
    From Newsgroup: comp.os.vms

    On Fri, 23 Oct 2026 10:23:16 -0400, Arne Vajh|+j wrote:

    On 10/23/2026 5:39 AM, Michael S wrote:

    On Thu, 22 Oct 2026 22:43:59 -0000 (UTC)
    Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:

    PHP is a sorry mess, a long litany of sad design decisions.

    When I first saw PHP, it looked like they were trying to copy
    Perl, but not quite understanding what they were copying.

    Nowadays, it looks like theyrCOve moved on to trying to copy Python.
    But they still donrCOt understand what theyrCOre copying.

    So why are they massively more successful than perl in their very
    lucrative niche of web server-side scripting? And why at least
    until recently [in this niche] they were massively more successful
    than python?

    My guess would be that they are doing something right.

    ASP and PHP was widely successful because they were easy
    to use.

    Obviously there was the inertia element; according to rCLat least until recentlyrCY, that now no longer applies. Inertia can eventually be
    overcome.

    I was expecting NodeJS to be number one for web development now, and
    it probably is. But Python has some pretty good tooling in this area
    too -- as in many others, given the innate flexibility of the
    language.

    In some ways the popularity has been both a blessing and
    a curse for PHP.

    It wasnrCOt popularity that made PHP such a mediocre product. It was its mediocrity that attracted the kind of mediocre programmer that found
    it approachable.

    Todays PHP is many things. There is a professional PHP segment using
    Laravel, Symfony, Doctrine, Eloquent etc. powering many of the
    worlds largest web sites.

    Most or all of those are still built around the strict
    one-page-per-file request/response model. They canrCOt handle
    WebSockets, just for example. Or basic background tasks, that might
    need to run independently of page requests from users.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Fri Oct 23 21:11:04 2026
    From Newsgroup: comp.os.vms

    In article <nk1gv8F1eecU1@mid.individual.net>,
    Bill Gunshannon <bill.gunshannon@gmail.com> wrote:
    On 10/23/26 07:51, Dan Cross wrote:
    [snip]
    When I first saw PHP, I assumed they were trying to provide an
    alternative to ASP and CFML, where one interleaved HTML and
    program snippets. The syntax was clearly inspired by Perl,
    which was popular at the time among the audience that PHP seemed
    targeted for.

    In product terms, PHP has been amazingly successful. From a
    language design perspective, well...maybe not so much.

    When I first saw PHP I saw a massive security problem. Sadly, people
    still insisted on using it. Being retired I no longer have to spend my
    time cleaning up for other peoples mistakes but I doubt that the
    security behind PHP has improved.

    It feels a bit silly asking this now, but in what way? I mean,
    what at the time stuck out as an obvious security hole?

    The early web was a mess. The protocol was hugely wasteful; the
    markup language was anemic, and people were resorting to all
    kinds of bad ideas to try and build content (constructing forms
    from tables, for example, so that boxes could be aligned). The
    web had coalesced around an example from a book with a single
    addition, but like a high-school kegger, the word got out and it
    quickly got out of hand. A lot of non-technical people were
    authoring web pages and web sites by writing HTML directly.
    They didn't _want_ to become programmers.

    CFML, ASP, and PHP stepped into that world and filled a bit of a
    void. It inverted the model; you weren't writing programs to
    generate markup guided by the program's behavior, you were
    injecting behavior by embedding little snippets of programs in
    your markup. The design-oriented types who wanted to focus on
    content could largely do that. I don't think that has to be
    inherently insecure, though I can see how having someone around
    to add a bit of domain expertise to the mix can prevent a lot of
    problems down the road. Textual interpolation is a powerful
    tool; so is a chainsaw. Both can do a lot of damage.

    The web model, built around links between tree-oriented document
    objects serialied into an overly-verbose text format with
    (frankly) weird parsing rules has caused a lot of damage. The
    tree-oriented structure itself isn't bad, but it's expression in
    HTML is not good, either. I think that leads to more problems
    than just PHP.

    But PHP is also a "Fractal of Bad Design": https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Fri Oct 23 21:12:54 2026
    From Newsgroup: comp.os.vms

    In article <11bfqk8$1se9o$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/23/2026 5:39 AM, Michael S wrote:
    On Thu, 22 Oct 2026 22:43:59 -0000 (UTC)
    Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
    PHP is a sorry mess, a long litany of sad design decisions.

    When I first saw PHP, it looked like they were trying to copy Perl,
    but not quite understanding what they were copying.

    Nowadays, it looks like theyrCOve moved on to trying to copy Python. But >>> they still donrCOt understand what theyrCOre copying.

    So why are they massively more successful than perl in their very
    lucrative niche of web server-side scripting? And why at least until
    recently [in this niche] they were massively more successful than
    python?
    My guess would be that they are doing something right.

    ASP and PHP was widely successful because they were easy
    to use.

    They also exposed a model people wanted: behavior embedded
    inside of markup, as opposed to the model that dominated early
    on, where behavior dictates the generatoin of markup. "Content"
    people wanted to focus on content and presentation, but software
    development, for both good and bad.

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Bill Gunshannon@bill.gunshannon@gmail.com to comp.os.vms on Fri Oct 23 20:13:30 2026
    From Newsgroup: comp.os.vms

    On 10/23/26 17:11, Dan Cross wrote:
    In article <nk1gv8F1eecU1@mid.individual.net>,
    Bill Gunshannon <bill.gunshannon@gmail.com> wrote:
    On 10/23/26 07:51, Dan Cross wrote:
    [snip]
    When I first saw PHP, I assumed they were trying to provide an
    alternative to ASP and CFML, where one interleaved HTML and
    program snippets. The syntax was clearly inspired by Perl,
    which was popular at the time among the audience that PHP seemed
    targeted for.

    In product terms, PHP has been amazingly successful. From a
    language design perspective, well...maybe not so much.

    When I first saw PHP I saw a massive security problem. Sadly, people
    still insisted on using it. Being retired I no longer have to spend my
    time cleaning up for other peoples mistakes but I doubt that the
    security behind PHP has improved.

    It feels a bit silly asking this now, but in what way? I mean,
    what at the time stuck out as an obvious security hole?

    I'll just throw out the one I saw abused the most.
    And, again, I am no longer involved maybe this went
    away eventually but....

    It was possible to get PHP to execute arbitrary commands
    sent to it when it was used on the web. I saw people
    from outside the university doing things like listing
    directories and uploading files containing potentially
    dangerous code.

    And, no, I no longer have any of the examples. It was
    possible to tighten security up to stop it but that also
    stopped things the professors and students wanted to do.

    I do not now and would never consider using PHP for anything.

    bill

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Sat Oct 24 01:59:46 2026
    From Newsgroup: comp.os.vms

    In article <nk2bhaF5j2sU1@mid.individual.net>,
    Bill Gunshannon <bill.gunshannon@gmail.com> wrote:
    On 10/23/26 17:11, Dan Cross wrote:
    In article <nk1gv8F1eecU1@mid.individual.net>,
    Bill Gunshannon <bill.gunshannon@gmail.com> wrote:
    On 10/23/26 07:51, Dan Cross wrote:
    [snip]
    When I first saw PHP, I assumed they were trying to provide an
    alternative to ASP and CFML, where one interleaved HTML and
    program snippets. The syntax was clearly inspired by Perl,
    which was popular at the time among the audience that PHP seemed
    targeted for.

    In product terms, PHP has been amazingly successful. From a
    language design perspective, well...maybe not so much.

    When I first saw PHP I saw a massive security problem. Sadly, people
    still insisted on using it. Being retired I no longer have to spend my
    time cleaning up for other peoples mistakes but I doubt that the
    security behind PHP has improved.

    It feels a bit silly asking this now, but in what way? I mean,
    what at the time stuck out as an obvious security hole?

    I'll just throw out the one I saw abused the most.
    And, again, I am no longer involved maybe this went
    away eventually but....

    It was possible to get PHP to execute arbitrary commands
    sent to it when it was used on the web. I saw people
    from outside the university doing things like listing
    directories and uploading files containing potentially
    dangerous code.

    And, no, I no longer have any of the examples. It was
    possible to tighten security up to stop it but that also
    stopped things the professors and students wanted to do.

    I do not now and would never consider using PHP for anything.

    With the disclaimer that I've never really used PHP other than
    playing around once or twice, I kind of remember that it could
    use backticks to perform command substitution, like Perl or a
    Unix shell. My guess is that if user input had `cmd` in it and
    was interpolated into a print statement or something without
    escaping, it would run a command and interpolate the output
    into whatever it printed.

    It's probably true that a language like PHP shouldn't have that
    kind of thing built into it. But it's also true that that's a
    programming error (failure to sanitize one's input).

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Simon Clubley@clubley@remove_me.eisner.decus.org-Earth.UFP to comp.os.vms on Sat Oct 24 12:12:32 2026
    From Newsgroup: comp.os.vms

    On 2026-10-23, Dan Cross <cross@spitfire.i.gajendra.net> wrote:
    In article <nk2bhaF5j2sU1@mid.individual.net>,
    Bill Gunshannon <bill.gunshannon@gmail.com> wrote:

    It was possible to get PHP to execute arbitrary commands
    sent to it when it was used on the web. I saw people
    from outside the university doing things like listing
    directories and uploading files containing potentially
    dangerous code.

    And, no, I no longer have any of the examples. It was
    possible to tighten security up to stop it but that also
    stopped things the professors and students wanted to do.

    I do not now and would never consider using PHP for anything.

    With the disclaimer that I've never really used PHP other than
    playing around once or twice, I kind of remember that it could
    use backticks to perform command substitution, like Perl or a
    Unix shell. My guess is that if user input had `cmd` in it and
    was interpolated into a print statement or something without
    escaping, it would run a command and interpolate the output
    into whatever it printed.

    It's probably true that a language like PHP shouldn't have that
    kind of thing built into it. But it's also true that that's a
    programming error (failure to sanitize one's input).


    You are correct Dan that it had to be a programming error for that
    to happen (it was not some builtin feature of PHP) but it is also
    _way_ too easy to make silly programming errors in PHP.

    Some simple examples:

    1) Equality in PHP is loose equality "==" by default. You have to use
    "===" to get strict equality. This leads to warnings like this scattered throughout the PHP manual: (See the Return Values section.)

    https://www.php.net/manual/en/function.fgetc.php

    This is a great source of subtle errors. I don't like to see PHP code
    that uses loose equality for this reason.

    2) Things that should be errors are warnings and execution continues by
    default unless you make the error reporting level more strict in your
    code. I always use strict error reporting when I have to use PHP for
    this reason.

    3) mysqli_real_escape_string() doesn't always work:

    https://www.php.net/manual/en/mysqli.real-escape-string.php

    (See the Warning: section)

    Simon.
    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Oct 24 11:59:30 2026
    From Newsgroup: comp.os.vms

    On 10/24/2026 8:12 AM, Simon Clubley wrote:
    Some simple examples:

    1) Equality in PHP is loose equality "==" by default. You have to use
    "===" to get strict equality. This leads to warnings like this scattered throughout the PHP manual: (See the Return Values section.)

    https://www.php.net/manual/en/function.fgetc.php

    This is a great source of subtle errors. I don't like to see PHP code
    that uses loose equality for this reason.

    The type juggling thing is not good.

    Sins of the past.

    Always === is a good workaround.

    2) Things that should be errors are warnings and execution continues by default unless you make the error reporting level more strict in your
    code. I always use strict error reporting when I have to use PHP for
    this reason.

    Strict is good.

    I believe you can change it globally in php.ini.

    3) mysqli_real_escape_string() doesn't always work:

    https://www.php.net/manual/en/mysqli.real-escape-string.php

    (See the Warning: section)
    It always works as documented and intended.

    First note that the recommended way to use mysqli is to use prepare. mysqli_real_escape_string only exist for extraordinary circumstances.

    Regarding the warning then:

    # This function does not add quotes around the result; they must be
    # added by the caller.

    Yes.

    $ type simon.php
    <?php

    function test($s) {
    $con = mysqli_connect('ARNEPC5', 'arne', 'hemmeligt', 'Test');
    echo sprintf("%s -> %s\n", $s, mysqli_real_escape_string($con, $s));
    }

    test('AB');
    test("A'B");
    test('A\B');


    $ php simon.php
    AB -> AB
    A'B -> A\'B
    A\B -> A\\B

    But there is a reason that the function is called escape
    and not escape_and_quote - it just escapes - it does not quote.

    People need to use:

    $sql = sprintf('SELECT ... WHERE ... f = '%s',
    mysqli_real_escape_string($con, $f));

    instead of just:

    $sql = sprintf('SELECT ... WHERE ... f = %s,
    mysqli_real_escape_string($con, $f));

    (note that the old mysql_real_escape_string did
    not quote either)

    But that is what the function does.

    # If the NO_BACKSLASH_ESCAPES SQL mode is enabled on the connection,
    # only the single quote (') is escaped, so a value placed between double
    # quotes (") can terminate the string and allow SQL injection.

    Sounds a bit cryptic but is actually relative simple.

    mysql> CREATE TABLE simon (
    -> id INTEGER NOT NULL PRIMARY KEY,
    -> txt VARCHAR(50)
    -> );
    Query OK, 0 rows affected (0.02 sec)

    mysql> INSERT INTO simon VALUES(1, 'A\\B');
    Query OK, 1 row affected (0.01 sec)

    mysql> SELECT * FROM simon;
    +----+------+
    | id | txt |
    +----+------+
    | 1 | A\B |
    +----+------+
    1 row in set (0.00 sec)

    mysql> SET @@session.sql_mode = CONCAT(@@session.sql_mode, ',NO_BACKSLASH_ESCAPES');
    Query OK, 0 rows affected (0.00 sec)

    mysql> INSERT INTO simon VALUES(2, 'A\\B');
    Query OK, 1 row affected (0.01 sec)

    mysql> SELECT * FROM simon;
    +----+------+
    | id | txt |
    +----+------+
    | 1 | A\B |
    | 2 | A\\B |
    +----+------+
    2 rows in set (0.00 sec)

    PHP mysqli_real_escape_string put backslashes in front of problematic characters.

    MySQL NO_BACKSLASH_ESCAPES tell MySQL to not treat backslashes
    special.

    It is obvious that those two do not work well together.

    Neither issue qualify as mysqli_real_escape_string not
    working in my book.

    I understand that they put the warning in though - I am sure
    some users have messed up with these.

    Arne








    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Sat Oct 24 17:22:07 2026
    From Newsgroup: comp.os.vms

    In article <11bi7bg$2mdi4$1@dont-email.me>,
    Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:
    On 2026-10-23, Dan Cross <cross@spitfire.i.gajendra.net> wrote:
    In article <nk2bhaF5j2sU1@mid.individual.net>,
    Bill Gunshannon <bill.gunshannon@gmail.com> wrote:

    It was possible to get PHP to execute arbitrary commands
    sent to it when it was used on the web. I saw people
    from outside the university doing things like listing
    directories and uploading files containing potentially
    dangerous code.

    And, no, I no longer have any of the examples. It was
    possible to tighten security up to stop it but that also
    stopped things the professors and students wanted to do.

    I do not now and would never consider using PHP for anything.

    With the disclaimer that I've never really used PHP other than
    playing around once or twice, I kind of remember that it could
    use backticks to perform command substitution, like Perl or a
    Unix shell. My guess is that if user input had `cmd` in it and
    was interpolated into a print statement or something without
    escaping, it would run a command and interpolate the output
    into whatever it printed.

    It's probably true that a language like PHP shouldn't have that
    kind of thing built into it. But it's also true that that's a
    programming error (failure to sanitize one's input).

    You are correct Dan that it had to be a programming error for that
    to happen (it was not some builtin feature of PHP) but it is also
    _way_ too easy to make silly programming errors in PHP.

    Oh, don't get me wrong; I don't thnk that PHP is a _good_
    language. But failure to validate input is not unique to PHP.

    Some simple examples:

    1) Equality in PHP is loose equality "==" by default. [...]
    2) Things that should be errors are warnings and execution continues by >default unless you make the error reporting level more strict in your
    code. I always use strict error reporting when I have to use PHP for
    this reason.
    3) mysqli_real_escape_string() doesn't always work: [...]

    I assume you've seen this? I think I may have posted it a
    couple of days ago.

    https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Oct 24 14:43:04 2026
    From Newsgroup: comp.os.vms

    On 10/23/2026 7:51 AM, Dan Cross wrote:
    In article <20261023123938.000065e7@yahoo.com>,
    Michael S <already5chosen@yahoo.com> wrote:
    On Thu, 22 Oct 2026 22:43:59 -0000 (UTC)
    Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
    PHP is a sorry mess, a long litany of sad design decisions.

    When I first saw PHP, it looked like they were trying to copy Perl,
    but not quite understanding what they were copying.

    Nowadays, it looks like theyrCOve moved on to trying to copy Python. But >>> they still donrCOt understand what theyrCOre copying.

    So why are they massively more successful than perl in their very
    lucrative niche of web server-side scripting? And why at least until
    recently [in this niche] they were massively more successful than
    python?
    My guess would be that they are doing something right.

    When I first saw PHP, I assumed they were trying to provide an
    alternative to ASP and CFML, where one interleaved HTML and
    program snippets.

    I suspect that demand created multiple similar solutions.

    PHP 1.0 : 08-Jun-1995
    ColdFusion 1.0 : 10-Jul-1995 [different sources have different dates but
    they all say July]
    ASP 1.0 : 10-Dec-1996

    Note that CFML typical use tags not script snippets. So in that
    regard it is more like JSP with JSTL and ASP.NET web forms than
    like PHP, ASP and JSP without JSTL. Or to put it differently: CFML
    was 7 years ahead of the rest.

    Arne




    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Oct 24 15:10:02 2026
    From Newsgroup: comp.os.vms

    On 10/23/2026 5:11 PM, Dan Cross wrote:
    The early web was a mess. The protocol was hugely wasteful; the
    markup language was anemic, and people were resorting to all
    kinds of bad ideas to try and build content (constructing forms
    from tables, for example, so that boxes could be aligned). The
    web had coalesced around an example from a book with a single
    addition, but like a high-school kegger, the word got out and it
    quickly got out of hand. A lot of non-technical people were
    authoring web pages and web sites by writing HTML directly.
    They didn't _want_ to become programmers.

    CFML, ASP, and PHP stepped into that world and filled a bit of a
    void. It inverted the model; you weren't writing programs to
    generate markup guided by the program's behavior, you were
    injecting behavior by embedding little snippets of programs in
    your markup. The design-oriented types who wanted to focus on
    content could largely do that. I don't think that has to be
    inherently insecure, though I can see how having someone around
    to add a bit of domain expertise to the mix can prevent a lot of
    problems down the road. Textual interpolation is a powerful
    tool; so is a chainsaw. Both can do a lot of damage.
    No doubt that the switch from CGI to ASP and PHP changed
    who could and who did make dynamic web pages.

    But at the core ASP and PHP are really just a way to
    save a gazillion "response write".

    Here is super simple example of DCL CGI:

    $ write sys$output "content-type: text/html"
    $ write sys$output ""
    $ write sys$output "<html>"
    $ write sys$output "<head>"
    $ write sys$output "<title>Show time</title>"
    $ write sys$output "</head>"
    $ write sys$output "<body>"
    $ write sys$output "<h1>Show time</h1>"
    $ write sys$output "<p>"
    $ write sys$output "Time is " + f$time() + "."
    $ write sys$output "</p>"
    $ write sys$output "</body>"
    $ write sys$output "</html>"
    $ exit

    (I chose DCL because with my Perl skills I would
    not bother the Perl gurus here with my way of writing
    Perl)

    In PHP it becomes:

    <html>
    <head>
    <title>Show time</title>
    </head>
    <body>
    <h1>Show time</h1>

    Time is <?php echo date('d-M-Y H:i:s', time()); ?>.

    </body>
    </html>

    What is the real difference here? We avoid the response
    write ($ write sys$output) for all the static pieces.
    Making it a lot more readable.

    It becomes even more clear if we look at JSP.

    First a Servlet:

    package test;

    import java.io.*;
    import java.text.*;
    import java.util.*;

    import javax.servlet.*;
    import javax.servlet.annotation.*;
    import javax.servlet.http.*;

    public class TimServlet extends HttpServlet {
    private static DateFormat df = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss");
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    PrintWriter out = response.getWriter();
    out.write("<html>\n");
    out.write("<head>\n");
    out.write("<title>Show time</title>\n");
    out.write("</head>\n");
    out.write("<body>\n");
    out.write("<h1>Show time</h1>\n");
    out.write("<p>\n");
    out.write("Time is ");
    out.write(df.format(new Date()));
    out.write(".\n");
    out.write("</p>\n");
    out.write("</body>\n");
    out.write("</html>\n");
    }
    }

    And then an equivalent JSP:

    <%@ page import="java.util.*,java.text.*" %>
    <%!
    private static DateFormat df = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss");

    <html>
    <head>
    <title>Show time</title>
    </head>
    <body>
    <h1>Show time</h1>

    Time is <% out.write(df.format(new Date())); %>.

    </body>
    </html>

    Again we save a bunch of response write (out.write) for
    all the static pieces.

    (we also save some Java declaration overhead, but that
    is just because Java is a bit verbose)

    The interesting part is what happens under the hood. JSP
    pages are not interpreted - they are compiled. Or more
    precisely: they are triple compiled. The JSP compiler
    compiles from JSP to Java source, the Java compiler
    compiles from Java source to Java byte code and the
    JVM JIT compiles from Java byte code to native code.

    So we can look at the generated Java code:

    package org.apache.jsp;

    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.servlet.jsp.*;
    import java.util.*;
    import java.text.*;

    public final class tim_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent,
    org.apache.jasper.runtime.JspSourceImports {

    private static DateFormat df = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss");

    // lots of code not relevant for this example

    public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse respons
    e)
    throws java.io.IOException, javax.servlet.ServletException {

    // more code not so relevant

    out.write('\n');
    out.write("\n");
    out.write("<html>\n");
    out.write("<head>\n");
    out.write("<title>Show time</title>\n");
    out.write("</head>\n");
    out.write("<body>\n");
    out.write("<h1>Show time</h1>\n");
    out.write("<p>\n");
    out.write("Time is ");
    out.write(df.format(new Date()));
    out.write(".\n");
    out.write("</p>\n");
    out.write("</body>\n");
    out.write("</html>\n");

    // more code not so relevant

    }
    }

    Basically the infrastructure has converted to JSP page to a
    servlet with the tedious out.write generated.

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Oct 24 15:15:05 2026
    From Newsgroup: comp.os.vms

    On 10/23/2026 8:13 PM, Bill Gunshannon wrote:
    On 10/23/26 17:11, Dan Cross wrote:
    In article <nk1gv8F1eecU1@mid.individual.net>,
    Bill Gunshannon-a <bill.gunshannon@gmail.com> wrote:
    When I first saw PHP I saw a massive security problem.-a Sadly, people
    still insisted on using it.-a Being retired I no longer have to spend my >>> time cleaning up for other peoples mistakes but I doubt that the
    security behind PHP has improved.

    It feels a bit silly asking this now, but in what way?-a I mean,
    what at the time stuck out as an obvious security hole?

    I'll just throw out the one I saw abused the most.
    And, again, I am no longer involved maybe this went
    away eventually but....

    It was possible to get PHP to execute arbitrary commands
    sent to it when it was used on the web.

    PHP has both an exec and a proc_open function.

    You can also call LIB$SPAWN form Cobol.

    In both cases it is wise to check the input.

    I saw people
    from outside the university doing things like listing
    directories and uploading files containing potentially
    dangerous code.

    File upload is a key feature in PHP. Because many web
    sited need it.

    There are also lots of ways to control file upload in PHP.

    Which should be utilized.

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Oct 24 15:34:43 2026
    From Newsgroup: comp.os.vms

    On 10/23/2026 9:59 PM, Dan Cross wrote:
    With the disclaimer that I've never really used PHP other than
    playing around once or twice, I kind of remember that it could
    use backticks to perform command substitution, like Perl or a
    Unix shell. My guess is that if user input had `cmd` in it and
    was interpolated into a print statement or something without
    escaping, it would run a command and interpolate the output
    into whatever it printed.

    Backticks can be used as short form for calling shell_exec.

    $ type dan.php
    <?php
    $cmd = 'show def';
    echo "bla `$cmd` bla\n";
    $dd1 = shell_exec($cmd);
    echo $dd1;
    $dd2 = `$cmd`;
    echo $dd2;

    $ php dan.php
    bla `show def` bla
    DISK2:[ARNE]
    DISK2:[ARNE]

    It's probably true that a language like PHP shouldn't have that
    kind of thing built into it. But it's also true that that's a
    programming error (failure to sanitize one's input).
    Practically every technology provide a way to execute external
    commands.

    Having a short form like PHP backticks is probably unique.

    But it is really just a shell_exec call.

    And of course input to that type of function should be checked.

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From kludge@kludge@panix.com (Scott Dorsey) to comp.os.vms on Sat Oct 24 15:39:31 2026
    From Newsgroup: comp.os.vms

    Dan Cross <cross@spitfire.i.gajendra.net> wrote:
    The early web was a mess. The protocol was hugely wasteful; the
    markup language was anemic, and people were resorting to all
    kinds of bad ideas to try and build content (constructing forms
    from tables, for example, so that boxes could be aligned). The
    web had coalesced around an example from a book with a single
    addition, but like a high-school kegger, the word got out and it
    quickly got out of hand. A lot of non-technical people were
    authoring web pages and web sites by writing HTML directly.
    They didn't _want_ to become programmers.

    The early web was intended to provide content, and there was some HTML
    to tell the browser basically what the content was like, but the format
    and presentation was up to the browser.

    When this was the case, writing HTML directly wasn't difficult at all.

    What happened was that people made the decision that they should be
    able to override the desires of the browser and force specific formatting
    on the material. And that ruined everything.
    --scott
    --
    "C'est un Nagra. C'est suisse, et tres, tres precis."
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Sat Oct 24 19:42:33 2026
    From Newsgroup: comp.os.vms

    In article <11bivpt$305om$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/23/2026 5:11 PM, Dan Cross wrote:
    The early web was a mess. The protocol was hugely wasteful; the
    markup language was anemic, and people were resorting to all
    kinds of bad ideas to try and build content (constructing forms
    from tables, for example, so that boxes could be aligned). The
    web had coalesced around an example from a book with a single
    addition, but like a high-school kegger, the word got out and it
    quickly got out of hand. A lot of non-technical people were
    authoring web pages and web sites by writing HTML directly.
    They didn't _want_ to become programmers.

    CFML, ASP, and PHP stepped into that world and filled a bit of a
    void. It inverted the model; you weren't writing programs to
    generate markup guided by the program's behavior, you were
    injecting behavior by embedding little snippets of programs in
    your markup. The design-oriented types who wanted to focus on
    content could largely do that. I don't think that has to be
    inherently insecure, though I can see how having someone around
    to add a bit of domain expertise to the mix can prevent a lot of
    problems down the road. Textual interpolation is a powerful
    tool; so is a chainsaw. Both can do a lot of damage.

    No doubt that the switch from CGI to ASP and PHP changed
    who could and who did make dynamic web pages.

    But at the core ASP and PHP are really just a way to
    save a gazillion "response write".

    Yup. That's exactly what I mean when I say that it "inverted
    the model": it went from using content embedded in programs, to
    program (fragment)s embedded in content. You can teach a
    designer HTML fairly easily, regardless of whether they have any
    interest in programming or not. It's not a big lift to get them
    to embed `<?php ...?>` tags into that content to add a little
    dynamic sauce. Teaching them Java, Perl, or C? That's a
    different matter.

    Here is super simple example of DCL CGI:

    $ write sys$output "content-type: text/html"
    $ write sys$output ""
    $ write sys$output "<html>"
    $ write sys$output "<head>"
    $ write sys$output "<title>Show time</title>"
    $ write sys$output "</head>"
    $ write sys$output "<body>"
    $ write sys$output "<h1>Show time</h1>"
    $ write sys$output "<p>"
    $ write sys$output "Time is " + f$time() + "."
    $ write sys$output "</p>"
    $ write sys$output "</body>"
    $ write sys$output "</html>"
    $ exit

    I guess Perl could use a "HERE" document for that:

    #!/usr/bin/perl
    use warnings;
    use strict;
    use POSIX qw(strftime);
    my $now = uc strftime "%d-%b-%Y %T", localtime;
    print <<"EOF";
    <html>
    <head>
    <title>Show time</title>
    </head>
    <body>
    <h1>Show time</h1>

    Time is $now.

    </body>
    </html>
    EOF

    (I chose DCL because with my Perl skills I would
    not bother the Perl gurus here with my way of writing
    Perl)

    "There's more than one way to do it!"

    [snip]
    The interesting part is what happens under the hood. JSP
    pages are not interpreted - they are compiled. Or more
    precisely: they are triple compiled. The JSP compiler
    compiles from JSP to Java source, the Java compiler
    compiles from Java source to Java byte code and the
    JVM JIT compiles from Java byte code to native code.

    It may be relevant to point out that PHP is basically a compiled
    to a bespoke virtual machine (Zend) at this point; the old days
    of a slow, simple interpreter are long gone.

    Facebook came up; it was (in)?famously written in PHP
    originally, but some may be familiar with the "Hack" language
    they developed that introdcued gradual typing for it; they also
    have a bespoke VM ("Hip Hop") that runs it. I doubt they care
    *too* much about what happens in the mainstream PHP world.

    https://github.com/facebook/hhvm https://research.facebook.com/publications/the-hiphop-virtual-machine/ https://engineering.fb.com/2014/03/20/developer-tools/hack-a-new-programming-language-for-hhvm/
    https://hacklang.org

    Regardless, PHP is not a good language, and there are better
    alternatives for the application space.

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Oct 24 15:51:54 2026
    From Newsgroup: comp.os.vms

    On 10/24/2026 3:42 PM, Dan Cross wrote:
    In article <11bivpt$305om$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    Here is super simple example of DCL CGI:

    $ write sys$output "content-type: text/html"
    $ write sys$output ""
    $ write sys$output "<html>"
    $ write sys$output "<head>"
    $ write sys$output "<title>Show time</title>"
    $ write sys$output "</head>"
    $ write sys$output "<body>"
    $ write sys$output "<h1>Show time</h1>"
    $ write sys$output "<p>"
    $ write sys$output "Time is " + f$time() + "."
    $ write sys$output "</p>"
    $ write sys$output "</body>"
    $ write sys$output "</html>"
    $ exit

    I guess Perl could use a "HERE" document for that:

    #!/usr/bin/perl
    use warnings;
    use strict;
    use POSIX qw(strftime);
    my $now = uc strftime "%d-%b-%Y %T", localtime;
    print <<"EOF";
    <html>
    <head>
    <title>Show time</title>
    </head>
    <body>
    <h1>Show time</h1>

    Time is $now.

    </body>
    </html>
    EOF

    (I chose DCL because with my Perl skills I would
    not bother the Perl gurus here with my way of writing
    Perl)

    "There's more than one way to do it!"
    DCL can add text blocks as well. But without symbol
    substiution.

    $ type sys$input
    content-type: text/html

    <html>
    <head>
    <title>Show time</title>
    </head>
    <body>
    <h1>Show time</h1>

    $
    $ write sys$output "Time is " + f$time() + "."
    $ type sys$input

    </body>
    </html>
    $
    $ exit

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Sat Oct 24 20:11:22 2026
    From Newsgroup: comp.os.vms

    In article <11biu7b$2vhq4$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/23/2026 7:51 AM, Dan Cross wrote:
    In article <20261023123938.000065e7@yahoo.com>,
    Michael S <already5chosen@yahoo.com> wrote:
    On Thu, 22 Oct 2026 22:43:59 -0000 (UTC)
    Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
    PHP is a sorry mess, a long litany of sad design decisions.

    When I first saw PHP, it looked like they were trying to copy Perl,
    but not quite understanding what they were copying.

    Nowadays, it looks like theyrCOve moved on to trying to copy Python. But >>>> they still donrCOt understand what theyrCOre copying.

    So why are they massively more successful than perl in their very
    lucrative niche of web server-side scripting? And why at least until
    recently [in this niche] they were massively more successful than
    python?
    My guess would be that they are doing something right.

    When I first saw PHP, I assumed they were trying to provide an
    alternative to ASP and CFML, where one interleaved HTML and
    program snippets.

    I suspect that demand created multiple similar solutions.

    Probably. Early development for the web was annoyingly tedious.
    I remember being shocked at the things that were omitted, like
    any semblence of a session model, a basic concept of identity
    (beyond "HTTP Basic Authentication" headers), or any effort to
    integrate with the underlying host's models at more than a
    cursory level; certainly, efforts to improve the situation were
    welcome along many dimensions.

    PHP 1.0 : 08-Jun-1995
    ColdFusion 1.0 : 10-Jul-1995 [different sources have different dates but >they all say July]
    ASP 1.0 : 10-Dec-1996

    The PHP of June 1995 did not look like the PHP one sees today.
    The history at https://www.php.net/manual/en/history.php.php
    describes the evolution and gives an example of PHP/FI 2.0 circa
    1997/1998; it is very different. That page says that PHP 3.0 is
    the first version that's clearly related to the modern language.

    Note that CFML typical use tags not script snippets. So in that
    regard it is more like JSP with JSTL and ASP.NET web forms than
    like PHP, ASP and JSP without JSTL. Or to put it differently: CFML
    was 7 years ahead of the rest.

    Ok. I just thought it was very strange that so many people
    embraced the web so enthusiastically; the protocol was awful,
    the markup language underpowered (it couldn't even represent
    basic mathematics, like fractions!), and again, no session
    layer; all of that had to be built from scratch using cookies
    or tokens in a URI or something, and any sort of integration
    with existing authentication or identity sources similarly.
    What about it was compelling? It was like a bunch of people
    suddenly decided that building applications on top of anonymous
    FTP was a good idea. I guess it had visual elements you
    couldn't easily expose with VTAM over 3270s.

    Of course, it's much better _now_, but lots of vestiges of those
    early mistakes still linger on; with a proper session layer, for
    example, CSRF would not be a thing that people still have to
    worry about, and SASL never really caught on, though OIDC is...
    ok, I guess?

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Sat Oct 24 21:04:17 2026
    From Newsgroup: comp.os.vms

    In article <11bj186$30n6f$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/23/2026 9:59 PM, Dan Cross wrote:
    With the disclaimer that I've never really used PHP other than
    playing around once or twice, I kind of remember that it could
    use backticks to perform command substitution, like Perl or a
    Unix shell. My guess is that if user input had `cmd` in it and
    was interpolated into a print statement or something without
    escaping, it would run a command and interpolate the output
    into whatever it printed.

    Backticks can be used as short form for calling shell_exec.

    Yes.

    $ type dan.php
    <?php
    $cmd = 'show def';
    echo "bla `$cmd` bla\n";
    $dd1 = shell_exec($cmd);
    echo $dd1;
    $dd2 = `$cmd`;
    echo $dd2;

    $ php dan.php
    bla `show def` bla
    DISK2:[ARNE]
    DISK2:[ARNE]

    It's probably true that a language like PHP shouldn't have that
    kind of thing built into it. But it's also true that that's a
    programming error (failure to sanitize one's input).

    Practically every technology provide a way to execute external
    commands.

    Indeed, but the danger isn't the mechanism, it is the specific
    implementation. PHP is very often used to build applications
    that are exposed to all kinds of untrusted inputs. Backticks in
    an environment where much input is untrusted, for example, seem
    unnecessarily permissive.

    term% php
    <?php
    $cmd='`pwd`';
    echo $cmd;
    eval("echo $cmd;");

    `pwd`/home/cross
    term%

    Sure, its a cheat to use `eval` here, but maybe interpolation of
    backticks should not be allowed anywhere except an assignment,
    and perhaps PHP shouldn't have an `eval`.

    Having a short form like PHP backticks is probably unique.

    No, that syntax comes from the Unix shell by way of Perl.

    And there are other historical antecedents; consider `ADDRESS
    CMS` in Rexx on VM/CMS, for example. Sometimes these are
    useful: the ability to `ADDRESS XEDIT` made REXX programs
    extremely powerful in that environment. But letting untrusted
    sending commands derived from unfiltered, untrusted, inputs
    would be dangerous.

    But it is really just a shell_exec call.

    And of course input to that type of function should be checked.

    Yup.

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Sat Oct 24 21:07:06 2026
    From Newsgroup: comp.os.vms

    In article <11bj28d$313cm$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    [snip]
    DCL can add text blocks as well. But without symbol
    substiution.

    Sure.

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Sat Oct 24 22:43:34 2026
    From Newsgroup: comp.os.vms

    On Sat, 24 Oct 2026 11:59:30 -0400, Arne Vajh|+j wrote:

    Always === is a good workaround.

    A workaround is still a workaround. The weak typing that led to its
    necessity is not rCLgoodrCY.

    First note that the recommended way to use mysqli is to use prepare. mysqli_real_escape_string only exist for extraordinary
    circumstances.

    What do you use for LIKE and REGEXP clauses?

    But there is a reason that the function is called escape
    and not escape_and_quote - it just escapes - it does not quote.

    You need a function that turns an object in the application language
    into an appropriate literal in the query language, including quotes
    where appropriate but leaving them out if not. For example, whatever
    in your language maps to rCLNULLrCY in SQL must never be quoted!

    For example, hererCOs function IrCOve been using in Python code, that
    does strictly standard SQL quoting:

    def sql_string(s) :
    "returns an SQL string literal that evaluates to s."
    if s == None :
    q = "null"
    elif isinstance(s, int) :
    q = "%d" % s
    elif isinstance(s, (bytes, bytearray)) :
    q = "X'" + "".join("%02x" % d for d in s) + "'"
    elif isinstance(s, str) :
    q = "'" + s.replace("'", "''") + "'"
    else :
    raise TypeError("can only convert bytes, str, int or None types")
    #end if
    return q
    #end sql_string

    PHP mysqli_real_escape_string put backslashes in front of
    problematic characters.

    Note that backslash-escapes are not standard SQL.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Sat Oct 24 22:47:53 2026
    From Newsgroup: comp.os.vms

    On Sat, 24 Oct 2026 15:10:02 -0400, Arne Vajh|+j wrote:

    But at the core ASP and PHP are really just a way to save a
    gazillion "response write".

    Perl had shell-style here-docs to get around this.

    Python has triple-quoted strings which can extend across multiple
    lines, and also C-style implicit string concatenation, so you can
    write things like this:

    out.write \
    (
    "<dialog class=\"example\" id=\"test-dialog\">\n"
    "<form id=\"dialog-form\" method=\"post\" action=\"/submit\">\n"
    "<p><label>Need input: <input type=\"text\" name=\"input\"></label>\n"
    "<p><button id=\"cancel\">Cancel</button>\n"
    "<p><button id=\"submit\">OK</button>\n"
    "</form>\n"
    "</dialog>\n"
    "<div>\n"
    "<button id=\"show-dialog\">Show Dialog</button>\n"
    "</div>\n"
    )
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Sat Oct 24 22:51:05 2026
    From Newsgroup: comp.os.vms

    On Sat, 24 Oct 2026 15:34:43 -0400, Arne Vajh|+j wrote:

    Having a short form like PHP backticks is probably unique.

    Another feature copied from Perl, which in turn adopted the common
    convention from older Unix shells.

    Backticks still work in current POSIX-compliant shells, but these days
    many prefer $( ... )-style bracketing.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Oct 24 19:46:12 2026
    From Newsgroup: comp.os.vms

    On 10/24/2026 6:43 PM, Lawrence DrCOOliveiro wrote:
    On Sat, 24 Oct 2026 11:59:30 -0400, Arne Vajh|+j wrote:
    First note that the recommended way to use mysqli is to use prepare.
    mysqli_real_escape_string only exist for extraordinary
    circumstances.

    What do you use for LIKE and REGEXP clauses?

    prepare of course.

    PHP mysqli_real_escape_string put backslashes in front of
    problematic characters.

    Note that backslash-escapes are not standard SQL.

    True.

    But mysqli_ is only for MySQL, so ...

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Oct 24 19:49:00 2026
    From Newsgroup: comp.os.vms

    On 10/24/2026 6:43 PM, Lawrence DrCOOliveiro wrote:
    But there is a reason that the function is called escape
    and not escape_and_quote - it just escapes - it does not quote.

    You need a function that turns an object in the application language
    into an appropriate literal in the query language, including quotes
    where appropriate but leaving them out if not. For example, whatever
    in your language maps to rCLNULLrCY in SQL must never be quoted!

    For example, hererCOs function IrCOve been using in Python code, that
    does strictly standard SQL quoting:

    def sql_string(s) :
    "returns an SQL string literal that evaluates to s."
    if s == None :
    q = "null"
    elif isinstance(s, int) :
    q = "%d" % s
    elif isinstance(s, (bytes, bytearray)) :
    q = "X'" + "".join("%02x" % d for d in s) + "'"
    elif isinstance(s, str) :
    q = "'" + s.replace("'", "''") + "'"
    else :
    raise TypeError("can only convert bytes, str, int or None types")
    #end if
    return q
    #end sql_string
    Two good rules:
    1) never ever do you own quoting code instead of using prepare
    2) never ever believe anything a person writing own quoting code instead
    of using prepare says about security

    import pymysql

    def sql_string(s) :
    "returns an SQL string literal that evaluates to s."
    if s == None :
    q = "null"
    elif isinstance(s, int) :
    q = "%d" % s
    elif isinstance(s, (bytes, bytearray)) :
    q = "X'" + "".join("%02x" % d for d in s) + "'"
    elif isinstance(s, str) :
    q = "'" + s.replace("'", "''") + "'"
    else :
    raise TypeError("can only convert bytes, str, int or None types")
    #end if
    return q
    #end sql_string

    def test(b):
    print(b + ' -> SELECT f1,f2 FROM t1 WHERE f2 = ' + sql_string(b))
    con = pymysql.connect(host='arnepc5',user='arne',password='hemmeligt',db='test')
    c = con.cursor()
    c.execute('SELECT f1,f2 FROM t1 WHERE f2 = ' + sql_string(b))
    data = c.fetchall()
    c.close()
    for row in data:
    print('%d %s' % (row[0], row[1]))
    con.close()

    test("BB")
    test("BB\\' or 1=1 #")

    gives:

    BB -> SELECT f1,f2 FROM t1 WHERE f2 = 'BB'
    2 BB
    BB\' or 1=1 # -> SELECT f1,f2 FROM t1 WHERE f2 = 'BB\'' or 1=1 #'
    1 A
    2 BB
    3 CCC

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Oct 24 20:02:57 2026
    From Newsgroup: comp.os.vms

    On 10/23/2026 3:51 PM, Lawrence DrCOOliveiro wrote:
    On Fri, 23 Oct 2026 10:23:16 -0400, Arne Vajh|+j wrote:
    Todays PHP is many things. There is a professional PHP segment using
    Laravel, Symfony, Doctrine, Eloquent etc. powering many of the
    worlds largest web sites.

    Most or all of those are still built around the strict
    one-page-per-file request/response model. They canrCOt handle
    WebSockets, just for example.

    PHP applications often do web sockets.

    Does not seem to be a problem in the real world.

    Or basic background tasks, that might
    need to run independently of page requests from users.

    The simple rule for starting background tasks directly in
    web applications is: don't do it.

    The advanced rule for starting background tasks directly in
    web applications is: only do it if your server/framework
    configuration allows for configuring separate pools for
    request workers and for background workers.

    Otherwise nobody knows how many workers there will be running.

    The safe approach is for the web app to hand it over to
    another application - the web application put the task
    in a message queue and a processor application pick them
    up and execute.

    That said then PHP has a huge problem in this regard.

    Not due to the language, but due to the many different
    executions models.

    CGI, FastCGI, mod_apache, isapi, RoadRunner, FrankenPHP
    etc..

    Some of them could implement background task running
    support, but other simply can't.

    Arne





    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Oct 24 20:15:42 2026
    From Newsgroup: comp.os.vms

    On 10/24/2026 4:11 PM, Dan Cross wrote:
    In article <11biu7b$2vhq4$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    PHP 1.0 : 08-Jun-1995
    ColdFusion 1.0 : 10-Jul-1995 [different sources have different dates but
    they all say July]
    ASP 1.0 : 10-Dec-1996

    The PHP of June 1995 did not look like the PHP one sees today.
    The history at https://www.php.net/manual/en/history.php.php
    describes the evolution and gives an example of PHP/FI 2.0 circa
    1997/1998; it is very different. That page says that PHP 3.0 is
    the first version that's clearly related to the modern language.
    Wikipedia PHP article has the same example.

    Very different indeed.

    But it is still mixing code and HTML (for whatever reason
    the example does not actually use HTML tags but it could
    have).

    It is not <?php ... ?> but SSI style <!-- ... --> and
    the language is not C style but more basic'ish.

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Oct 24 20:21:41 2026
    From Newsgroup: comp.os.vms

    On 10/24/2026 5:04 PM, Dan Cross wrote:
    In article <11bj186$30n6f$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/23/2026 9:59 PM, Dan Cross wrote:
    It's probably true that a language like PHP shouldn't have that
    kind of thing built into it. But it's also true that that's a
    programming error (failure to sanitize one's input).

    Practically every technology provide a way to execute external
    commands.

    Indeed, but the danger isn't the mechanism, it is the specific implementation. PHP is very often used to build applications
    that are exposed to all kinds of untrusted inputs. Backticks in
    an environment where much input is untrusted, for example, seem
    unnecessarily permissive.

    Almost all languages has the capability including languages
    used for web.

    Even if Bill write CGI script in VMS Cobol he could call LIB$SPAWN.

    And unlike many other languages then it easy to block in PHP.

    Just add:

    disable_functions = shell_exec

    to php.ini and it is gone.

    term% php
    <?php
    $cmd='`pwd`';
    echo $cmd;
    eval("echo $cmd;");

    `pwd`/home/cross
    term%

    Sure, its a cheat to use `eval` here, but maybe interpolation of
    backticks should not be allowed anywhere except an assignment,
    and perhaps PHP shouldn't have an `eval`.
    eval is another function that need to be very strictly controlled.

    Arne


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Sun Oct 25 00:26:53 2026
    From Newsgroup: comp.os.vms

    On Sat, 24 Oct 2026 20:02:57 -0400, Arne Vajh|+j wrote:

    PHP applications often do web sockets.

    Does not seem to be a problem in the real world.

    They canrCOt. WebSocket connections require an ongoing running task to
    manage the server end of the connection, which doesnrCOt fit into the
    PHP request/response model.

    The simple rule for starting background tasks directly in
    web applications is: don't do it.

    If an application needs background tasks, why should that change just
    because the UI is now web-based?
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Sun Oct 25 00:28:36 2026
    From Newsgroup: comp.os.vms

    On Sat, 24 Oct 2026 19:49:00 -0400, Arne Vajh|+j wrote:

    test("BB\\' or 1=1 #")

    On 10/24/2026 6:43 PM, Lawrence DrCOOliveiro wrote:

    Note that backslash-escapes are not standard SQL.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Sun Oct 25 00:32:01 2026
    From Newsgroup: comp.os.vms

    On Sat, 24 Oct 2026 19:46:12 -0400, Arne Vajh|+j wrote:

    What do you use for LIKE and REGEXP clauses?

    prepare of course.

    You mean, mysqli_stmt_prepare()? You think this will work?

    mysqli_stmt_prepare(-2stmt-+, "select -2table-+ from -2table-+ where -2field-+ like \"%?%\"")

    ?
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Oct 24 20:38:31 2026
    From Newsgroup: comp.os.vms

    On 10/24/2026 3:42 PM, Dan Cross wrote:
    In article <11bivpt$305om$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    The interesting part is what happens under the hood. JSP
    pages are not interpreted - they are compiled. Or more
    precisely: they are triple compiled. The JSP compiler
    compiles from JSP to Java source, the Java compiler
    compiles from Java source to Java byte code and the
    JVM JIT compiles from Java byte code to native code.

    It may be relevant to point out that PHP is basically a compiled
    to a bespoke virtual machine (Zend) at this point; the old days
    of a slow, simple interpreter are long gone.

    The traditional Zend engine is like traditional CPython:
    convert the source to an intermediate byte code and
    interpret that.

    Performance is interpreter like not JIT compiler like.

    Zend added some JIT in 8.0 and CPython in 3.13.

    CPython JIT is a joke performance wise.

    Zend JIT may be a little better.

    Facebook came up; it was (in)?famously written in PHP
    originally, but some may be familiar with the "Hack" language
    they developed that introdcued gradual typing for it; they also
    have a bespoke VM ("Hip Hop") that runs it. I doubt they care
    *too* much about what happens in the mainstream PHP world.
    Hack is how Facebook think PHP 7.x & 8.x should have been.

    Funny enough given where this discussion started, then it
    does not support mixing of code and HTML - it is all code.

    HHVM JIT compiles. And is pretty good at it.

    And just to complete: PeachPie on CLR and Quercus on JVM obviously
    also JIT compile, but are not as good as HHVM.

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Sun Oct 25 00:45:08 2026
    From Newsgroup: comp.os.vms

    In article <11bji28$36hh1$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/24/2026 5:04 PM, Dan Cross wrote:
    In article <11bj186$30n6f$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/23/2026 9:59 PM, Dan Cross wrote:
    It's probably true that a language like PHP shouldn't have that
    kind of thing built into it. But it's also true that that's a
    programming error (failure to sanitize one's input).

    Practically every technology provide a way to execute external
    commands.

    Indeed, but the danger isn't the mechanism, it is the specific
    implementation. PHP is very often used to build applications
    that are exposed to all kinds of untrusted inputs. Backticks in
    an environment where much input is untrusted, for example, seem
    unnecessarily permissive.

    Almost all languages has the capability including languages
    used for web.

    ...and?

    Even if Bill write CGI script in VMS Cobol he could call LIB$SPAWN.

    ...and?

    And unlike many other languages then it easy to block in PHP.

    Just add:

    disable_functions = shell_exec

    to php.ini and it is gone.

    This misses the point. A) the person writing the program has to
    be the one configuring `php.ini`. B) you are comparing
    interfaces that are designed for _explicit_ use in controlled
    ways with one designed to easily interpolate values that are
    ambient *in the lexical context of the invoking code*. One is
    significantly _easier_ to misuse than the other. Because that
    language is also designed to process inherently untrusted data,
    it must be used with significant care; yet it is positioned as
    the easy-to-use beginners language. That's a dangerous mix.

    term% php
    <?php
    $cmd='`pwd`';
    echo $cmd;
    eval("echo $cmd;");

    `pwd`/home/cross
    term%

    Sure, its a cheat to use `eval` here, but maybe interpolation of
    backticks should not be allowed anywhere except an assignment,
    and perhaps PHP shouldn't have an `eval`.

    eval is another function that need to be very strictly controlled.

    Yup.

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Oct 24 20:45:24 2026
    From Newsgroup: comp.os.vms

    On 10/24/2026 1:22 PM, Dan Cross wrote:
    I assume you've seen this? I think I may have posted it a
    couple of days ago.

    https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/
    You have posted it before.

    I am not sure whether to laugh or cry.

    Stuff like:

    <quote>
    Subclasses cannot override private methods. Subclass overrides of public methods canrCOt even see, let alone call, the superclassrCOs private
    methods. Problematic for, say, test mocks.
    </quote>

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Oct 24 21:02:37 2026
    From Newsgroup: comp.os.vms

    On 10/24/2026 8:32 PM, Lawrence DrCOOliveiro wrote:
    On Sat, 24 Oct 2026 19:46:12 -0400, Arne Vajh|+j wrote:
    What do you use for LIKE and REGEXP clauses?

    prepare of course.

    You mean, mysqli_stmt_prepare()? You think this will work?

    mysqli_stmt_prepare(-2stmt-+, "select -2table-+ from -2table-+ where -2field-+ like \"%?%\"")

    ?

    No.

    The syntax is:

    mysqli_stmt_prepare(-2stmt-+, "select -2table-+ from -2table-+ where -2field-+ like ?")

    and then the value is:

    "%" + s + "%"

    Parameters has to be values.

    It is not a library thing - it is a SQL thing (usually -
    implementations may differ).

    mysql> SELECT * FROM t1 WHERE f2 LIKE 'B%';
    +----+------+
    | f1 | f2 |
    +----+------+
    | 2 | BB |
    +----+------+
    1 row in set (0.00 sec)

    mysql> PREPARE stmt FROM 'SELECT * FROM t1 WHERE f2 LIKE ?';
    Query OK, 0 rows affected (0.00 sec)
    Statement prepared

    mysql> SET @f2 = 'B%';
    Query OK, 0 rows affected (0.00 sec)

    mysql> EXECUTE stmt USING @f2;
    +----+------+
    | f1 | f2 |
    +----+------+
    | 2 | BB |
    +----+------+
    1 row in set (0.00 sec)

    mysql> DEALLOCATE PREPARE stmt;
    Query OK, 0 rows affected (0.00 sec)

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Sun Oct 25 01:04:38 2026
    From Newsgroup: comp.os.vms

    In article <11bjj1q$36q4q$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/24/2026 3:42 PM, Dan Cross wrote:
    In article <11bivpt$305om$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    The interesting part is what happens under the hood. JSP
    pages are not interpreted - they are compiled. Or more
    precisely: they are triple compiled. The JSP compiler
    compiles from JSP to Java source, the Java compiler
    compiles from Java source to Java byte code and the
    JVM JIT compiles from Java byte code to native code.

    It may be relevant to point out that PHP is basically a compiled
    to a bespoke virtual machine (Zend) at this point; the old days
    of a slow, simple interpreter are long gone.

    The traditional Zend engine is like traditional CPython:
    convert the source to an intermediate byte code and
    interpret that.

    Yes. Zend is a virtual machine that executes a bytecode,
    similar to the JVM, BEAM, etc.

    Zend arrived with PHP4. Prior to that, PHP just used a simple
    interpreter that walked a parse tree and executed the program as
    directly.

    Performance is interpreter like not JIT compiler like.

    Zend added some JIT in 8.0 and CPython in 3.13.

    CPython JIT is a joke performance wise.

    Zend JIT may be a little better.

    The HHVM paper was presented at OOPSLA '14, citing PHP5 as
    current; that was the Zend 2 era. They don't actually mention
    Zend by name, but say, "The most popular PHP implementation is a straightforward interpreter [25]." (Reference 25 is just,
    "PHP5. Web site: http://php.net.")

    The conclusion is that, while Zend was _likely_ an improvement
    over the previous interpreter that executed directly from the
    parse tree, it wasn't very good otherwise; probably only a
    little more sophisticated than the one from TPOP.

    Facebook came up; it was (in)?famously written in PHP
    originally, but some may be familiar with the "Hack" language
    they developed that introdcued gradual typing for it; they also
    have a bespoke VM ("Hip Hop") that runs it. I doubt they care
    *too* much about what happens in the mainstream PHP world.
    Hack is how Facebook think PHP 7.x & 8.x should have been.

    Funny enough given where this discussion started, then it
    does not support mixing of code and HTML - it is all code.

    Huh. Weird.

    HHVM JIT compiles. And is pretty good at it.

    One should hope so. They dove into a fair bit of prior art,
    including LuaJIT, which is often given as an example of a
    best-in-class JIT.

    And just to complete: PeachPie on CLR and Quercus on JVM obviously
    also JIT compile, but are not as good as HHVM.

    Yup. It's a common technique.

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Sun Oct 25 01:14:13 2026
    From Newsgroup: comp.os.vms

    In article <11bjjen$36tte$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/24/2026 1:22 PM, Dan Cross wrote:
    I assume you've seen this? I think I may have posted it a
    couple of days ago.

    https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/
    You have posted it before.

    I am not sure whether to laugh or cry.

    Stuff like:

    <quote>
    Subclasses cannot override private methods. Subclass overrides of public >methods canrCOt even see, let alone call, the superclassrCOs private >methods. Problematic for, say, test mocks.
    </quote>

    This point was listed as a weakness in the critique. It begs
    the question, however, what does that sentence mean to you?

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Oct 24 21:20:25 2026
    From Newsgroup: comp.os.vms

    On 10/24/2026 9:14 PM, Dan Cross wrote:
    In article <11bjjen$36tte$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/24/2026 1:22 PM, Dan Cross wrote:
    I assume you've seen this? I think I may have posted it a
    couple of days ago.

    https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/
    You have posted it before.

    I am not sure whether to laugh or cry.

    Stuff like:

    <quote>
    Subclasses cannot override private methods. Subclass overrides of public
    methods canrCOt even see, let alone call, the superclassrCOs private
    methods. Problematic for, say, test mocks.
    </quote>

    This point was listed as a weakness in the critique. It begs
    the question, however, what does that sentence mean to you?
    It tells that the author is pretty clueless about OOP.

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Sun Oct 25 01:30:18 2026
    From Newsgroup: comp.os.vms

    In article <11bjlgb$37fah$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/24/2026 9:14 PM, Dan Cross wrote:
    In article <11bjjen$36tte$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/24/2026 1:22 PM, Dan Cross wrote:
    I assume you've seen this? I think I may have posted it a
    couple of days ago.

    https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/
    You have posted it before.

    I am not sure whether to laugh or cry.

    Stuff like:

    <quote>
    Subclasses cannot override private methods. Subclass overrides of public >>> methods canrCOt even see, let alone call, the superclassrCOs private
    methods. Problematic for, say, test mocks.
    </quote>

    This point was listed as a weakness in the critique. It begs
    the question, however, what does that sentence mean to you?

    It tells that the author is pretty clueless about OOP.

    Are you sure? Is there a single, universal, definition of the
    semantics of `private` in Object-Oriented languages? (Hint:
    have you ever used Ruby? Smalltalk?)

    Can you think of another explanation they may be driving at?
    For instance, mabye they are questioning why a dynamic language
    like PHP has a definition of `private` that is as rigid as
    C++'s, while not also providing a `friend`-like abstraction.

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Sun Oct 25 01:31:22 2026
    From Newsgroup: comp.os.vms

    On Sat, 24 Oct 2026 21:02:37 -0400, Arne Vajh|+j wrote:

    The syntax is:

    mysqli_stmt_prepare(-2stmt-+, "select -2table-+ from -2table-+ where -2field-+
    like ?")

    and then the value is:

    "%" + s + "%"

    Shall I point out what is wrong with that?
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Sun Oct 25 01:34:03 2026
    From Newsgroup: comp.os.vms

    On Sat, 24 Oct 2026 20:45:24 -0400, Arne Vajh|+j wrote:

    https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

    I am not sure whether to laugh or cry.

    Discussing the PHP bug on another forum, another commenter offered
    this little gem:

    $a = INF;
    $b = [];
    $c = (object)[];

    var_dump($a < $b); // true, as INF is less than an array
    var_dump($b < $c); // true, as an array is less than an object
    var_dump($c < $a); // true, as an object is less than INF

    Is there such a thing as a rCLrock-paper-scissorsrCY sorting algorithm?
    Seems like PHP has it ...
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From kludge@kludge@panix.com (Scott Dorsey) to comp.os.vms on Sun Oct 25 19:12:43 2026
    From Newsgroup: comp.os.vms

    Dan Cross <cross@spitfire.i.gajendra.net> wrote:
    Probably. Early development for the web was annoyingly tedious.
    I remember being shocked at the things that were omitted, like
    any semblence of a session model, a basic concept of identity
    (beyond "HTTP Basic Authentication" headers), or any effort to
    integrate with the underlying host's models at more than a
    cursory level; certainly, efforts to improve the situation were
    welcome along many dimensions.

    It's not FOR that. It's for displaying hyperlinked data. It was never intended to be stateful, it was never intended to be bidirectional and
    replace forms applications. If you wanted that, a dedicated application
    was how you were expected to do it. But then everybody wanted the web
    to do everything all of a sudden and everything went wrong.

    Ok. I just thought it was very strange that so many people
    embraced the web so enthusiastically; the protocol was awful,
    the markup language underpowered (it couldn't even represent
    basic mathematics, like fractions!), and again, no session
    layer; all of that had to be built from scratch using cookies
    or tokens in a URI or something, and any sort of integration
    with existing authentication or identity sources similarly.
    What about it was compelling? It was like a bunch of people
    suddenly decided that building applications on top of anonymous
    FTP was a good idea. I guess it had visual elements you
    couldn't easily expose with VTAM over 3270s.

    Agreed. But the web was a wonderful thing and well-designed for
    what it was designed for. You can't blame the folks who designed
    it when so many people decided they wanted it to be something
    totally different.
    --scott
    --
    "C'est un Nagra. C'est suisse, et tres, tres precis."
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Mon Oct 26 00:40:19 2026
    From Newsgroup: comp.os.vms

    In article <11bm2db$nkq$1@panix2.panix.com>,
    Scott Dorsey <kludge@panix.com> wrote:
    Dan Cross <cross@spitfire.i.gajendra.net> wrote:
    Probably. Early development for the web was annoyingly tedious.
    I remember being shocked at the things that were omitted, like
    any semblence of a session model, a basic concept of identity
    (beyond "HTTP Basic Authentication" headers), or any effort to
    integrate with the underlying host's models at more than a
    cursory level; certainly, efforts to improve the situation were
    welcome along many dimensions.

    It's not FOR that. It's for displaying hyperlinked data. It was never >intended to be stateful, it was never intended to be bidirectional and >replace forms applications. If you wanted that, a dedicated application
    was how you were expected to do it. But then everybody wanted the web
    to do everything all of a sudden and everything went wrong.

    Well... Yeah. What I said was, "early development for the web
    was annoyingly tedious." As you said, it just wasn't built for
    that; my post was a list of deficiencies I observed at the time
    for development with the web model.

    Ok. I just thought it was very strange that so many people
    embraced the web so enthusiastically; the protocol was awful,
    the markup language underpowered (it couldn't even represent
    basic mathematics, like fractions!), and again, no session
    layer; all of that had to be built from scratch using cookies
    or tokens in a URI or something, and any sort of integration
    with existing authentication or identity sources similarly.
    What about it was compelling? It was like a bunch of people
    suddenly decided that building applications on top of anonymous
    FTP was a good idea. I guess it had visual elements you
    couldn't easily expose with VTAM over 3270s.

    Agreed. But the web was a wonderful thing and well-designed for
    what it was designed for. You can't blame the folks who designed
    it when so many people decided they wanted it to be something
    totally different.

    I agree with you that it's not reasonable to blame them for the
    session layer and the rest that came from people wanting to use
    it for building actual applications, which was not the
    originally intended use case, though Brenners-Lee's browser
    for the NeXT _was_ bidirectional.

    But they don't escape criticism for HTTP and HTML. There wwas
    plenty of prior art for other data formats and protocols that
    could have been brought to bear that would have avoided the
    inefficiencies of HTTP. HTML was the example from Charles
    Goldfarb's book on SGML, plus anchors. Both could have been
    significantly better very early on, if not from the start.

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Fred. Zwarts@F.Zwarts@HetNet.nl to comp.os.vms on Mon Oct 26 10:45:11 2026
    From Newsgroup: comp.os.vms

    Op 24.okt.2026 om 22:11 schreef Dan Cross:
    In article <11biu7b$2vhq4$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/23/2026 7:51 AM, Dan Cross wrote:
    In article <20261023123938.000065e7@yahoo.com>,
    Michael S <already5chosen@yahoo.com> wrote:
    On Thu, 22 Oct 2026 22:43:59 -0000 (UTC)
    Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
    PHP is a sorry mess, a long litany of sad design decisions.

    When I first saw PHP, it looked like they were trying to copy Perl,
    but not quite understanding what they were copying.

    Nowadays, it looks like theyrCOve moved on to trying to copy Python. But >>>>> they still donrCOt understand what theyrCOre copying.

    So why are they massively more successful than perl in their very
    lucrative niche of web server-side scripting? And why at least until
    recently [in this niche] they were massively more successful than
    python?
    My guess would be that they are doing something right.

    When I first saw PHP, I assumed they were trying to provide an
    alternative to ASP and CFML, where one interleaved HTML and
    program snippets.

    I suspect that demand created multiple similar solutions.

    Probably. Early development for the web was annoyingly tedious.
    I remember being shocked at the things that were omitted, like
    any semblence of a session model, a basic concept of identity
    (beyond "HTTP Basic Authentication" headers), or any effort to
    integrate with the underlying host's models at more than a
    cursory level; certainly, efforts to improve the situation were
    welcome along many dimensions.

    PHP 1.0 : 08-Jun-1995
    ColdFusion 1.0 : 10-Jul-1995 [different sources have different dates but
    they all say July]
    ASP 1.0 : 10-Dec-1996

    The PHP of June 1995 did not look like the PHP one sees today.
    The history at https://www.php.net/manual/en/history.php.php
    describes the evolution and gives an example of PHP/FI 2.0 circa
    1997/1998; it is very different. That page says that PHP 3.0 is
    the first version that's clearly related to the modern language.

    Note that CFML typical use tags not script snippets. So in that
    regard it is more like JSP with JSTL and ASP.NET web forms than
    like PHP, ASP and JSP without JSTL. Or to put it differently: CFML
    was 7 years ahead of the rest.

    Ok. I just thought it was very strange that so many people
    embraced the web so enthusiastically; the protocol was awful,
    the markup language underpowered (it couldn't even represent
    basic mathematics, like fractions!),

    That is out of the context of that time.
    At the time it was built most people did not use something that could
    display mathematics and fractions. For quite some time the line mode
    browser (and later lynx) was the most used browser. A graphics browser
    came much later and only then there grew a need for other characters
    then those that could be displayed on a VT200.

    and again, no session
    layer; all of that had to be built from scratch using cookies
    or tokens in a URI or something, and any sort of integration
    with existing authentication or identity sources similarly.
    What about it was compelling? It was like a bunch of people
    suddenly decided that building applications on top of anonymous
    FTP was a good idea. I guess it had visual elements you
    couldn't easily expose with VTAM over 3270s.

    Of course, it's much better _now_, but lots of vestiges of those
    early mistakes still linger on; with a proper session layer, for
    example, CSRF would not be a thing that people still have to
    worry about, and SASL never really caught on, though OIDC is...
    ok, I guess?

    - Dan C.


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Mon Oct 26 16:48:52 2026
    From Newsgroup: comp.os.vms

    In article <11bn7f8$2s502$1@dont-email.me>,
    Fred. Zwarts <F.Zwarts@HetNet.nl> wrote:
    Op 24.okt.2026 om 22:11 schreef Dan Cross:
    [snip]
    Ok. I just thought it was very strange that so many people
    embraced the web so enthusiastically; the protocol was awful,
    the markup language underpowered (it couldn't even represent
    basic mathematics, like fractions!),

    That is out of the context of that time.

    Not really. Tim Brenners-Lee wrote the initial browser on the
    NeXT;

    At the time it was built most people did not use something that could
    display mathematics and fractions. For quite some time the line mode
    browser (and later lynx) was the most used browser. A graphics browser
    came much later and only then there grew a need for other characters
    then those that could be displayed on a VT200.

    Is this true? `nroff` with `neqn` could produce basic, ASCII
    art equations that displayed decently well on terminals back in
    the 1980s. Certainly lots of folks had bitmapped graphics
    displays by the early 90s.

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Bill Gunshannon@bill.gunshannon@gmail.com to comp.os.vms on Mon Oct 26 14:10:51 2026
    From Newsgroup: comp.os.vms

    On 10/24/26 20:21, Arne Vajh|+j wrote:
    On 10/24/2026 5:04 PM, Dan Cross wrote:
    In article <11bj186$30n6f$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/23/2026 9:59 PM, Dan Cross wrote:
    It's probably true that a language like PHP shouldn't have that
    kind of thing built into it.-a But it's also true that that's a
    programming error (failure to sanitize one's input).

    Practically every technology provide a way to execute external
    commands.

    Indeed, but the danger isn't the mechanism, it is the specific
    implementation.-a PHP is very often used to build applications
    that are exposed to all kinds of untrusted inputs.-a Backticks in
    an environment where much input is untrusted, for example, seem
    unnecessarily permissive.

    Almost all languages has the capability including languages
    used for web.

    Even if Bill write CGI script in VMS Cobol he could call LIB$SPAWN.

    I have written CGI in COBOL, but not on VMS as I have never had reason
    to run a web server on VMS. And I would certainly not write something
    that allowed outside third parties to call LIB$SPAWN to execute
    arbitrary code snippets.


    And unlike many other languages then it easy to block in PHP.

    Just add:

    disable_functions = shell_exec

    to php.ini and it is gone.

    I take it you missed the part where I said the guys who signed my
    paycheck said you can't disable it.

    In any event, it is a really bad "feature" and shows a total lack of consideration for security.


    term% php
    <?php
    $cmd='`pwd`';
    echo $cmd;
    eval("echo $cmd;");

    `pwd`/home/cross
    term%

    Sure, its a cheat to use `eval` here, but maybe interpolation of
    backticks should not be allowed anywhere except an assignment,
    and perhaps PHP shouldn't have an `eval`.
    eval is another function that need to be very strictly controlled.

    Arne

    bill


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From scott@scott@slp53.sl.home (Scott Lurndal) to comp.os.vms on Mon Oct 26 18:20:19 2026
    From Newsgroup: comp.os.vms

    cross@spitfire.i.gajendra.net (Dan Cross) writes:
    In article <11bn7f8$2s502$1@dont-email.me>,
    Fred. Zwarts <F.Zwarts@HetNet.nl> wrote:
    Op 24.okt.2026 om 22:11 schreef Dan Cross:
    [snip]
    Ok. I just thought it was very strange that so many people
    embraced the web so enthusiastically; the protocol was awful,
    the markup language underpowered (it couldn't even represent
    basic mathematics, like fractions!),

    That is out of the context of that time.

    Not really. Tim Brenners-Lee wrote the initial browser on the
    NeXT;

    At the time it was built most people did not use something that could >>display mathematics and fractions. For quite some time the line mode >>browser (and later lynx) was the most used browser. A graphics browser
    came much later and only then there grew a need for other characters
    then those that could be displayed on a VT200.

    Is this true? `nroff` with `neqn` could produce basic, ASCII
    art equations that displayed decently well on terminals back in
    the 1980s. Certainly lots of folks had bitmapped graphics
    displays by the early 90s.

    I've a 9-track tape full of posters suitable for printing
    on standard 132-column printers with greenbar (or better
    white) fanfold paper. Dates to the late 1970s.

    Including a wall-sized moon and a picture of a 727
    flying under the golden gate bridge (not to mention
    a couple of girly calendars).
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Mon Oct 26 18:34:31 2026
    From Newsgroup: comp.os.vms

    In article <DRMDS.14957$V9C6.3059@fx02.iad>,
    Scott Lurndal <slp53@pacbell.net> wrote:
    cross@spitfire.i.gajendra.net (Dan Cross) writes:
    In article <11bn7f8$2s502$1@dont-email.me>,
    Fred. Zwarts <F.Zwarts@HetNet.nl> wrote:
    Op 24.okt.2026 om 22:11 schreef Dan Cross:
    [snip]
    Ok. I just thought it was very strange that so many people
    embraced the web so enthusiastically; the protocol was awful,
    the markup language underpowered (it couldn't even represent
    basic mathematics, like fractions!),

    That is out of the context of that time.

    Not really. Tim Brenners-Lee wrote the initial browser on the
    NeXT;

    At the time it was built most people did not use something that could >>>display mathematics and fractions. For quite some time the line mode >>>browser (and later lynx) was the most used browser. A graphics browser >>>came much later and only then there grew a need for other characters
    then those that could be displayed on a VT200.

    Is this true? `nroff` with `neqn` could produce basic, ASCII
    art equations that displayed decently well on terminals back in
    the 1980s. Certainly lots of folks had bitmapped graphics
    displays by the early 90s.

    I've a 9-track tape full of posters suitable for printing
    on standard 132-column printers with greenbar (or better
    white) fanfold paper. Dates to the late 1970s.

    Including a wall-sized moon and a picture of a 727
    flying under the golden gate bridge

    Wow, I wouldn't mind seeing either of those! They sound cool.

    Look, I get that the web wasn't meant to be what it turned into.
    And to be honest, I don't want to go back to the bad old days of
    having to go to the bank to deposit checks or check my balance
    or whatever. But that doesn't mean that the technology was ever
    "good" in a measurable sense.

    That said, I wonder if the web would have succeeded if the
    technology were better; it's kind of the dumbest thing that
    could possibly work, and it clearly worked.

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From scott@scott@slp53.sl.home (Scott Lurndal) to comp.os.vms on Mon Oct 26 18:58:48 2026
    From Newsgroup: comp.os.vms

    cross@spitfire.i.gajendra.net (Dan Cross) writes:
    In article <DRMDS.14957$V9C6.3059@fx02.iad>,
    Scott Lurndal <slp53@pacbell.net> wrote:
    cross@spitfire.i.gajendra.net (Dan Cross) writes:
    In article <11bn7f8$2s502$1@dont-email.me>,
    Fred. Zwarts <F.Zwarts@HetNet.nl> wrote:
    Op 24.okt.2026 om 22:11 schreef Dan Cross:
    [snip]
    Ok. I just thought it was very strange that so many people
    embraced the web so enthusiastically; the protocol was awful,
    the markup language underpowered (it couldn't even represent
    basic mathematics, like fractions!),

    That is out of the context of that time.

    Not really. Tim Brenners-Lee wrote the initial browser on the
    NeXT;

    At the time it was built most people did not use something that could >>>>display mathematics and fractions. For quite some time the line mode >>>>browser (and later lynx) was the most used browser. A graphics browser >>>>came much later and only then there grew a need for other characters >>>>then those that could be displayed on a VT200.

    Is this true? `nroff` with `neqn` could produce basic, ASCII
    art equations that displayed decently well on terminals back in
    the 1980s. Certainly lots of folks had bitmapped graphics
    displays by the early 90s.

    I've a 9-track tape full of posters suitable for printing
    on standard 132-column printers with greenbar (or better
    white) fanfold paper. Dates to the late 1970s.

    Including a wall-sized moon and a picture of a 727
    flying under the golden gate bridge

    Wow, I wouldn't mind seeing either of those! They sound cool.

    Al copied the tape to cdrom for me many years ago now. He should
    have it up on bitsavers somewhere.


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Mon Oct 26 15:39:12 2026
    From Newsgroup: comp.os.vms

    On 10/26/2026 12:48 PM, Dan Cross wrote:
    In article <11bn7f8$2s502$1@dont-email.me>,
    Fred. Zwarts <F.Zwarts@HetNet.nl> wrote:
    Op 24.okt.2026 om 22:11 schreef Dan Cross:
    [snip]
    Ok. I just thought it was very strange that so many people
    embraced the web so enthusiastically; the protocol was awful,
    the markup language underpowered (it couldn't even represent
    basic mathematics, like fractions!),

    That is out of the context of that time.

    Not really. Tim Brenners-Lee wrote the initial browser on the
    NeXT;

    Tim Berners-Lee

    At the time it was built most people did not use something that could
    display mathematics and fractions. For quite some time the line mode
    browser (and later lynx) was the most used browser. A graphics browser
    came much later and only then there grew a need for other characters
    then those that could be displayed on a VT200.

    Is this true? `nroff` with `neqn` could produce basic, ASCII
    art equations that displayed decently well on terminals back in
    the 1980s. Certainly lots of folks had bitmapped graphics
    displays by the early 90s.
    The start of WWW was very much text. Lynx browser and various Gopher
    clients.

    NeXT was not widely used.

    But the GUI browsers did hid the mass market pretty soon.

    Mosaic 1993
    NetScape 1994
    Internet Explorer 1995

    And math was actually proposed back then.

    The HTML 3.0 proposal (1995) had math.

    But it never became standard.

    For two reasons:
    * too big a change for browsers to implement (I have no
    idea whether text based browsers played a role in that
    discussion)
    * no interest from NetScape and Microsoft as they were
    looking for more "flashy" things as part of their
    competition for the browser market - math support
    is not important in that regard

    Next standard became HTML 3.2 in 1997 without math.

    Math was kicked off to MathML and was first included
    in HTML almost two decades later.

    Arne



    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Mon Oct 26 15:46:27 2026
    From Newsgroup: comp.os.vms

    On 10/26/2026 3:39 PM, Arne Vajh|+j wrote:
    The start of WWW was very much text. Lynx browser and various Gopher
    clients.

    NeXT was not widely used.

    But the GUI browsers did hid the mass market pretty soon.

    Mosaic 1993
    NetScape 1994

    And back then VMS was actually supported.

    Foteos Macrides did Lynx.

    George Cook did Mosaic.

    And DEC did NetScape.

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Mon Oct 26 20:17:39 2026
    From Newsgroup: comp.os.vms

    In article <11boa8g$tc8v$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/26/2026 12:48 PM, Dan Cross wrote:
    In article <11bn7f8$2s502$1@dont-email.me>,
    Fred. Zwarts <F.Zwarts@HetNet.nl> wrote:
    Op 24.okt.2026 om 22:11 schreef Dan Cross:
    [snip]
    Ok. I just thought it was very strange that so many people
    embraced the web so enthusiastically; the protocol was awful,
    the markup language underpowered (it couldn't even represent
    basic mathematics, like fractions!),

    That is out of the context of that time.

    Not really. Tim Brenners-Lee wrote the initial browser on the
    NeXT;

    Tim Berners-Lee

    Oops; I didn't mean to typo his name.

    At the time it was built most people did not use something that could
    display mathematics and fractions. For quite some time the line mode
    browser (and later lynx) was the most used browser. A graphics browser
    came much later and only then there grew a need for other characters
    then those that could be displayed on a VT200.

    Is this true? `nroff` with `neqn` could produce basic, ASCII
    art equations that displayed decently well on terminals back in
    the 1980s. Certainly lots of folks had bitmapped graphics
    displays by the early 90s.

    The start of WWW was very much text. Lynx browser and various Gopher
    clients.

    NeXT was not widely used.

    Berners-Lee got a NeXT at CERN specifically to build the web.
    This is in his book, "Weaving the Web" (pg 23). On page 28 he
    writes, "My first objective was to write the Web _client_---the
    program that would allow he creation, browsing, and editing of
    hypertext pages. It would look basically like a word processor,
    and the tools on the NeXT's system, called NeXTStep, were ideal
    for the task. I could create an application, menus, and windows
    easily, just draggina and dropping them into place with a
    mouse."

    So the web was meant to have a rich interface from the start.
    Though he does go on to say that Nicola Pellow write a
    "line-mode" browser for text terminals as a least-common
    denominator interrface very early on.

    But the GUI browsers did hid the mass market pretty soon.

    Mosaic 1993
    NetScape 1994
    Internet Explorer 1995

    Yes.

    And math was actually proposed back then.

    The HTML 3.0 proposal (1995) had math.

    But it never became standard.

    For two reasons:
    * too big a change for browsers to implement (I have no
    idea whether text based browsers played a role in that
    discussion)
    * no interest from NetScape and Microsoft as they were
    looking for more "flashy" things as part of their
    competition for the browser market - math support
    is not important in that regard

    Next standard became HTML 3.2 in 1997 without math.

    Math was kicked off to MathML and was first included
    in HTML almost two decades later.

    Personally, I'd have been happy if they had just adopted TeX for
    mathematical markup, and just presented the raw markup in line
    mode browsers like Lynx; people have been doing the latter on
    USENET for decades.

    It doesn't seem like too much of a stretch to imagine they could
    have done better. Things like `utftex` these days render fullon
    LaTeX in a terminal window; well before that, we had tex2mail et
    al, dvi2tty, neqn and nroff, and so on. It is sad that it took
    so long for MathJax to get started; prior to that, the state of
    the art for putting math on the web was rendering equations from
    LaTeX into small images, and embedding those in an HTML
    document.

    Anyway. If you were used to working with troff or TeX, HTML was
    a definite step down.

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms,alt.folklore.computers on Mon Oct 26 22:34:23 2026
    From Newsgroup: comp.os.vms

    On Mon, 26 Oct 2026 15:39:12 -0400, Arne Vajh|+j wrote:

    The start of WWW was very much text. Lynx browser and various Gopher
    clients.

    Gopher was not WWW.

    WWW was pretty much the rCLkiller apprCY of the Internet, as far as the
    general public was concerned. And by WWW they meant web pages that
    looked good in a GUI.

    NeXT was not widely used.

    But the GUI browsers did hid the mass market pretty soon.

    Mosaic 1993
    NetScape 1994
    Internet Explorer 1995

    Lots of proprietary companies were very dismissive of the WWW in the
    early days.

    On the one hand, you had Microsoft trying to take control of it by
    imposing proprietary architectures. Does anyone remember rCLProject BlackbirdrCY, or the original concept for MSN? Nowdays nothing is left
    of the original rCLMSNrCY other than a domain name.

    Quark, the well-known desktop publishing solutions vendor, also had a
    try, with its rCLImmediarCY product line. And I think Autodesk made a play
    for proprietariness as well. All disappeared without a trace.

    And on the content side, existing services like Compuserve, Prodigy,
    AOL etc felt that the open Internet could never offer the quality of
    content available (at a price) on their proprietary platforms. In the
    end, connectivity won out over content, and they had to abandon their proprietary connections and embrace the Internet to survive.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Tue Oct 27 01:09:10 2026
    From Newsgroup: comp.os.vms

    In article <IpNDS.8178$Hik6.6862@fx04.iad>,
    Scott Lurndal <slp53@pacbell.net> wrote:
    cross@spitfire.i.gajendra.net (Dan Cross) writes:
    In article <DRMDS.14957$V9C6.3059@fx02.iad>,
    Scott Lurndal <slp53@pacbell.net> wrote:
    [snip]]
    Including a wall-sized moon and a picture of a 727
    flying under the golden gate bridge

    Wow, I wouldn't mind seeing either of those! They sound cool.

    Al copied the tape to cdrom for me many years ago now. He should
    have it up on bitsavers somewhere.

    Cool, I'll poke around. Thanks.

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Tue Oct 27 01:21:15 2026
    From Newsgroup: comp.os.vms

    In article <11bjm3a$i12$1@reader2.panix.com>,
    Dan Cross <cross@spitfire.i.gajendra.net> wrote:
    In article <11bjlgb$37fah$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/24/2026 9:14 PM, Dan Cross wrote:
    In article <11bjjen$36tte$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/24/2026 1:22 PM, Dan Cross wrote:
    I assume you've seen this? I think I may have posted it a
    couple of days ago.

    https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/
    You have posted it before.

    I am not sure whether to laugh or cry.

    Stuff like:

    <quote>
    Subclasses cannot override private methods. Subclass overrides of public >>>> methods canrCOt even see, let alone call, the superclassrCOs private
    methods. Problematic for, say, test mocks.
    </quote>

    This point was listed as a weakness in the critique. It begs
    the question, however, what does that sentence mean to you?

    It tells that the author is pretty clueless about OOP.

    Are you sure? Is there a single, universal, definition of the
    semantics of `private` in Object-Oriented languages? (Hint:
    have you ever used Ruby? Smalltalk?)

    Can you think of another explanation they may be driving at?
    For instance, mabye they are questioning why a dynamic language
    like PHP has a definition of `private` that is as rigid as
    C++'s, while not also providing a `friend`-like abstraction.

    Since Arne didn't answer, I'll answer for him: `private` does
    not mean the same thing in every language. The following
    examples are in Ruby:

    ```
    term% ruby
    class A
    def foo
    bar
    end

    private
    def bar
    puts "Hello from A's bar"
    end
    end

    class B < A
    def baz
    bar
    end
    end

    b = B.new
    b.foo
    b.baz
    Hello from A's bar
    Hello from A's bar
    term% ruby
    class A
    def foo
    bar
    end

    private
    def bar
    puts "Hello from A's bar"
    end
    end

    class B < A
    private
    def bar
    puts "Hello from B's bar"
    end
    end

    a = A.new
    a.foo
    b = B.new
    b.foo
    Hello from A's bar
    Hello from B's bar
    term%
    ```

    In *this* language, `private` doesn't mean what it means in C++.

    The author of, "PHP: A Fractal of Bad Design" is not clueless
    about OOP, but does draw on a wider breadth of knowledge of the
    subject than some of the essay's critics.

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Simon Clubley@clubley@remove_me.eisner.decus.org-Earth.UFP to comp.os.vms on Tue Oct 27 19:02:50 2026
    From Newsgroup: comp.os.vms

    On 2026-10-24, Lawrence D Oliveiro <ldo@nz.invalid> wrote:
    On Sat, 24 Oct 2026 21:02:37 -0400, Arne Vajhoj wrote:

    The syntax is:

    mysqli_stmt_prepare(2stmt+, "select 2table+ from 2table+ where 2field+
    like ?")

    and then the value is:

    "%" + s + "%"

    Shall I point out what is wrong with that?

    LIKE wildcards are part of the value, not part of the statement.
    And yes, this means LIKE-specific escaping is involved if they
    appear within the value itself:

    https://dev.mysql.com/doc/refman/8.4/en/string-comparison-functions.html#operator_like

    Simon.
    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Simon Clubley@clubley@remove_me.eisner.decus.org-Earth.UFP to comp.os.vms on Tue Oct 27 19:08:21 2026
    From Newsgroup: comp.os.vms

    On 2026-10-24, Lawrence D Oliveiro <ldo@nz.invalid> wrote:
    On Sat, 24 Oct 2026 11:59:30 -0400, Arne Vajhoj wrote:

    Always === is a good workaround.

    A workaround is still a workaround. The weak typing that led to its
    necessity is not ?good?.


    I disagree with you on many things, but agree with you on that one.

    You should get strict equality by default with "==" and have to use
    "===" to get loose equality.

    It's like in C++ where [] does not do bounds checking and you have to
    use at() to get bounds checking.

    In both cases, they are the wrong way around. Things should be safe by
    default and you should have to do something unusual to get unsafe
    behaviour.

    Simon.
    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Simon Clubley@clubley@remove_me.eisner.decus.org-Earth.UFP to comp.os.vms on Tue Oct 27 19:33:47 2026
    From Newsgroup: comp.os.vms

    On 2026-10-24, Dan Cross <cross@spitfire.i.gajendra.net> wrote:

    I assume you've seen this? I think I may have posted it a
    couple of days ago.

    https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/


    I had forgotten about this and it sums up things better than I can.

    BTW, I have yet to see someone propose a Rust-style scripting
    language as a replacement for PHP. :-)

    On a more serious note, I wish Python had taken hold instead of PHP
    in the web server world. I get on far better with Python than PHP and
    Python is a much more general purpose language that is the scripting
    language in all kinds of applications.

    Oh, and about the bit in the above URL about calling a PHP function
    and passing an array as its arguments, have a look at the splat operator introduced in current PHP versions to unpack an array as an argument list.

    Had cause to use it recently (I sometimes have to write PHP code to
    interface with things) and it appeared to work for me. It may do what
    you need in some circumstances instead of call_user_func_array().

    Simon.
    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Simon Clubley@clubley@remove_me.eisner.decus.org-Earth.UFP to comp.os.vms on Tue Oct 27 19:49:02 2026
    From Newsgroup: comp.os.vms

    On 2026-10-24, Lawrence D Oliveiro <ldo@nz.invalid> wrote:
    On Sat, 24 Oct 2026 20:45:24 -0400, Arne Vajhoj wrote:

    https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

    I am not sure whether to laugh or cry.

    Discussing the PHP bug on another forum, another commenter offered
    this little gem:

    $a = INF;
    $b = [];
    $c = (object)[];

    var_dump($a < $b); // true, as INF is less than an array
    var_dump($b < $c); // true, as an array is less than an object
    var_dump($c < $a); // true, as an object is less than INF

    Is there such a thing as a ?rock-paper-scissors? sorting algorithm?
    Seems like PHP has it ...

    Now do Javascript...

    Simon.

    PS: IOW, why are the most popular web languages (both client and server-side) so bloody insanely bad ? :-(
    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Tue Oct 27 17:19:00 2026
    From Newsgroup: comp.os.vms

    On 10/24/2026 8:26 PM, Lawrence DrCOOliveiro wrote:
    On Sat, 24 Oct 2026 20:02:57 -0400, Arne Vajh|+j wrote:
    PHP applications often do web sockets.

    Does not seem to be a problem in the real world.

    They canrCOt.

    It is pretty easy to confirm that PHP do web sockets, so
    obviously it can.

    WebSocket connections require an ongoing running task to
    manage the server end of the connection, which doesnrCOt fit into the
    PHP request/response model.
    Web is mostly HTTP(S) request and response - that does not
    prevent web solutions from supporting web sockets.

    PHP supports many different executions models. Some can
    support web sockets some can't.

    The two most common approaches for web sockets in PHP are:
    * any web server with PHP using any execution model serving
    the pages combined with a PHP CLI process serving web sockets
    * one of the modern PHP application servers (RoadRunner,
    FrankenPHP etc.)

    Pick your choice.

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Tue Oct 27 22:48:48 2026
    From Newsgroup: comp.os.vms

    In article <11bqv7e$1pp8h$4@dont-email.me>,
    Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:
    On 2026-10-24, Lawrence D Oliveiro <ldo@nz.invalid> wrote:
    On Sat, 24 Oct 2026 20:45:24 -0400, Arne Vajhoj wrote:

    https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

    I am not sure whether to laugh or cry.

    Discussing the PHP bug on another forum, another commenter offered
    this little gem:

    $a = INF;
    $b = [];
    $c = (object)[];

    var_dump($a < $b); // true, as INF is less than an array
    var_dump($b < $c); // true, as an array is less than an object
    var_dump($c < $a); // true, as an object is less than INF

    Is there such a thing as a ?rock-paper-scissors? sorting algorithm?
    Seems like PHP has it ...

    Now do Javascript...

    Simon.

    PS: IOW, why are the most popular web languages (both client and server-side) >so bloody insanely bad ? :-(

    I know it's controversial to say, but I think it's because the
    web was based on fundamentally bad technology, but some of it is
    really interesting, and almost all of it is incredibly useful.

    Javascript is a great example; it's not a good language, but as
    Crocker pointed out in his book, some _aspects_ of it are very
    cool; it can certainly be used _well_. And for years, it was
    the only real game in town for running things in the browser, so
    what is one to do?

    Typescript is the obvious answer. :-)

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Tue Oct 27 22:49:05 2026
    From Newsgroup: comp.os.vms

    On Tue, 27 Oct 2026 17:19:00 -0400, Arne Vajh|+j wrote:

    The two most common approaches for web sockets in PHP are:
    * any web server with PHP using any execution model serving
    the pages combined with a PHP CLI process serving web sockets

    ThatrCOs a clunky way, running two separate components that have to
    figure out some way of communicating between them. Particularly since
    only one side can respond to internal events, the other canrCOt.

    * one of the modern PHP application servers (RoadRunner,
    FrankenPHP etc.)

    But thatrCOs not compatible all this existing code written for
    mod_php/PHP-FPM! Can I use them with WordPress? No.

    In short, all yourCOre talking about is band-aids.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Tue Oct 27 22:56:49 2026
    From Newsgroup: comp.os.vms

    In article <11bquar$1pp8h$3@dont-email.me>,
    Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:
    On 2026-10-24, Dan Cross <cross@spitfire.i.gajendra.net> wrote:

    I assume you've seen this? I think I may have posted it a
    couple of days ago.

    https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/


    I had forgotten about this and it sums up things better than I can.

    BTW, I have yet to see someone propose a Rust-style scripting
    language as a replacement for PHP. :-)

    On a more serious note, I wish Python had taken hold instead of PHP
    in the web server world. I get on far better with Python than PHP and
    Python is a much more general purpose language that is the scripting
    language in all kinds of applications.

    Heh. I mean, if one wants that whole model of intermixing
    markup and programmatic behavior, then I guess the options are
    still rather limited.

    I suspect, though, that that's not the way most people are doing
    front-end development anymore; I suspect if one wanted to be
    serious about it, one would do something like programmatically
    build a typed content tree mirroring the DOM (you could have
    `div` nodes and the like), and then render into a textual
    representation, or just do it all on the client and manipulate
    the DOM directly.

    Oh, and about the bit in the above URL about calling a PHP function
    and passing an array as its arguments, have a look at the splat operator >introduced in current PHP versions to unpack an array as an argument list.

    Had cause to use it recently (I sometimes have to write PHP code to
    interface with things) and it appeared to work for me. It may do what
    you need in some circumstances instead of call_user_func_array().

    Sounds vaguely like the, `apply` function from Lisp.

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Tue Oct 27 19:35:47 2026
    From Newsgroup: comp.os.vms

    On 10/27/2026 3:33 PM, Simon Clubley wrote:
    On a more serious note, I wish Python had taken hold instead of PHP
    in the web server world. I get on far better with Python than PHP and
    Python is a much more general purpose language that is the scripting
    language in all kinds of applications.

    There are plenty of web frameworks in Python.

    If you like "HTML 5" (which you probably don't because that
    means JS/TS client side) then maybe Flask or FastAPI.

    If you like traditional SSR then maybe Django.

    But most modern SSR frameworks are a bit heavy.
    Good but heavy.

    Laravel/PHP, Django/Python, RoR/Ruby, Grails/Groovy
    all start by generating a project with a gazillion files.

    Many are OK with that, but maybe you are not and prefer
    something simpler.

    If you want to go the simpler route, then I will suggest an
    unusual tech stack.

    JSP with JSTL as view. That mean all tags no script snippets
    in view - tags is also some sort of code but very structured.

    Groovy grovelets as backend code. It is just another script
    language, but:
    * most of the easiness you expect from a script language
    * no funkyness with ==
    * optional typing but if a type is specified then it is enforced - it
    is not just a hint

    Arne



    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Tue Oct 27 20:02:05 2026
    From Newsgroup: comp.os.vms

    On 10/27/2026 6:49 PM, Lawrence DrCOOliveiro wrote:
    On Tue, 27 Oct 2026 17:19:00 -0400, Arne Vajh|+j wrote:
    The two most common approaches for web sockets in PHP are:
    * any web server with PHP using any execution model serving
    the pages combined with a PHP CLI process serving web sockets

    ThatrCOs a clunky way, running two separate components that have to
    figure out some way of communicating between them. Particularly since
    only one side can respond to internal events, the other canrCOt.

    Multiple processes are quite common for web solutions.

    * one of the modern PHP application servers (RoadRunner,
    FrankenPHP etc.)

    But thatrCOs not compatible all this existing code written for mod_php/PHP-FPM!

    You should not write PHP code for mod_php or PHP-FPM.

    You should write PHP code for PHP.

    Your PHP code should run fine with all execution models
    (mod_php, PHP-FPM, RoadRunner and FreankenPHP).

    Can I use them with WordPress? No.
    FrankenPHP : yes - see https://frankenphp.dev/docs/wordpress/

    RoadRunner : no - there is some problem with WP and some
    other CMS - you would need to pick a CMS that work in that
    context (all Laravel and Symfony based CMS should work)

    Arne


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Tue Oct 27 20:33:13 2026
    From Newsgroup: comp.os.vms

    On 10/24/2026 8:45 PM, Dan Cross wrote:
    In article <11bji28$36hh1$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/24/2026 5:04 PM, Dan Cross wrote:
    In article <11bj186$30n6f$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/23/2026 9:59 PM, Dan Cross wrote:
    It's probably true that a language like PHP shouldn't have that
    kind of thing built into it. But it's also true that that's a
    programming error (failure to sanitize one's input).

    Practically every technology provide a way to execute external
    commands.

    Indeed, but the danger isn't the mechanism, it is the specific
    implementation. PHP is very often used to build applications
    that are exposed to all kinds of untrusted inputs. Backticks in
    an environment where much input is untrusted, for example, seem
    unnecessarily permissive.

    Almost all languages has the capability including languages
    used for web.

    ...and?

    Even if Bill write CGI script in VMS Cobol he could call LIB$SPAWN.

    ...and?

    And unlike many other languages then it easy to block in PHP.

    Just add:

    disable_functions = shell_exec

    to php.ini and it is gone.

    This misses the point. A) the person writing the program has to
    be the one configuring `php.ini`. B) you are comparing
    interfaces that are designed for _explicit_ use in controlled
    ways with one designed to easily interpolate values that are
    ambient *in the lexical context of the invoking code*. One is
    significantly _easier_ to misuse than the other. Because that
    language is also designed to process inherently untrusted data,
    it must be used with significant care; yet it is positioned as
    the easy-to-use beginners language. That's a dangerous mix.
    I can not follow.

    Let me show some code. I will substitute Cobol with Fortran - I think
    Fortran is clearer to illustrate the point than Cobol.

    PHP with shell_exec:

    <?php
    header("Content-type: text/plain");
    $cmd = $_GET['cmd'];
    echo shell_exec($cmd);


    PHP with backticks:

    <?php
    header("Content-type: text/plain");
    $cmd = $_GET['cmd'];
    echo `$cmd`;


    Fortran code calling LIB$SPAWN:

    integer*4 cmdlen
    character*80 cmd
    write(*,*) 'content-type: text/plain'
    write(*,*)
    call lib$get_symbol('query_string', cmd, cmdlen);
    call lib$spawn(cmd(5:cmdlen));
    end

    The code is different:
    * PHP is different from Fortran
    * the Fortran code is more lax with the query string parse
    * in the PHP code the output goes via a PHP string - in the
    Fortran code it goes direct
    * the actual command execution is triggered by PHP function,
    PHP builtin and OS function respectively

    But I don't see any of the differences matter from a
    security perspective.

    They are all unchecked input being executed as external
    command.

    They are all very easy to do for a web developer
    knowing the language.

    The syntax is so explicit that it is not likely to happen
    by accident.

    The biggest difference in security is that one can disable
    shell_exec (and exec and passthru and proc_* and system)
    and still run PHP while it is a bit hard to disable LIB$SPAWN
    (and LIB$DO_COMMAND and SYS$CREPRC) without disabling CGI.

    Arne


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Wed Oct 28 04:44:04 2026
    From Newsgroup: comp.os.vms

    On Tue, 27 Oct 2026 20:02:05 -0400, Arne Vajh|+j wrote:

    On 10/27/2026 6:49 PM, Lawrence DrCOOliveiro wrote:

    On Tue, 27 Oct 2026 17:19:00 -0400, Arne Vajh|+j wrote:

    The two most common approaches for web sockets in PHP are:
    * any web server with PHP using any execution model serving
    the pages combined with a PHP CLI process serving web sockets

    ThatrCOs a clunky way, running two separate components that have to
    figure out some way of communicating between them. Particularly
    since only one side can respond to internal events, the other
    canrCOt.

    Multiple processes are quite common for web solutions.

    Only if it makes sense, for example for privilege separation, crash
    reliance etc. Otherwise it just complicates coordination between the
    parts of the app.

    You certainly donrCOt want do it because of limitations of the app
    framework, or worse still, because of the language itself. You would
    find a better language, or at least a better app framework.

    But if your language is, de facto, just about 90% based on a
    particular style of app framework, then that strengthens the case for
    finding a better language.

    * one of the modern PHP application servers (RoadRunner,
    FrankenPHP etc.)

    But thatrCOs not compatible all this existing code written for
    mod_php/PHP-FPM!

    You should not write PHP code for mod_php or PHP-FPM.

    You should write PHP code for PHP.

    Tell that to the Wordpress developers. Their entire app is written
    around the mod_php/PHP-FPM model. All their plugins and themes work
    according to the layering that they put on top of that model, and
    would not work with anything else.

    Your PHP code should run fine with all execution models
    (mod_php, PHP-FPM, RoadRunner and FreankenPHP).

    Can I use them with WordPress? No.
    FrankenPHP : yes - see https://frankenphp.dev/docs/wordpress/

    RoadRunner : no - there is some problem with WP and some
    other CMS - you would need to pick a CMS that work in that
    context (all Laravel and Symfony based CMS should work)

    Does that include Wordpress?

    No.

    Without Wordpress, you have lost perhaps 90% of the reason for writing
    PHP code in the first place.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Wed Oct 28 04:47:56 2026
    From Newsgroup: comp.os.vms

    On Tue, 27 Oct 2026 20:33:13 -0400, Arne Vajh|+j wrote:

    The biggest difference in security is that one can disable
    shell_exec (and exec and passthru and proc_* and system) and still
    run PHP while it is a bit hard to disable LIB$SPAWN (and
    LIB$DO_COMMAND and SYS$CREPRC) without disabling CGI.

    Another issue is that VMS suffers from the same fundamental limitation
    as Windows: why the call is named rCLshell_execrCY in the first place -- because it is assumed to be always be going through a shell.

    On Unix-type systems, it is common for one program to directly spawn
    another without going through a shell. This avoids, at one stroke, all
    the potential problems with having to escape characters with special
    meanings to the shell. For example, dollar signs and spaces in file
    names, special characters indicating pipes, redirections etc. This
    makes the spawning of external commands much safer.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Wed Oct 28 04:53:59 2026
    From Newsgroup: comp.os.vms

    On Tue, 27 Oct 2026 19:35:47 -0400, Arne Vajh|+j wrote:

    There are plenty of web frameworks in Python.

    And you have a choice of different levels to start from.

    All the modern frameworks are built on the ASGI spec <https://asgi.readthedocs.io/en/latest/>: this takes advantage of the
    async features of modern Python to integrate WebSocket support, which
    is something you canrCOt do in PHP.

    At the lowest level, you have basic ASGI implementations like Uvicorn, Hypercorn and Green Unicorn (gunicorn).

    On top of these, you have more elaborate frameworks like Starlette <https://starlette.dev/> and Quart <https://quart.palletsprojects.com/en/latest/>.

    And then there is Django ...
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Wed Oct 28 08:52:46 2026
    From Newsgroup: comp.os.vms

    In article <11brcg1$1vuaq$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/27/2026 3:33 PM, Simon Clubley wrote:
    On a more serious note, I wish Python had taken hold
    instead of PHP
    in the web server world. I get on far better with Python
    than PHP and
    Python is a much more general purpose language that is
    the scripting
    language in all kinds of applications.

    There are plenty of web frameworks in Python.

    If you like "HTML 5" (which you probably don't because that
    means JS/TS client side) then maybe Flask or FastAPI.

    Huh? No it doesn't. You can use HTML 5 without any client side
    scripting at all.

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Nuno Silva@nunojsilva@invalid.invalid to comp.os.vms,alt.folklore.computers,alt.unix.geeks on Wed Oct 28 11:14:24 2026
    From Newsgroup: comp.os.vms

    [ Instead of removing the vms group, I'll set Followup-To alt.unix.geeks
    and crosspost to there too. ]

    On 2026-10-26, Lawrence DrCOOliveiro wrote:

    And on the content side, existing services like Compuserve, Prodigy,
    AOL etc felt that the open Internet could never offer the quality of
    content available (at a price) on their proprietary platforms. In the
    end, connectivity won out over content, and they had to abandon their proprietary connections and embrace the Internet to survive.

    Yeah, that has got to be bold coming from the people who made Eternal
    September happen :-P

    And nowadays we have a bunch of companies actively ruining the
    Internet. Say, search engines are getting ruined on purpose, GenAI
    outfits are actively hammering servers making it possibly expensive or exhausting to actually serve relevant content on the web, some companies
    now insist on mandatory ID upload masquerading as age verification (can
    one even watch e.g. "It's not porn, it's HBO" without an age-verified
    account nowadays? I think last I checked all links led to
    Youtube...). And this on top of some already requiring phone numbers.

    And the whole mess that is corporate players imposing rules and
    filtering that just makes it impossible to do e-mail normally
    (e.g. Microsoft reportedly requires your server to send spam-levels
    amount of messages to gain reputation, which does sound somehow
    wrong...).

    And then you have politicians which enjoy only hanging in commercial
    social media and commercial communication systems, limiting their
    reachability, ensuring they get a biased view of the room they're in,
    and possibly even costing them elections or at least actively hampering campaigns (there were reports of Twitter censoring left-wing links in
    France a couple years ago, and I think also reports of social media
    hampering left-wing political communications in Brasil).

    And I get the feeling these are all problems that have been expected or
    known *in the 90s*...
    --
    Nuno Silva
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Wed Oct 28 17:22:00 2026
    From Newsgroup: comp.os.vms

    In article <11brfro$20u59$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/24/2026 8:45 PM, Dan Cross wrote:
    In article <11bji28$36hh1$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    [snip]
    Almost all languages has the capability including languages
    used for web.

    ...and?

    You didn't address this.

    Even if Bill write CGI script in VMS Cobol he could call LIB$SPAWN.

    ...and?

    You didn't address this.

    And unlike many other languages then it easy to block in PHP.

    Just add:

    disable_functions = shell_exec

    to php.ini and it is gone.

    This misses the point. A) the person writing the program has to
    be the one configuring `php.ini`.

    You didn't address this.

    B) you are comparing
    interfaces that are designed for _explicit_ use in controlled
    ways with one designed to easily interpolate values that are
    ambient *in the lexical context of the invoking code*. One is
    significantly _easier_ to misuse than the other. Because that
    language is also designed to process inherently untrusted data,
    it must be used with significant care; yet it is positioned as
    the easy-to-use beginners language. That's a dangerous mix.
    I can not follow.

    Let me show some code. I will substitute Cobol with Fortran

    No. You posted three code snippets that all do approximately
    the same thing, but at the same time, failed to address the
    substance of what i raised above.

    [snip]
    But I don't see any of the differences matter from a
    security perspective.

    That was the point.

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Rich Alderson@news@alderson.users.panix.com to comp.os.vms on Wed Oct 28 16:30:25 2026
    From Newsgroup: comp.os.vms

    Lawrence =?iso-8859-13?q?D=FFOliveiro?= <ldo@nz.invalid> writes:

    On Tue, 27 Oct 2026 20:33:13 -0400, Arne Vajh|+j wrote:

    The biggest difference in security is that one can disable shell_exec (and >> exec and passthru and proc_* and system) and still run PHP while it is a bit >> hard to disable LIB$SPAWN (and LIB$DO_COMMAND and SYS$CREPRC) without
    disabling CGI.

    Another issue is that VMS suffers from the same fundamental limitation as Windows: why the call is named "shell_exec" in the first place -- because it is assumed to be always be going through a shell.

    On Unix-type systems, it is common for one program to directly spawn another without going through a shell. This avoids, at one stroke, all the potential problems with having to escape characters with special meanings to the
    shell. For example, dollar signs and spaces in file names, special characters indicating pipes, redirections etc. This makes the spawning of external commands much safer.

    This is not limited to "Unix-type" systems. TOPS-20 provides the following system calls:

    CFORK% Creates inferior process
    FFORK% Freezes one or more processes
    HFORK% Halts an inferior process
    KFORK% Kills one or more processes
    RFORK% Resumes one or more processes
    SFORK% Starts a process in section 0
    TFORK% Sets and removes monitor call intercepts
    WFORK% Waits for a process to terminate
    and GET% Copies or maps a save file into a process

    The EXEC command processor is entirely uninvolved in handling any of these.
    --
    Rich Alderson news@alderson.users.panix.com
    Audendum est, et veritas investiganda; quam etiamsi non assequamur,
    omnino tamen proprius, quam nunc sumus, ad eam perveniemus.
    --Galen --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Wed Oct 28 20:44:54 2026
    From Newsgroup: comp.os.vms

    On 10/28/2026 12:47 AM, Lawrence DrCOOliveiro wrote:
    On Tue, 27 Oct 2026 20:33:13 -0400, Arne Vajh|+j wrote:
    The biggest difference in security is that one can disable
    shell_exec (and exec and passthru and proc_* and system) and still
    run PHP while it is a bit hard to disable LIB$SPAWN (and
    LIB$DO_COMMAND and SYS$CREPRC) without disabling CGI.

    Another issue is that VMS suffers from the same fundamental limitation
    as Windows: why the call is named rCLshell_execrCY in the first place -- because it is assumed to be always be going through a shell.

    On Unix-type systems, it is common for one program to directly spawn
    another without going through a shell. This avoids, at one stroke, all
    the potential problems with having to escape characters with special
    meanings to the shell. For example, dollar signs and spaces in file
    names, special characters indicating pipes, redirections etc. This
    makes the spawning of external commands much safer.

    Hmmm.

    First then the shell question is not really an issue on VMS. On VMS
    starting a program via shell does not create two processes - it only
    creates one process with DCL in P1 and the program in P0/P2.

    Second then on VMS it is possible to create a process with DCL mapped
    or a process without DCL mapped - your choice.

    PHP shell_exec starts a process with DCL mapped. It has to given
    what it does:
    Execute command via shell and return the complete output as a string

    For those interested in some details:

    $ type p1.for
    implicit none
    include '($jpidef)'
    include '($prcdef)'
    integer*4 pid,trmlen
    character*16 trm
    call lib$getjpi(jpi$_pid,,,pid)
    write(*,*) 'pid=',pid
    write(*,*) 'sys$creprc:'
    call lib$getjpi(jpi$_terminal,,,,trm,trmlen)
    call sys$creprc(,'p2.exe',,trm(1:trmlen),
    + ,,,,,,,%val(prc$m_detach),,,)
    call lib$wait(0.1,,4) ! give process time to end
    write(*,*) 'lib$spawn:'
    call lib$spawn('run p2')
    write(*,*) 'lib$do_command:'
    call lib$do_command('run p2')
    end
    $ type p2.for
    implicit none
    include '($jpidef)'
    integer*4 pid,owner
    integer*4 lib$spawn
    call lib$getjpi(jpi$_pid,,,pid)
    write(*,*) 'pid=',pid
    call lib$getjpi(jpi$_owner,,,owner)
    write(*,*) 'ownerpid=',owner
    write(*,*) 'clipresent=',lib$spawn('continue').eq.1
    end
    $ for p1
    $ link p1
    $ for p2
    $ link p2
    $ run p1
    pid= 1059
    sys$creprc:
    pid= 1107
    ownerpid= 0
    clipresent= F
    lib$spawn:
    pid= 1108
    ownerpid= 1059
    clipresent= T
    lib$do_command:
    pid= 1059
    ownerpid= 0
    clipresent= T

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Thu Oct 29 01:21:04 2026
    From Newsgroup: comp.os.vms

    On Wed, 28 Oct 2026 20:44:54 -0400, Arne Vajh|+j wrote:

    On 10/28/2026 12:47 AM, Lawrence DrCOOliveiro wrote:

    Another issue is that VMS suffers from the same fundamental
    limitation as Windows: why the call is named rCLshell_execrCY in the
    first place -- because it is assumed to be always be going through
    a shell.

    On Unix-type systems, it is common for one program to directly
    spawn another without going through a shell. This avoids, at one
    stroke, all the potential problems with having to escape characters
    with special meanings to the shell. For example, dollar signs and
    spaces in file names, special characters indicating pipes,
    redirections etc. This makes the spawning of external commands much
    safer.

    Hmmm.

    First then the shell question is not really an issue on VMS. On VMS
    starting a program via shell does not create two processes - it only
    creates one process with DCL in P1 and the program in P0/P2.

    Second then on VMS it is possible to create a process with DCL mapped
    or a process without DCL mapped - your choice.

    None of which makes any difference. Whether DCL is involved or not,
    you still have to pretend it is.

    call lib$spawn('run p2')

    What if a command argument has spaces in it?
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Thu Oct 29 01:55:19 2026
    From Newsgroup: comp.os.vms

    On Wed, 28 Oct 2026 20:44:54 -0400, Arne Vajh|+j wrote:

    On 10/28/2026 12:47 AM, Lawrence DrCOOliveiro wrote:

    Another issue is that VMS suffers from the same fundamental
    limitation as Windows: why the call is named rCLshell_execrCY in the
    first place -- because it is assumed to be always be going through
    a shell.

    On Unix-type systems, it is common for one program to directly
    spawn another without going through a shell. This avoids, at one
    stroke, all the potential problems with having to escape characters
    with special meanings to the shell. For example, dollar signs and
    spaces in file names, special characters indicating pipes,
    redirections etc. This makes the spawning of external commands much
    safer.

    Hmmm.

    First then the shell question is not really an issue on VMS. On VMS
    starting a program via shell does not create two processes - it only
    creates one process with DCL in P1 and the program in P0/P2.

    ThatrCOs not the issue, though. The issue is how you pass command-line arguments to the spawned program.

    Second then on VMS it is possible to create a process with DCL mapped
    or a process without DCL mapped - your choice.

    If you want to pass a command line, you need to have a command-line
    interpreter -- no choice.

    On Windows, you can pass a command line direct to the spawned program
    without going a command-line interpreter, but you still have to format
    it in a way to pretend it is still going through a CLI.

    So my original comment does need a correction: VMS doesnrCOt quite
    suffer from the rCLsame fundamental limitationrCY as Windows: it suffers
    from a worse one.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Fri Oct 30 13:51:33 2026
    From Newsgroup: comp.os.vms

    On 10/28/2026 4:52 AM, Dan Cross wrote:
    In article <11brcg1$1vuaq$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    If you like "HTML 5" (which you probably don't because that
    means JS/TS client side) then maybe Flask or FastAPI.

    Huh? No it doesn't. You can use HTML 5 without any client side
    scripting at all.
    True. But not so relevant.

    Despite the name then a HTML 5 web app is not a web app
    generating HTML 5 but a web app running client side with
    JavaScript code making web service calls to get data and
    managing the rendering.

    A common definition of a HTML 5 web app is that
    it is HTML 5 + CSS 3 + JavaScript, but I don't consider
    that accurate either. The app may not use anything in HTML
    not in HTML 4.01 (except likely the html tag to avoid
    older browsers going into quirk mode). And CSS is not
    really required by the model just almost always present.

    A way more correct term is Client Side Rendering. But it
    is not as widely used.

    We are stuck with the "HTML 5" term. I like to put it
    in quotation marks to indicate that it is not what it
    says it is.

    Some include web sockets, service workers and web storage
    in "HTML 5". But that does not change the point.

    Anyway if Simon wanted to go that route as opposed to SSR,
    then he is stuck with JavaScript (or TypeScript transpiled
    to JavaScript). But he would be looking at web service
    frameworks as opposed to web frameworks server side.

    A lot of frameworks are both web and web services, but not
    all including some of the Python frameworks listed.

    Arne




    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Fri Oct 30 14:04:22 2026
    From Newsgroup: comp.os.vms

    On 10/24/2026 8:45 PM, Dan Cross wrote:
    In article <11bji28$36hh1$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    And unlike many other languages then it easy to block in PHP.

    Just add:

    disable_functions = shell_exec

    to php.ini and it is gone.

    This misses the point. A) the person writing the program has to
    be the one configuring `php.ini`.

    In a small shop yes.

    In a medium to very large shop that file will be owned
    by operations and stakeholders besides engineering
    also include information security, accounting auditors and
    insurance auditors.

    They should disable the dangerous PHP functions. It is
    mentioned in many checklists including OWASP cheat sheet.
    But the 3 last groups of stakeholders are not always known
    for their deep technical skills. If it has been disabled then
    it will have to follow change management process to get
    re-enabled.

    If you want my best guess then I would say that chances for
    initial disable is like 50% and chances for getting it
    re-enabled if it has been disabled is close to 0% (it can
    not be justified).

    So it is definitely a relevant option.

    Arne




    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Fri Oct 30 14:09:24 2026
    From Newsgroup: comp.os.vms

    On 10/28/2026 1:22 PM, Dan Cross wrote:
    In article <11brfro$20u59$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/24/2026 8:45 PM, Dan Cross wrote:
    B) you are comparing
    interfaces that are designed for _explicit_ use in controlled
    ways with one designed to easily interpolate values that are
    ambient *in the lexical context of the invoking code*. One is
    significantly _easier_ to misuse than the other. Because that
    language is also designed to process inherently untrusted data,
    it must be used with significant care; yet it is positioned as
    the easy-to-use beginners language. That's a dangerous mix.
    I can not follow.

    Let me show some code. I will substitute Cobol with Fortran

    No. You posted three code snippets that all do approximately
    the same thing, but at the same time, failed to address the
    substance of what i raised above.

    [snip]
    But I don't see any of the differences matter from a
    security perspective.

    That was the point.
    I showed that native languages had the same
    issue as PHP.

    And unlike with PHP there is no easy way to close the
    problem.

    And what does that mean?

    It means that from a shell executing perspective then
    rational people should recommend using PHP over
    native languages like Cobol and Fortran.

    Obviously there can be many other security related
    reasons to not use PHP, but shell executing is not
    one of them.

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Fri Oct 30 14:45:44 2026
    From Newsgroup: comp.os.vms

    On 10/28/2026 9:21 PM, Lawrence DrCOOliveiro wrote:
    On Wed, 28 Oct 2026 20:44:54 -0400, Arne Vajh|+j wrote:
    call lib$spawn('run p2')

    What if a command argument has spaces in it?

    RUN is a DCL command.

    Standard DCL rules.

    At least regarding spaces.

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Fri Oct 30 14:52:15 2026
    From Newsgroup: comp.os.vms

    On 10/28/2026 9:55 PM, Lawrence DrCOOliveiro wrote:
    On Wed, 28 Oct 2026 20:44:54 -0400, Arne Vajh|+j wrote:
    On 10/28/2026 12:47 AM, Lawrence DrCOOliveiro wrote:
    On Unix-type systems, it is common for one program to directly
    spawn another without going through a shell. This avoids, at one
    stroke, all the potential problems with having to escape characters
    with special meanings to the shell. For example, dollar signs and
    spaces in file names, special characters indicating pipes,
    redirections etc. This makes the spawning of external commands much
    safer.

    Hmmm.

    First then the shell question is not really an issue on VMS. On VMS
    starting a program via shell does not create two processes - it only
    creates one process with DCL in P1 and the program in P0/P2.

    ThatrCOs not the issue, though. The issue is how you pass command-line arguments to the spawned program.

    OK

    Second then on VMS it is possible to create a process with DCL mapped
    or a process without DCL mapped - your choice.

    If you want to pass a command line, you need to have a command-line interpreter -- no choice.

    So my original comment does need a correction: VMS doesnrCOt quite
    suffer from the rCLsame fundamental limitationrCY as Windows: it suffers
    from a worse one.

    I don't see the problem.

    VMS is not Unix. There are some paradigm differences.

    If you are going to start a Fortran or Pascal program that
    uses LIB$GET_FOREIGN to get the command line, then a
    command line need to exist.

    If you think only C then you can avoid the command line.

    $ type pp1.c
    #include <stdio.h>
    #include <unistd.h>
    #include <wait.h>

    int main()
    {
    printf("pp1 pid=%d\n", getpid());
    pid_t pid = vfork();
    if(pid == 0)
    {
    char *args[] = { "pp2.exe", "a", "b b", "c c c", NULL };
    execv(args[0], args);
    }
    else
    {
    int status;
    wait(&status);
    printf("done\n");
    }
    return 0;
    }
    $ type pp2.c
    #include <stdio.h>
    #include <unistd.h>

    int main(int argc, char *argv[])
    {
    printf("pp2 pid=%d\n", getpid());
    for(int i = 1; i < argc; i++)
    {
    printf("%s\n", argv[i]);
    }
    return 0;
    }
    $ cc pp1
    $ link pp1
    $ cc pp2
    $ link pp2
    $ run pp1
    pp1 pid=1059
    pp2 pid=1072
    a
    b b
    c c c
    done

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Fri Oct 30 14:54:08 2026
    From Newsgroup: comp.os.vms

    On 10/28/2026 12:44 AM, Lawrence DrCOOliveiro wrote:
    Without Wordpress, you have lost perhaps 90% of the reason for writing
    PHP code in the first place.

    ????

    Most people use WP to avoid having to write PHP (or
    any other programming language).

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Fri Oct 30 15:01:18 2026
    From Newsgroup: comp.os.vms

    On 10/27/2026 3:08 PM, Simon Clubley wrote:
    On 2026-10-24, Lawrence D|+Oliveiro <ldo@nz.invalid> wrote:
    On Sat, 24 Oct 2026 11:59:30 -0400, Arne Vajh|+j wrote:
    Always === is a good workaround.

    A workaround is still a workaround. The weak typing that led to its
    necessity is not ?good?.

    I disagree with you on many things, but agree with you on that one.

    You should get strict equality by default with "==" and have to use
    "===" to get loose equality.
    I think the natural association is that === means "more equal"
    than ==, so I don't think that is a good way.

    I would say either live with how it is (the sins of the past) or
    come up with a plan to drop loose equality.

    PHP 9.x:

    declare(strict_equality=1)

    makes == behave like === and === gives warning.

    PHP 10.x:

    == behave like === and === gives warning unless

    declare(strict_equality=0)

    PHP 11.x:

    == is always strict and === is gone.

    Arne



    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Fri Oct 30 21:48:51 2026
    From Newsgroup: comp.os.vms

    In article <11c2lef$ffno$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/28/2026 4:52 AM, Dan Cross wrote:
    In article <11brcg1$1vuaq$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    If you like "HTML 5" (which you probably don't because that
    means JS/TS client side) then maybe Flask or FastAPI.

    Huh? No it doesn't. You can use HTML 5 without any client side
    scripting at all.
    True. But not so relevant.

    Despite the name then a HTML 5 web app is not a web app
    generating HTML 5 but a web app running client side with
    JavaScript code making web service calls to get data and
    managing the rendering.

    Mmm, that's not what you said, though.

    [snip]
    A way more correct term is Client Side Rendering. But it
    is not as widely used.

    Mmm, a web browser already renders HTML on the client side,
    regardless of whether or not CSS is used, and whether or not
    Javascript or Typescript is being used to dynamically modify
    the DOM on the client.

    We are stuck with the "HTML 5" term. I like to put it
    in quotation marks to indicate that it is not what it
    says it is.

    It would probably be clearer if you said, "HTML 5 application"
    if that's what you mean.

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Fri Oct 30 21:56:27 2026
    From Newsgroup: comp.os.vms

    In article <11c2mfu$fsse$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/28/2026 1:22 PM, Dan Cross wrote:
    In article <11brfro$20u59$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/24/2026 8:45 PM, Dan Cross wrote:
    B) you are comparing
    interfaces that are designed for _explicit_ use in controlled
    ways with one designed to easily interpolate values that are
    ambient *in the lexical context of the invoking code*. One is
    significantly _easier_ to misuse than the other. Because that
    language is also designed to process inherently untrusted data,
    it must be used with significant care; yet it is positioned as
    the easy-to-use beginners language. That's a dangerous mix.
    I can not follow.

    Let me show some code. I will substitute Cobol with Fortran

    No. You posted three code snippets that all do approximately
    the same thing, but at the same time, failed to address the
    substance of what i raised above.

    [snip]
    But I don't see any of the differences matter from a
    security perspective.

    That was the point.

    I showed that native languages had the same
    issue as PHP.

    No, you really did not. You merely showed that other languages
    can spawn programs using `LIB$SPAWN` or similar mechanisms.

    What you missed is that it is the unique combination of
    anti-patterns manifest in PHP that make it dangerouus in this
    regard.

    Consider this analogy: `strcpy()` is dangerous because you
    cannot tell it how big the destination buffer is. `strlcpy()`
    is much safer because you _do_ tell it the size of the
    destination buffer, it promises to NUL-terminate the destination
    (as long as size>0), _and_ it tells how much space the source
    required, so that you can detect truncation. That doesn't mean
    that it is perfectly safe, because you can still give it a bad
    destination length; you _can_ call it with `SIZE_MAX`, but most
    programmers do not.

    And unlike with PHP there is no easy way to close the
    problem.

    I doubt that disabling shell actually prevents you from calling
    `LIB$SPAWN` via other means.

    And what does that mean?

    It means that from a shell executing perspective then
    rational people should recommend using PHP over
    native languages like Cobol and Fortran.

    Obviously there can be many other security related
    reasons to not use PHP, but shell executing is not
    one of them.

    Nope. It is one of them. But there are so many to choose from
    it hardly matters.

    The bottom line is, there are better alternatives to PHP; there
    have been for years, and one should use one of those.

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Fri Oct 30 23:06:17 2026
    From Newsgroup: comp.os.vms

    On Fri, 30 Oct 2026 14:04:22 -0400, Arne Vajh|+j wrote:

    They should disable the dangerous PHP functions.

    What if that breaks a particular PHP application that somebody needs
    to run?

    Having a global config file to control language features is a stupid
    idea.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Sat Oct 31 02:28:15 2026
    From Newsgroup: comp.os.vms

    On Fri, 30 Oct 2026 14:54:08 -0400, Arne Vajh|+j wrote:

    On 10/28/2026 12:44 AM, Lawrence DrCOOliveiro wrote:

    Without Wordpress, you have lost perhaps 90% of the reason for
    writing PHP code in the first place.

    ????

    Most people use WP to avoid having to write PHP (or any other
    programming language).

    You donrCOt know about the whole Wordpress themes/plugins ecosystem?
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Nov 14 13:22:07 2026
    From Newsgroup: comp.os.vms

    On 10/24/2026 9:30 PM, Dan Cross wrote:
    In article <11bjlgb$37fah$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/24/2026 9:14 PM, Dan Cross wrote:
    In article <11bjjen$36tte$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/24/2026 1:22 PM, Dan Cross wrote:
    I assume you've seen this? I think I may have posted it a
    couple of days ago.

    https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/
    You have posted it before.

    I am not sure whether to laugh or cry.

    Stuff like:

    <quote>
    Subclasses cannot override private methods. Subclass overrides of public >>>> methods canrCOt even see, let alone call, the superclassrCOs private
    methods. Problematic for, say, test mocks.
    </quote>

    This point was listed as a weakness in the critique. It begs
    the question, however, what does that sentence mean to you?

    It tells that the author is pretty clueless about OOP.

    Are you sure? Is there a single, universal, definition of the
    semantics of `private` in Object-Oriented languages?

    At least the principles behind OO are pretty well established.

    But let us take a step back first.

    One of the biggest problems in software development is the
    code base scalability problem. As a code base grow bigger
    then it becomes increasingly difficult to make changes
    without breaking something somewhere else.

    The general solution to the problem is to isolate the different
    parts of the code base from each other. A given part of the
    code base has some exported API that is made available to the
    world and an internal implementation. As long as the exported
    API is kept then the internal implementation can be changed
    without breaking things everywhere in the larger code base.

    This applies everywhere not just in OO context. But it is central
    in OO context. It is often called encapsulation or information hiding.

    Two features in OO are responsible for providing this:
    * polymorphism meaning that code operates on more abstract
    super types (including interfaces or classes with only
    pure virtual methods) without even knowing the actual
    implementing type
    * members are divided in private and non-private where non-private
    members become the exported API that must be kept and private
    becomes implementation that can be changed

    This is probably the main reason behind the success of OO in
    software development for large code bases the last 40 years.
    The OO way is not the only way, but experience has proven it to
    be a very effective way.

    Implementations differs a little.

    I would say that the normal or expected is:

    private = visible only within class
    protected = visible within class and its subclasses
    public = visible to everyone

    If it is like that then nobody should be surprised.

    But variations exist.

    Many languages have additional visibilities.

    Some languages slightly change the meaning. Notable Java protected
    makes it visible to both sub classes and classes in same package.

    But it is all within the the general idea of private stuff
    that can be changed without impacting anything else and
    non-private stuff where changes can break anything. The
    non-private just exist in many flavors.

    Expecting access to private stuff outside class is against all
    OO principles and all general software development principles.

    So yes - the quoted is bad.

    (often it is possible to gain access to private stuff using reflection,
    but general view is that those playing with that deserve the problems
    they get themselves into)

    (Hint:
    have you ever used Ruby? Smalltalk?)

    I am not that familiar with Ruby.

    But I have read about it.

    Ruby define private as not allowing an explicit receiver.

    What that really means is that Ruby sees private as related
    to the object not related to the class.

    That may make sense from a philosophical perspective. Hiding
    an objects information from itself sounds unnatural.

    But it is a disaster from a practical code perspective.

    Encapsulation is totally broken.

    A few examples.

    Using JRuby as I don't have MRI on VMS.

    $ jruby --version
    jruby 9.4.3.0 (3.1.4) 2023-06-07 3086960792 OpenJDK 64-Bit Server VM 25.502-b07 on 1.8.0_502-b07 +jit [x86_64-OpenVMS]

    3.1 is not latest and greatest but not super old either.

    Example 1 - simple value holder

    $ type lib1.rb
    class P
    attr_reader :v
    def initialize()
    @v = 0
    end
    def add1()
    addn(1)
    end
    def add2()
    addn(2)
    end

    private

    def addn(n)
    @v += n
    end
    end

    $ type test1.rb
    require_relative 'lib1'

    class C < P
    def add3()
    addn(3)
    end
    end

    o = C.new
    o.add3
    printf "v=#{o.v}\n"
    $ jruby test1.rb
    v=3

    Library maintainer decide to do a little refactoring of the
    implementation but maintaining the external API.

    $ type lib1.rb
    class P
    attr_reader :v
    def initialize()
    @v = 0
    end
    def add1()
    add()
    end
    def add2()
    add(2)
    end

    private

    def add(n = 1)
    @v += n
    end
    end

    $ jruby test1.rb
    NoMethodError: undefined method `addn' for #<C:0xe8ea697 @v=0>
    add3 at test1.rb:5
    <main> at test1.rb:10

    This is not really a problem. Library user get an error and can
    fix the code.

    Example 2 - simple value holder with a modification counter

    $ type lib2.rb
    class P
    attr_reader :v
    attr_reader :mods
    def initialize()
    @v = 0
    @mods = 0
    end
    def add1()
    addn(1)
    incmods()
    end
    def add2()
    addn(2)
    incmods()
    end

    private

    def addn(n)
    @v += n
    end
    def incmods()
    @mods += 1
    end
    end

    $ type test2.rb
    require_relative 'lib2'

    class C < P
    def add3()
    addn(3)
    incmods()
    end
    end

    o = C.new
    o.add3
    printf "v=#{o.v} mods=#{o.mods}\n"
    $ jruby test2.rb
    v=3 mods=1

    Library maintainer decide to do a little refactoring of the
    implementation but maintaining the external API.

    $ type lib2.rb
    class P
    attr_reader :v
    attr_reader :mods
    def initialize()
    @v = 0
    @mods = 0
    end
    def add1()
    addn(1)
    end
    def add2()
    addn(2)
    end

    private

    def addn(n)
    @v += n
    incmods()
    end
    def incmods()
    @mods += 1
    end
    end

    $ jruby test2.rb
    v=3 mods=2

    The change in the library's private parts silently changed behavior of
    the library user.

    Example 3 - same just with the library user doing the modification counter

    $ type lib3.rb
    class P
    attr_reader :v
    def initialize()
    @v = 0
    end
    def add1()
    addn(1)
    end
    def add2()
    addn(2)
    end

    private

    def addn(n)
    @v += n
    end
    end

    $ type test3.rb
    require_relative 'lib3'

    class C < P
    attr_reader :mods
    def initialize()
    super
    @mods = 0
    end

    private

    def addn(n)
    super
    @mods += 1
    end
    end

    o = C.new
    o.add1
    o.add2
    printf "v=#{o.v} mods=#{o.mods}\n"
    $ jruby test3.rb
    v=3 mods=2

    Library maintainer decide to do a little refactoring of the
    implementation but maintaining the external API.

    $ type lib3.rb
    class P
    attr_reader :v
    def initialize()
    @v = 0
    end
    def add1()
    @v += 1
    end
    def add2()
    addn(2)
    end

    private

    def addn(n)
    @v += n
    end
    end

    $ jruby test3.rb
    v=3 mods=1

    The change in the library's private parts silently changed behavior of
    the library user.

    Ruby private does not enforce encapsulation.

    Changes to a libraries private stuff may change behavior of
    programs using the libraries.

    That is against everything we should be striving for.

    The typical justification from Ruby people are:
    1) the private keyword show intent and they trust developers and
    do not want to police them
    2) there are several other constructs in Ruby that would make
    it very easy to circumvent a real private visibility anyway

    Examples of the latter:

    $ type lib6.rb
    class X
    def initialize()
    @v = 0
    end
    def read()
    @v = @v + 1
    @v
    end

    private

    def reset()
    @v = 0
    end
    end

    $ type test6.rb
    require_relative 'lib6'

    o = X.new
    printf "v=#{o.read()}\n"
    printf "v=#{o.read()}\n"
    printf "v=#{o.read()}\n"
    o.reset()
    printf "v=#{o.read()}\n"
    $ jruby test6.rb
    v=1
    v=2
    v=3
    NoMethodError: private method `reset' called for #<X:0x11b455e5 @v=3>
    <main> at test6.rb:7

    Ruby allows library users to extend classes. So even if private
    restricted to class, then it is easy to circumvent.

    $ type test6hack.rb
    require_relative 'lib6'

    class X
    def myreset()
    reset()
    end
    end

    o = X.new
    printf "v=#{o.read()}\n"
    printf "v=#{o.read()}\n"
    printf "v=#{o.read()}\n"
    o.myreset()
    printf "v=#{o.read()}\n"
    $ jruby test6hack.rb
    v=1
    v=2
    v=3
    v=1

    Ruby calling methods via send does not check at all.

    $ type test6hackd.rb
    require_relative 'lib6'

    o = X.new
    printf "v=#{o.read()}\n"
    printf "v=#{o.read()}\n"
    printf "v=#{o.read()}\n"
    o.send(:reset)
    printf "v=#{o.read()}\n"
    $ jruby test6hackd.rb
    v=1
    v=2
    v=3
    v=1

    I do not consider those justifications good OO or good
    software engineering. I prefer the compiler to actually enforce
    the rules.

    Can you think of another explanation they may be driving at?
    For instance, mabye they are questioning why a dynamic language
    like PHP has a definition of `private` that is as rigid as
    C++'s, while not also providing a `friend`-like abstraction.

    That is different discussion. A discussion that come up
    occasionally.

    Most dynamic languages chose to implement visibility
    in some form.

    When PHP redesigned their OO in version 5.0 they decided
    to do it Java'ish.

    And the benefits of encapsulation applies to both static
    and dynamic languages.

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Nov 14 13:22:17 2026
    From Newsgroup: comp.os.vms

    On 10/30/2026 7:06 PM, Lawrence DrCOOliveiro wrote:
    Having a global config file to control language features is a stupid
    idea.

    But having a central config file to control the security of a
    server is a smart idea.

    And this is a server config.

    The specifics depend on how PHP is used. Apache with mod_php
    has a PHPIniDir directive to select php.ini file. For CLI
    you can specify location at command line.

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Nov 14 13:22:25 2026
    From Newsgroup: comp.os.vms

    On 10/30/2026 10:28 PM, Lawrence DrCOOliveiro wrote:
    On Fri, 30 Oct 2026 14:54:08 -0400, Arne Vajh|+j wrote:
    On 10/28/2026 12:44 AM, Lawrence DrCOOliveiro wrote:
    Without Wordpress, you have lost perhaps 90% of the reason for
    writing PHP code in the first place.

    ????

    Most people use WP to avoid having to write PHP (or any other
    programming language).

    You donrCOt know about the whole Wordpress themes/plugins ecosystem?

    I do but it does not change anything.

    It is still:
    * gigantic number of non-programmers publishing via WP
    * huge number of hobby programmers writing awful PHP
    * large number of professional programmers doing
    business web apps typical in Laravel or Symfony
    * small number of programmers doing WP, WP plugins,
    Laravel, Symfony etc.

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Nov 14 13:22:40 2026
    From Newsgroup: comp.os.vms

    On 10/26/2026 9:21 PM, Dan Cross wrote:
    term% ruby
    class A
    def foo
    bar
    end

    private
    def bar
    puts "Hello from A's bar"
    end
    end

    class B < A
    private
    def bar
    puts "Hello from B's bar"
    end
    end

    a = A.new
    a.foo
    b = B.new
    b.foo
    Hello from A's bar
    Hello from B's bar

    In *this* language, `private` doesn't mean what it means in C++.

    In Ruby it means object private instead of class private. And as
    demonstrated in my other post then it is a OO encapsulation
    disaster.

    But the second example quoted here is actually not different from C++.
    Because C++ interprets visibility as just that and does not
    include overrideability.

    #include <iostream>

    using namespace std;

    class A
    {
    private:
    virtual void bar() { cout << "Hello from A's bar" << endl; }
    public:
    void foo() { bar(); }
    };

    class B : public A
    {
    private:
    void bar() { cout << "Hello from B's bar" << endl; }
    };

    int main()
    {
    A *a = new A();
    a->foo();
    B *b = new B();
    b->foo();
    return 0;
    }

    also outputs:

    Hello from A's bar
    Hello from B's bar

    It has very little practical impact as those C++
    developers that really want to limit bar to A
    just omit the virtual.

    The construct of private virtual is still used though
    because some very smart people have found out that
    base classes with public non-virtual methods and
    private pure virtual methods has some advantages.
    It provides better encapsulation.

    Anyway - it does not really relate much to the topic
    at hand - just wanted to note that for this particular
    example Ruby actually is like C++.

    Arne








    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Nov 14 13:23:08 2026
    From Newsgroup: comp.os.vms

    On 10/30/2026 5:56 PM, Dan Cross wrote:
    In article <11c2mfu$fsse$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/28/2026 1:22 PM, Dan Cross wrote:
    In article <11brfro$20u59$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/24/2026 8:45 PM, Dan Cross wrote:
    B) you are comparing
    interfaces that are designed for _explicit_ use in controlled
    ways with one designed to easily interpolate values that are
    ambient *in the lexical context of the invoking code*. One is
    significantly _easier_ to misuse than the other. Because that
    language is also designed to process inherently untrusted data,
    it must be used with significant care; yet it is positioned as
    the easy-to-use beginners language. That's a dangerous mix.
    I can not follow.

    Let me show some code. I will substitute Cobol with Fortran

    No. You posted three code snippets that all do approximately
    the same thing, but at the same time, failed to address the
    substance of what i raised above.

    [snip]
    But I don't see any of the differences matter from a
    security perspective.

    That was the point.

    I showed that native languages had the same
    issue as PHP.

    No, you really did not. You merely showed that other languages
    can spawn programs using `LIB$SPAWN` or similar mechanisms.

    That *is* the same issue as shell_exec in PHP.

    What you missed is that it is the unique combination of
    anti-patterns manifest in PHP that make it dangerouus in this
    regard.

    The ability to execute shell commands is the ability
    to execute shell commands. No more no less.

    Consider this analogy: `strcpy()` is dangerous because you
    cannot tell it how big the destination buffer is. `strlcpy()`
    is much safer because you _do_ tell it the size of the
    destination buffer, it promises to NUL-terminate the destination
    (as long as size>0), _and_ it tells how much space the source
    required, so that you can detect truncation. That doesn't mean
    that it is perfectly safe, because you can still give it a bad
    destination length; you _can_ call it with `SIZE_MAX`, but most
    programmers do not.

    The analogy is whether C is less safe or as safe/unsafe
    as another language XYZ that has a let us say cpystr function
    with the same problem.

    And the answer is that C is as safe/unsafe as XYZ (in
    this regard).

    And unlike with PHP there is no easy way to close the
    problem.

    I doubt that disabling shell actually prevents you from calling
    `LIB$SPAWN` via other means.

    There is a list of functions able to spawn shell commands. I
    even think I listed them in another post. Disable them all
    and no spawn.

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Nov 14 13:23:20 2026
    From Newsgroup: comp.os.vms

    On 10/30/2026 7:06 PM, Lawrence DrCOOliveiro wrote:
    On Fri, 30 Oct 2026 14:04:22 -0400, Arne Vajh|+j wrote:
    They should disable the dangerous PHP functions.

    What if that breaks a particular PHP application that somebody needs
    to run?
    As with anything else then it would need to be looked at.

    (I will assume shell_exec, exec, proc_open, system, passthru etc.)

    * Does the output from the system that end up executing the command
    represent what is really needed (think single node vs cluster)?
    * Is that output only available via external command and not via
    an API (VMS PHP offers access to $getjpi and $getdvi)?
    * Does the application provide business value?
    * Has the usage been reviewed for security vulnerabilities
    (command injection)?
    * Are there a process in place to ensure that all future
    updates are also reviewed?

    If 5 x YES then it will likely be allowed.

    But this is not a typical web application.

    The only type of application I can think of is some sort
    of system administration web application.

    I have not had the need to run external commands from
    web app since 1996.

    And I tell you if 1996 Arne brought that C CGI code to
    review in front of 2026 Arne, then it would be thumbs down.

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Nov 14 13:23:35 2026
    From Newsgroup: comp.os.vms

    On 10/27/2026 7:35 PM, Arne Vajh|+j wrote:
    If you want to go the simpler route, then I will suggest an
    unusual tech stack.

    JSP with JSTL as view. That mean all tags no script snippets
    in view - tags is also some sort of code but very structured.

    Groovy grovelets as backend code. It is just another script
    language, but:
    * most of the easiness you expect from a script language
    * no funkyness with ==
    * optional typing but if a type is specified then it is enforced - it
    -a is not just a hint

    Here comes a little comparison with Python and PHP.

    Tested with:
    * Python 3.10
    * PHP 8.1
    * Groovy 4.0

    Not latest and greatest but what I have on my 9.2-3 system.

    Let us look at simple assignment.

    $ type asg.py
    iv = 123
    sv = 'ABC'
    print('%s : %d, %s : %s' % (type(iv), iv, type(sv), sv))
    iv = 'DEF'
    sv = 456
    print('%s : %s, %s : %d' % (type(iv), iv, type(sv), sv))
    $ python asg.py
    <class 'int'> : 123, <class 'str'> : ABC
    <class 'str'> : DEF, <class 'int'> : 456
    $ type asgtyp.py
    iv: int = 123
    sv: str = 'ABC'
    print('%s : %d, %s : %s' % (type(iv), iv, type(sv), sv))
    iv = 'DEF'
    sv = 456
    print('%s : %s, %s : %d' % (type(iv), iv, type(sv), sv))
    $ python asgtyp.py
    <class 'int'> : 123, <class 'str'> : ABC
    <class 'str'> : DEF, <class 'int'> : 456
    $ type asg.php
    <?php

    $iv = 123;
    $sv = "ABC";
    echo sprintf("%s : %d, %s : %s\n", gettype($iv), $iv, gettype($sv), $sv);
    $iv = "DEF";
    $sv = 456;
    echo sprintf("%s : %s, %s : %d\n", gettype($iv), $iv, gettype($sv),$sv);


    $ php asg.php
    integer : 123, string : ABC
    string : DEF, integer : 456
    $ type asg.groovy
    iv = 123
    sv = "ABC"
    printf("%s : %d, %s : %s\n", iv.getClass().name, iv, sv.getClass().name, sv)
    iv = "DEF"
    sv = 456
    printf("%s : %s, %s : %d\n", iv.getClass().name, iv, sv.getClass().name, sv)
    $ groovy asg.groovy
    java.lang.Integer : 123, java.lang.String : ABC
    java.lang.String : DEF, java.lang.Integer : 456
    $ type asgtyp.groovy
    int iv = 123
    String sv = "ABC"
    printf("%s : %d, %s : %s\n", iv.getClass().name, iv, sv.getClass().name, sv)
    iv = "DEF"
    sv = 456
    printf("%s : %s, %s : %d\n", iv.getClass().name, iv, sv.getClass().name, sv)
    $ groovy asgtyp.groovy
    java.lang.Integer : 123, java.lang.String : ABC
    Caught: org.codehaus.groovy.runtime.typehandling.GroovyCastException:
    Cannot cast object 'DEF' with class 'java.lang.String' to class 'int' org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot
    cast object 'DEF' with class 'java.lang.String' to class 'int'
    at ASGTYP.run(ASGTYP.GROOVY:4)

    We see that:
    * Python without type hint, Python with type hint, PHP and Groovy
    without type
    happily allows variables changing type with assignment [BAD]
    * Groovy with type gives an error when assigning a wrong type [GOOD]

    Let us look at function call.

    $ type fc.py
    def f(v):
    vtyp = type(v)
    print(f"{vtyp} : {v}")

    f(123)
    f("123")
    f("ABC")
    $ python fc.py
    <class 'int'> : 123
    <class 'str'> : 123
    <class 'str'> : ABC
    $ type fctyp.py
    def f(v: int):
    vtyp = type(v)
    print(f"{vtyp} : {v}")

    f(123)
    f("123")
    f("ABC")
    $ python fctyp.py
    <class 'int'> : 123
    <class 'str'> : 123
    <class 'str'> : ABC
    $ type fc.php
    <?php

    function f($v) {
    $vtyp = gettype($v);
    echo "$vtyp : $v\r\n";
    }

    f(123);
    f("123");
    f("ABC");


    $ php fc.php
    integer : 123
    string : 123
    string : ABC
    $ type fctyp.php
    <?php

    function f(int $v) {
    $vtyp = gettype($v);
    echo "$vtyp : $v\r\n";
    }

    f(123);
    f("123");
    f("ABC");


    $ php fctyp.php
    integer : 123
    integer : 123
    PHP Fatal error: Uncaught TypeError: f(): Argument #1 ($v) must be of
    type int, string given, called in /disk2/arne/typ/fctyp.php on line 10
    and defined in /disk2/arne/typ/fctyp.php:3
    Stack trace:
    #0 /disk2/arne/typ/fctyp.php(10): f('ABC')
    #1 {main}
    thrown in /disk2/arne/typ/fctyp.php on line 3

    Fatal error: Uncaught TypeError: f(): Argument #1 ($v) must be of type
    int, string given, called in /disk2/arne/typ/fctyp.php on line 10 and
    defined in /disk2/arne/typ/fctyp.php:3
    Stack trace:
    #0 /disk2/arne/typ/fctyp.php(10): f('ABC')
    #1 {main}
    thrown in /disk2/arne/typ/fctyp.php on line 3
    $ type fctypx.php
    <?php

    declare(strict_types=1);

    function f(int $v) {
    $vtyp = gettype($v);
    echo "$vtyp : $v\r\n";
    }

    f(123);
    f("123");
    f("ABC");


    $ php fctypx.php
    integer : 123
    PHP Fatal error: Uncaught TypeError: f(): Argument #1 ($v) must be of
    type int, string given, called in /disk2/arne/typ/fctypx.php on line 11
    and defined in /disk2/arne/typ/fctypx.php:5
    Stack trace:
    #0 /disk2/arne/typ/fctypx.php(11): f('123')
    #1 {main}
    thrown in /disk2/arne/typ/fctypx.php on line 5

    Fatal error: Uncaught TypeError: f(): Argument #1 ($v) must be of type
    int, string given, called in /disk2/arne/typ/fctypx.php on line 11 and
    defined in /disk2/arne/typ/fctypx.php:5
    Stack trace:
    #0 /disk2/arne/typ/fctypx.php(11): f('123')
    #1 {main}
    thrown in /disk2/arne/typ/fctypx.php on line 5
    $ type fc.groovy
    def f(v) {
    vtyp = v.getClass().name
    println("$vtyp : $v")
    }

    f(123)
    f("123")
    f("ABC")
    $ groovy fc.groovy
    java.lang.Integer : 123
    java.lang.String : 123
    java.lang.String : ABC
    $ type fctyp.groovy
    def f(int v) {
    vtyp = v.getClass().name
    println("$vtyp : $v")
    }

    f(123)
    f("123")
    f("ABC")
    $ groovy fctyp.groovy
    java.lang.Integer : 123
    Caught: groovy.lang.MissingMethodException: No signature of method:
    FCTYP.f() is applicable for argument types: (String) values: [123]
    Possible solutions: f(int), is(java.lang.Object), NV(java.lang.Object), SV([Ljava.lang.Object;), run(), run()
    groovy.lang.MissingMethodException: No signature of method: FCTYP.f() is applicable for argument types: (String) values: [123]
    Possible solutions: f(int), is(java.lang.Object), NV(java.lang.Object), SV([Ljava.lang.Object;), run(), run()
    at FCTYP.run(FCTYP.GROOVY:7)

    We see that:
    * Python without type hint, Python with type hint, PHP without type hint and
    Groovy without type happily allows calls with any data type [BAD]
    * PHP with type hint but no strict_types=1 gives an error when called with a
    value that cannot be converted to correct type but does automatic conversion
    when called with a value that can be converted to correct type [QUESTIONABLE]
    * PHP with type hint plus strict_types=1 and Groovy with type gives an error
    when called with wrong type [GOOD]

    Let us look at function overload.

    $ type fol.py
    def f(v: int):
    print(f"int : {v}")

    def f(v: str):
    print(f"str : {v}")

    f(123)
    f("ABC")
    $ python fol.py
    str : 123
    str : ABC
    $ type fol.php
    <?php

    function f(int $v) {
    echo "int : $v\r\n";
    }

    function f(string $v) {
    echo "string : $v\r\n";
    }

    f(123);
    f("ABC");


    $ php fol.php
    PHP Fatal error: Cannot redeclare f() (previously declared in /disk2/arne/typ/fol.php:3) in /disk2/arne/typ/fol.php on line 8

    Fatal error: Cannot redeclare f() (previously declared in /disk2/arne/typ/fol.php:3) in /disk2/arne/typ/fol.php on line 8
    $ type fol.groovy
    def f(int v) {
    println("int : $v")
    }

    def f(String v) {
    println("String : $v")
    }

    f(123)
    f("ABC")
    $ groovy fol.groovy
    int : 123
    String : ABC

    We see that:
    * Python just let the last function overwrite the previous one and
    ignores type
    hints [BAD]
    * PHP gives an error [ACCEPTABLE]
    * Groovy it works [GOOD]

    So if you want a script language with type safety, then:
    Python - definitely avoid
    PHP - getting better with newer features
    Groovy - use types and you got what you want

    And I know you can code in Groovy. :-)

    Arne


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Nov 14 14:08:58 2026
    From Newsgroup: comp.os.vms

    On 11/14/2026 1:22 PM, Arne Vajh|+j wrote:
    But having a central config file to control the security of a
    server is a smart idea.

    And this is a server config.
    Note that besides PHP there is one other web technology
    available on VMS that can block shell access.

    Java can prevent Runtime.exec calls via the SecurityManager.

    And Tomcat can be started with a security manager. Just
    specify -security at command line and Tomcat ships
    with a catalina.policy file.

    But there are some problems:
    * SecurityManager is gone from Java 24 and onwards so whenever
    Java 25 hits VMS then no more SecurityManager (I could say
    a few words with my opinion about JCP's decision to
    remove the SecurityManager, but I better not use
    such words publicly ...)
    * the syntax of security policy files are a bit
    cryptic (despite actually being VMS like)

    Regarding the second point then the syntax is like:

    grant {
    permission java.io.FilePermission "-","read,write";
    };


    And while:
    - default no access only explicit granted access matters
    - read and write vs execute (to allow exec would be "read,write,execute)
    does match VMS thinking then the overall syntax is more like
    'WTF is that?'.

    Arne



    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Sat Nov 14 22:17:06 2026
    From Newsgroup: comp.os.vms

    On Sat, 14 Nov 2026 13:22:17 -0500, Arne Vajh|+j wrote:

    On 10/30/2026 7:06 PM, Lawrence DrCOOliveiro wrote:

    Having a global config file to control language features is a
    stupid idea.

    But having a central config file to control the security of a server
    is a smart idea.

    But php.ini doesnrCOt do that. It only covers PHP.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Sat Nov 14 22:19:32 2026
    From Newsgroup: comp.os.vms

    On Sat, 14 Nov 2026 14:08:58 -0500, Arne Vajh|+j wrote:

    Note that besides PHP there is one other web technology available on
    VMS that can block shell access.

    On Linux, you rely on more wide-ranging access controls, like container namespaces. Those controls work across all languages, all runtimes, all libraries, all everything, because they are enforced by the kernel.

    *That* is how to do security. Not by relying on poorly-designed
    mechanisms specific to one poorly-designed language.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Sat Nov 14 22:20:31 2026
    From Newsgroup: comp.os.vms

    On Sat, 14 Nov 2026 13:23:20 -0500, Arne Vajh|+j wrote:

    On 10/30/2026 7:06 PM, Lawrence DrCOOliveiro wrote:

    On Fri, 30 Oct 2026 14:04:22 -0400, Arne Vajh|+j wrote:

    They should disable the dangerous PHP functions.

    What if that breaks a particular PHP application that somebody
    needs to run?

    As with anything else then it would need to be looked at.

    The whole concept of a global mechanism for configuring language
    features is wrong.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Sat Nov 14 22:28:13 2026
    From Newsgroup: comp.os.vms

    On Sat, 14 Nov 2026 13:23:35 -0500, Arne Vajh|+j wrote:

    * Python without type hint, Python with type hint, PHP and Groovy
    without type
    happily allows variables changing type with assignment [BAD]

    Do you know why theyrCOre called rCLhintsrCY?

    Let us look at function overload.

    $ type fol.py
    def f(v: int):
    print(f"int : {v}")

    def f(v: str):
    print(f"str : {v}")

    ThatrCOs not how to do it <https://docs.python.org/3/library/functools.html#functools.singledispatch>.

    Remember, rCLdefrCY and rCLclassrCY statements are not declarations, they are best considered as a special form of assignment statement.

    And I know you can code in Groovy. :-)

    Groovy does also have more flexible syntax (DSLs) ...
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Nov 14 17:32:44 2026
    From Newsgroup: comp.os.vms

    On 11/14/2026 5:20 PM, Lawrence DrCOOliveiro wrote:
    On Sat, 14 Nov 2026 13:23:20 -0500, Arne Vajh|+j wrote:
    On 10/30/2026 7:06 PM, Lawrence DrCOOliveiro wrote:
    On Fri, 30 Oct 2026 14:04:22 -0400, Arne Vajh|+j wrote:
    They should disable the dangerous PHP functions.

    What if that breaks a particular PHP application that somebody
    needs to run?

    As with anything else then it would need to be looked at.

    The whole concept of a global mechanism for configuring language
    features is wrong.

    But this is not.

    This is a server or application config (depending on execution
    model).

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Nov 14 17:37:24 2026
    From Newsgroup: comp.os.vms

    On 11/14/2026 5:19 PM, Lawrence DrCOOliveiro wrote:
    On Sat, 14 Nov 2026 14:08:58 -0500, Arne Vajh|+j wrote:
    Note that besides PHP there is one other web technology available on
    VMS that can block shell access.

    On Linux, you rely on more wide-ranging access controls, like container namespaces. Those controls work across all languages, all runtimes, all libraries, all everything, because they are enforced by the kernel.

    *That* is how to do security. Not by relying on poorly-designed
    mechanisms specific to one poorly-designed language.

    Linux containers, FreeBSD jails and Solaris zones provide
    an additional layer of security - it limits what can be
    reached if a security vulnerability in the application
    is utilized to try and do something malicious.

    It is the next level of traditional minimum privileges
    and access restrictions.

    It is not an alternative to hardening application
    and server. It is an addition.

    Do not relax application hardening or server hardening
    because "it runs in a container so no problem".

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Sat Nov 14 22:40:20 2026
    From Newsgroup: comp.os.vms

    On Sat, 14 Nov 2026 17:37:24 -0500, Arne Vajh|+j wrote:

    On 11/14/2026 5:19 PM, Lawrence DrCOOliveiro wrote:

    On Sat, 14 Nov 2026 14:08:58 -0500, Arne Vajh|+j wrote:

    Note that besides PHP there is one other web technology available
    on VMS that can block shell access.

    On Linux, you rely on more wide-ranging access controls, like
    container namespaces. Those controls work across all languages, all
    runtimes, all libraries, all everything, because they are enforced
    by the kernel.

    *That* is how to do security. Not by relying on poorly-designed
    mechanisms specific to one poorly-designed language.

    It is not an alternative to hardening application and server. It is
    an addition.

    You were talking about blocking shell access. You can set up a Linux
    container that only runs the one app as pid 1, with no rCLshellrCY
    anywhere in the visible filesystem to access.

    *That* is how to rCLblock shell accessrCY.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Nov 14 17:41:59 2026
    From Newsgroup: comp.os.vms

    On 11/14/2026 5:17 PM, Lawrence DrCOOliveiro wrote:
    On Sat, 14 Nov 2026 13:22:17 -0500, Arne Vajh|+j wrote:
    On 10/30/2026 7:06 PM, Lawrence DrCOOliveiro wrote:
    Having a global config file to control language features is a
    stupid idea.

    But having a central config file to control the security of a server
    is a smart idea.

    But php.ini doesnrCOt do that. It only covers PHP.

    True. But point is that it is central - not that it is one file.

    If you have an Apache and are using mod_php to run PHP,
    then you have a httpd.conf, various included .conf files
    (like one for SSL and one for PHP) and you have a
    php.ini.

    They get created by admin/operations. They get audited
    by internal and external IS.

    Arne


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Sat Nov 14 22:41:36 2026
    From Newsgroup: comp.os.vms

    On Sat, 14 Nov 2026 17:32:44 -0500, Arne Vajh|+j wrote:

    On 11/14/2026 5:20 PM, Lawrence DrCOOliveiro wrote:

    On Sat, 14 Nov 2026 13:23:20 -0500, Arne Vajh|+j wrote:

    On 10/30/2026 7:06 PM, Lawrence DrCOOliveiro wrote:

    On Fri, 30 Oct 2026 14:04:22 -0400, Arne Vajh|+j wrote:

    They should disable the dangerous PHP functions.

    What if that breaks a particular PHP application that somebody
    needs to run?

    As with anything else then it would need to be looked at.

    The whole concept of a global mechanism for configuring language
    features is wrong.

    But this is not.

    This is a server or application config (depending on execution
    model).

    Application config should be provided as part of the application.
    ThatrCOs what rCLhardeningrCY of applications is all about, isnrCOt it?
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Sat Nov 14 22:48:06 2026
    From Newsgroup: comp.os.vms

    On Sat, 14 Nov 2026 17:41:59 -0500, Arne Vajh|+j wrote:

    On 11/14/2026 5:17 PM, Lawrence DrCOOliveiro wrote:

    On Sat, 14 Nov 2026 13:22:17 -0500, Arne Vajh|+j wrote:

    On 10/30/2026 7:06 PM, Lawrence DrCOOliveiro wrote:

    Having a global config file to control language features is a
    stupid idea.

    But having a central config file to control the security of a
    server is a smart idea.

    But php.ini doesnrCOt do that. It only covers PHP.

    True. But point is that it is central - not that it is one file.

    Central meaning it affects *all* apps running under that PHP
    installation.

    What if a particular configuration setting needed to keep one app
    secure breaks a different PHP application that somebody else needs to
    run?

    This is why having a global config file to control language features
    is a stupid idea.

    If you have an Apache and are using mod_php to run PHP, then you
    have a httpd.conf, various included .conf files (like one for SSL
    and one for PHP) and you have a php.ini.

    If I were running a Python app, I would still have all the Apache
    config, no Python-specific Apache module (thank goodness), and no
    python.ini.

    What I might also have is separate systemd .service files, one for
    running each application, which defines the environment that that
    application sees, and blocks it from seeing anything it shouldnrCOt. As
    I mentioned before, this kind of thing is not language-specific, itrCOs enforced by the kernel, so itrCOs a much more robust (and general) way
    of doing things.

    They get created by admin/operations. They get audited by internal
    and external IS.

    How does the auditor fix things if a php.ini setting needed to secure
    one app breaks another one?
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Nov 14 17:58:38 2026
    From Newsgroup: comp.os.vms

    On 11/14/2026 5:40 PM, Lawrence DrCOOliveiro wrote:
    On Sat, 14 Nov 2026 17:37:24 -0500, Arne Vajh|+j wrote:
    On 11/14/2026 5:19 PM, Lawrence DrCOOliveiro wrote:
    On Sat, 14 Nov 2026 14:08:58 -0500, Arne Vajh|+j wrote:
    Note that besides PHP there is one other web technology available
    on VMS that can block shell access.

    On Linux, you rely on more wide-ranging access controls, like
    container namespaces. Those controls work across all languages, all
    runtimes, all libraries, all everything, because they are enforced
    by the kernel.

    *That* is how to do security. Not by relying on poorly-designed
    mechanisms specific to one poorly-designed language.

    It is not an alternative to hardening application and server. It is
    an addition.

    You were talking about blocking shell access. You can set up a Linux container that only runs the one app as pid 1, with no rCLshellrCY
    anywhere in the visible filesystem to access.

    *That* is how to rCLblock shell accessrCY.

    No shell obvious prevent shell access.

    But you should talk to the guy that like to post to
    comp.os.vms about how Linux allows for starting a
    process without a shell avoiding the need for escaping.

    :-)

    At least one of the other PHP functions use that
    mechanism.

    Containers are a great technology, but it is not the
    right tool to prevent web applications from executing
    commands.

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Sat Nov 14 23:01:20 2026
    From Newsgroup: comp.os.vms

    On Sat, 14 Nov 2026 17:58:38 -0500, Arne Vajh|+j wrote:

    On 11/14/2026 5:40 PM, Lawrence DrCOOliveiro wrote:

    On Sat, 14 Nov 2026 17:37:24 -0500, Arne Vajh|+j wrote:

    On 11/14/2026 5:19 PM, Lawrence DrCOOliveiro wrote:

    On Sat, 14 Nov 2026 14:08:58 -0500, Arne Vajh|+j wrote:

    Note that besides PHP there is one other web technology
    available on VMS that can block shell access.

    On Linux, you rely on more wide-ranging access controls, like
    container namespaces. Those controls work across all languages,
    all runtimes, all libraries, all everything, because they are
    enforced by the kernel.

    *That* is how to do security. Not by relying on poorly-designed
    mechanisms specific to one poorly-designed language.

    It is not an alternative to hardening application and server. It
    is an addition.

    You were talking about blocking shell access. You can set up a
    Linux container that only runs the one app as pid 1, with no
    rCLshellrCY anywhere in the visible filesystem to access.

    *That* is how to rCLblock shell accessrCY.

    No shell obvious prevent shell access.

    But you should talk to the guy that like to post to comp.os.vms
    about how Linux allows for starting a process without a shell
    avoiding the need for escaping.

    How else do you think that pid 1 gets started?

    Containers are a great technology, but it is not the right tool to
    prevent web applications from executing commands.

    If the commands are not visible in the filesystem, there is no way to
    start them.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sat Nov 14 19:42:33 2026
    From Newsgroup: comp.os.vms

    On 11/14/2026 5:48 PM, Lawrence DrCOOliveiro wrote:
    On Sat, 14 Nov 2026 17:41:59 -0500, Arne Vajh|+j wrote:
    On 11/14/2026 5:17 PM, Lawrence DrCOOliveiro wrote:
    On Sat, 14 Nov 2026 13:22:17 -0500, Arne Vajh|+j wrote:
    On 10/30/2026 7:06 PM, Lawrence DrCOOliveiro wrote:
    Having a global config file to control language features is a
    stupid idea.

    But having a central config file to control the security of a
    server is a smart idea.

    But php.ini doesnrCOt do that. It only covers PHP.

    True. But point is that it is central - not that it is one file.

    Central meaning it affects *all* apps running under that PHP
    installation.

    The details depend on the execution context.

    Apache with mod_php can be problematic because PHPIniDir is per
    server not per virtual host.

    The modern servers will typical be
    1 app - 1 server - 1 IP endpoint - 1 php.ini
    so no problem.

    If you have an Apache and are using mod_php to run PHP, then you
    have a httpd.conf, various included .conf files (like one for SSL
    and one for PHP) and you have a php.ini.

    If I were running a Python app, I would still have all the Apache
    config, no Python-specific Apache module (thank goodness), and no
    python.ini.

    What I might also have is separate systemd .service files, one for
    running each application,

    Similar to what the modern PHP servers does.

    It wastes memory, but provides flexibility.

    Arne

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Sun Nov 15 01:55:05 2026
    From Newsgroup: comp.os.vms

    On Sat, 14 Nov 2026 19:42:33 -0500, Arne Vajh|+j wrote:

    On 11/14/2026 5:48 PM, Lawrence DrCOOliveiro wrote:

    What I might also have is separate systemd .service files, one for
    running each application,

    Similar to what the modern PHP servers does.

    It wastes memory, but provides flexibility.

    ItrCOs the only rational way to do it.

    PHP servers like PHP-FPM, of course, just transplant the original
    mod_php environment into an isolated process, unchanged. And they use
    creaky old protocols like FastCGI to communicate back to the web
    server. (Heard of anything else that uses FastCGI? I havenrCOt.)

    The approach used by other languages, like NodeJS and Python, is to
    have your app run its own mini-HTTP server, which is rCLreverserCY proxied through a rCLrealrCY web server (Apache, Nginx etc) to the outside world.
    The latter takes care of the tricky stuff like SSL/TLS and virtual
    hosting, and of course helping to keep the bad guys out, while your
    app gets its own event loop, its own ability to run background tasks
    according to its own triggers, and the ability to handle asynchronous
    requests and maintain long-running connections like WebSockets.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?Q?Arne_Vajh=C3=B8j?=@arne@vajhoej.dk to comp.os.vms on Sun Nov 15 10:37:02 2026
    From Newsgroup: comp.os.vms

    On 11/14/2026 8:55 PM, Lawrence DrCOOliveiro wrote:
    On Sat, 14 Nov 2026 19:42:33 -0500, Arne Vajh|+j wrote:
    On 11/14/2026 5:48 PM, Lawrence DrCOOliveiro wrote:
    What I might also have is separate systemd .service files, one for
    running each application,

    Similar to what the modern PHP servers does.

    It wastes memory, but provides flexibility.

    ItrCOs the only rational way to do it.

    PHP servers like PHP-FPM, of course, just transplant the original
    mod_php environment into an isolated process, unchanged. And they use
    creaky old protocols like FastCGI to communicate back to the web
    server. (Heard of anything else that uses FastCGI? I havenrCOt.)

    The approach used by other languages, like NodeJS and Python, is to
    have your app run its own mini-HTTP server, which is rCLreverserCY proxied through a rCLrealrCY web server (Apache, Nginx etc) to the outside world.
    The latter takes care of the tricky stuff like SSL/TLS and virtual
    hosting, and of course helping to keep the bad guys out, while your
    app gets its own event loop, its own ability to run background tasks according to its own triggers, and the ability to handle asynchronous requests and maintain long-running connections like WebSockets.

    FastCGI is old but when it came around then it was an improvement
    over CGI. It was used from many languages. PHP may be the best
    known, but once upon a time Python was there as well - once upon a
    time was before WSGI/ASGI became the standard.

    Tomcat -> Spring Boot and IIS -> Kestrel are probably the best examples
    of the change from multi-app server to single-app server. You pay with
    memory to get independence.

    There is also a similar move in the PHP world. From Apache+mod_php,
    Apache+FPM, niginx+FPM etc. to FrankenPHP, RoadRunner etc.. And in
    some ways it is a double win - you get isolation *and* potentially
    better performance. I have recently seen claims that for nginx+FPM
    vs FrankenPHP then simple PHP code is same, but Laravel applications
    are 3 times faster with FrankenPHP. 3 times faster is worth taking.

    It is all about independence and performance. Web sockets in PHP is
    not a problem for PHP people. And async background tasks would typical
    be handed off to something else via a message queue. Something else may
    very likely not be PHP - Java, Python or Go would be likely candidates.

    Arne




    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Sun Nov 15 19:24:46 2026
    From Newsgroup: comp.os.vms

    On Sun, 15 Nov 2026 10:37:02 -0500, Arne Vajh|+j wrote:

    There is also a similar move in the PHP world. From Apache+mod_php, Apache+FPM, niginx+FPM etc. to FrankenPHP, RoadRunner etc..

    Interesting. I looked those up. FrankenPHP builds on Mercure, which is
    also used by Symfony. It communicates back with the client using
    server-sent events instead of WebSockets. SSE is an older protocol,
    which only works in one direction and has other constraints on it --
    you really donrCOt want to be using it any more, now that WebSockets are available.

    As for RoadRunner -- it is not only built on Go, it seems to be
    oriented towards avoiding the need to write any more PHP code than
    yourCOve already got, instead doing all your new development in Go. In
    other words, it offers an off-ramp to transition away from PHP!

    And async background tasks would typical be handed off to something
    else via a message queue.

    ItrCOs all part of the internal workings of the application. It
    shouldnrCOt be something that a user/admin should have to delve into as
    part of the setup -- which is what they typically have to do with PHP,
    with cron tasks.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Sun Nov 15 21:00:02 2026
    From Newsgroup: comp.os.vms

    In article <11da8s3$25hpa$4@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/26/2026 9:21 PM, Dan Cross wrote:
    term% ruby
    class A
    def foo
    bar
    end

    private
    def bar
    puts "Hello from A's bar"
    end
    end

    class B < A
    private
    def bar
    puts "Hello from B's bar"
    end
    end

    a = A.new
    a.foo
    b = B.new
    b.foo
    Hello from A's bar
    Hello from B's bar

    In *this* language, `private` doesn't mean what it means in C++.

    In Ruby it means object private instead of class private. And as
    demonstrated in my other post then it is a OO encapsulation
    disaster.

    But the second example quoted here is actually not different from C++. >Because C++ interprets visibility as just that and does not
    include overrideability.

    I think you missed the point. If you want to criticize the
    author of, "PHP: a Fractal of Bad Design" for "not knowing OO"
    because of what they wrote about `private` methods, then you'd
    better know what they were referring to. Consider that,
    perhaps, that author _may_ know just a little bit more than you
    do about OO.

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From cross@cross@spitfire.i.gajendra.net (Dan Cross) to comp.os.vms on Sun Nov 15 21:05:41 2026
    From Newsgroup: comp.os.vms

    In article <11da8sv$25hpa$5@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/30/2026 5:56 PM, Dan Cross wrote:
    In article <11c2mfu$fsse$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/28/2026 1:22 PM, Dan Cross wrote:
    In article <11brfro$20u59$1@dont-email.me>,
    Arne Vajh|+j <arne@vajhoej.dk> wrote:
    On 10/24/2026 8:45 PM, Dan Cross wrote:
    B) you are comparing
    interfaces that are designed for _explicit_ use in controlled
    ways with one designed to easily interpolate values that are
    ambient *in the lexical context of the invoking code*. One is
    significantly _easier_ to misuse than the other. Because that
    language is also designed to process inherently untrusted data,
    it must be used with significant care; yet it is positioned as
    the easy-to-use beginners language. That's a dangerous mix.
    I can not follow.

    Let me show some code. I will substitute Cobol with Fortran

    No. You posted three code snippets that all do approximately
    the same thing, but at the same time, failed to address the
    substance of what i raised above.

    [snip]
    But I don't see any of the differences matter from a
    security perspective.

    That was the point.

    I showed that native languages had the same
    issue as PHP.

    No, you really did not. You merely showed that other languages
    can spawn programs using `LIB$SPAWN` or similar mechanisms.

    That *is* the same issue as shell_exec in PHP.

    Nope. Not even close.

    What you missed is that it is the unique combination of
    anti-patterns manifest in PHP that make it dangerouus in this
    regard.

    The ability to execute shell commands is the ability
    to execute shell commands. No more no less.

    I'm afraid you do not seem to understand what other people are
    telling you. Repeating the same thing over and over again is
    not going to change that.

    Consider this analogy: `strcpy()` is dangerous because you
    cannot tell it how big the destination buffer is. `strlcpy()`
    is much safer because you _do_ tell it the size of the
    destination buffer, it promises to NUL-terminate the destination
    (as long as size>0), _and_ it tells how much space the source
    required, so that you can detect truncation. That doesn't mean
    that it is perfectly safe, because you can still give it a bad
    destination length; you _can_ call it with `SIZE_MAX`, but most
    programmers do not.

    The analogy is whether C is less safe or as safe/unsafe
    as another language XYZ that has a let us say cpystr function
    with the same problem.

    And the answer is that C is as safe/unsafe as XYZ (in
    this regard).

    You do not understand the analogy.

    And unlike with PHP there is no easy way to close the
    problem.

    I doubt that disabling shell actually prevents you from calling
    `LIB$SPAWN` via other means.

    There is a list of functions able to spawn shell commands. I
    even think I listed them in another post. Disable them all
    and no spawn.

    ...and someone writes a module that invokes, `lib$spawn`; does
    the language prevent that? Or they invoke something that does
    it via FFI....does the language prevent that?

    - Dan C.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Simon Clubley@clubley@remove_me.eisner.decus.org-Earth.UFP to comp.os.vms on Mon Nov 16 20:25:51 2026
    From Newsgroup: comp.os.vms

    On 2026-11-14, Lawrence D Oliveiro <ldo@nz.invalid> wrote:
    On Sat, 14 Nov 2026 17:58:38 -0500, Arne Vajhoj wrote:

    Containers are a great technology, but it is not the right tool to
    prevent web applications from executing commands.

    If the commands are not visible in the filesystem, there is no way to
    start them.

    Your compromised application writes out a basic executable and then
    executes it.

    SELinux and other MAC technologies are probably a better way for
    _helping_ to keep a compromised application contained.

    Nothing to stop you using them alongside other tools and technologies
    however for a layered approach. Don't forget that security is a process
    and a mindset, not a magic bullet.

    Simon.
    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Stephen Hoffman@seaohveh@hoffmanlabs.invalid to comp.os.vms on Mon Nov 16 23:26:18 2026
    From Newsgroup: comp.os.vms

    On 2026-11-16 20:25:51 +0000, Simon Clubley said:

    Your compromised application writes out a basic executable and then
    executes it.

    Yep.

    Variously without even writing files: https://en.wikipedia.org/wiki/Fileless_malware

    SELinux and other MAC technologies are probably a better way for
    _helping_ to keep a compromised application contained.

    Yep.

    Or as an internediate and somewhat smaller implememation effort,
    pledge: https://myunix.org/bsd/openbsd-pledge-unveil/

    Nothing to stop you using them alongside other tools and technologies however for a layered approach. Don't forget that security is a process
    and a mindset, not a magic bullet.

    Yep

    Software is "done" just as lawns are "mowed", of course.

    And to be very blunt, there is ~no documentation for writing secure
    apps on OpenVMS.

    The system security manual is badly dated and woefully incomplete, the
    source code examples are problematic at best, the ACME API eschews the
    easy stuff, the TLS APIs are a moving target, CDSA is decades
    deprecated, etc.

    Simon.

    Yep.

    What somebody with a pile of spare tokens and an inclination to reverse-engineer OpenVMS might eventually find?

    Fun Times.
    --
    Pure Personal Opinion | HoffmanLabs LLC

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.os.vms on Tue Nov 17 04:36:24 2026
    From Newsgroup: comp.os.vms

    On Mon, 16 Nov 2026 23:26:18 -0500, Stephen Hoffman wrote:

    And to be very blunt, there is ~no documentation for writing secure
    apps on OpenVMS.

    There seems to be this myth that VMS was somehow immune to the
    security vulnerabilities that plague other platforms on the Internet.

    I mentioned Linux containers: they are helpful for tightly isolating
    the environment that is even visible to an app.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Simon Clubley@clubley@remove_me.eisner.decus.org-Earth.UFP to comp.os.vms on Tue Nov 17 13:51:39 2026
    From Newsgroup: comp.os.vms

    On 2026-11-16, Lawrence D Oliveiro <ldo@nz.invalid> wrote:
    On Mon, 16 Nov 2026 23:26:18 -0500, Stephen Hoffman wrote:

    And to be very blunt, there is ~no documentation for writing secure
    apps on OpenVMS.

    There seems to be this myth that VMS was somehow immune to the
    security vulnerabilities that plague other platforms on the Internet.


    And when you prove that it's not immune some people get very annoyed
    with you and go into denial.

    Simon.
    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Bill Gunshannon@bill.gunshannon@gmail.com to comp.os.vms on Tue Nov 17 20:39:15 2026
    From Newsgroup: comp.os.vms

    On 11/16/26 23:26, Stephen Hoffman wrote:
    On 2026-11-16 20:25:51 +0000, Simon Clubley said:

    Your compromised application writes out a basic executable and then
    executes it.

    Yep.

    Variously without even writing files: https://en.wikipedia.org/wiki/ Fileless_malware

    SELinux and other MAC technologies are probably a better way for
    _helping_ to keep a compromised application contained.

    Yep.

    Or as an internediate and somewhat smaller implememation effort, pledge: https://myunix.org/bsd/openbsd-pledge-unveil/

    Nothing to stop you using them alongside other tools and technologies
    however for a layered approach. Don't forget that security is a
    process and a mindset, not a magic bullet.

    Yep

    Software is "done" just as lawns are "mowed", of course.

    And to be very blunt, there is ~no documentation for writing secure apps
    on OpenVMS.

    The system security manual is badly dated and woefully incomplete, the source code examples are problematic at best, the ACME API eschews the
    easy stuff, the TLS APIs are a moving target, CDSA is decades
    deprecated, etc.

    Simon.

    Yep.

    What somebody with a pile of spare tokens and an inclination to reverse- engineer OpenVMS might eventually find?

    Fun Times.



    I wish I had kept a copy of the STIG from DISA, It was very out of date
    when I was there in 2009 but could still be used as a starting point for
    making new ones.

    bill

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Bill Gunshannon@bill.gunshannon@gmail.com to comp.os.vms on Tue Nov 17 20:43:49 2026
    From Newsgroup: comp.os.vms

    On 11/17/26 08:51, Simon Clubley wrote:
    On 2026-11-16, Lawrence D|+Oliveiro <ldo@nz.invalid> wrote:
    On Mon, 16 Nov 2026 23:26:18 -0500, Stephen Hoffman wrote:

    And to be very blunt, there is ~no documentation for writing secure
    apps on OpenVMS.

    There seems to be this myth that VMS was somehow immune to the
    security vulnerabilities that plague other platforms on the Internet.


    And when you prove that it's not immune some people get very annoyed
    with you and go into denial.


    DISA was well aware and actually published security guides for VMS.
    At least until DOD lost all interest in VMS. I was there in 2009
    and it was somewhere before then.

    bill

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Simon Clubley@clubley@remove_me.eisner.decus.org-Earth.UFP to comp.os.vms on Wed Nov 18 20:26:01 2026
    From Newsgroup: comp.os.vms

    On 2026-11-17, Bill Gunshannon <bill.gunshannon@gmail.com> wrote:
    On 11/17/26 08:51, Simon Clubley wrote:
    On 2026-11-16, Lawrence D Oliveiro <ldo@nz.invalid> wrote:
    On Mon, 16 Nov 2026 23:26:18 -0500, Stephen Hoffman wrote:

    And to be very blunt, there is ~no documentation for writing secure
    apps on OpenVMS.

    There seems to be this myth that VMS was somehow immune to the
    security vulnerabilities that plague other platforms on the Internet.


    And when you prove that it's not immune some people get very annoyed
    with you and go into denial.


    DISA was well aware and actually published security guides for VMS.
    At least until DOD lost all interest in VMS. I was there in 2009
    and it was somewhere before then.


    None of that stopped the poor DEFCON 16 people from being shouted at
    by some people in denial and people like me having to explain certain
    basic things to those same people in denial around here.

    Simon.

    PS: Those guides also didn't help when it was my turn to be the target
    of people in denial a few years later. :-)
    --
    Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
    Walking destinations on a map are further away than they appear.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Bill Gunshannon@bill.gunshannon@gmail.com to comp.os.vms on Thu Nov 19 20:11:46 2026
    From Newsgroup: comp.os.vms

    On 11/18/26 15:26, Simon Clubley wrote:
    On 2026-11-17, Bill Gunshannon <bill.gunshannon@gmail.com> wrote:
    On 11/17/26 08:51, Simon Clubley wrote:
    On 2026-11-16, Lawrence D|+Oliveiro <ldo@nz.invalid> wrote:
    On Mon, 16 Nov 2026 23:26:18 -0500, Stephen Hoffman wrote:

    And to be very blunt, there is ~no documentation for writing secure
    apps on OpenVMS.

    There seems to be this myth that VMS was somehow immune to the
    security vulnerabilities that plague other platforms on the Internet.


    And when you prove that it's not immune some people get very annoyed
    with you and go into denial.


    DISA was well aware and actually published security guides for VMS.
    At least until DOD lost all interest in VMS. I was there in 2009
    and it was somewhere before then.


    None of that stopped the poor DEFCON 16 people from being shouted at
    by some people in denial and people like me having to explain certain
    basic things to those same people in denial around here.

    Simon.

    PS: Those guides also didn't help when it was my turn to be the target
    of people in denial a few years later. :-)


    Although those guides were publicly available I only "know" one person
    outside of DOD that actually took the trouble to run the scans and apply
    the suggestions in the Guide. Wanna guess who that one person was. :-)

    bill

    --- Synchronet 3.22a-Linux NewsLink 1.2