🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.vms
Article #60

Re: PHP "Features"

#60
From: Dan Cross
Date: Sat, 24 Oct 2026 17:22
53 lines
3225 bytes
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.
Technical Details
Message-ID: <11bipfv$190$1@reader2.panix.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!panix!.POSTED.spitfire.i.gajendra.net!not-for-mail
References: <11bcbi1$k068$1@dont-email.me> <nk2bhaF5j2sU1@mid.individual.net> <11bh3ei$19g$1@reader2.panix.com> <11bi7bg$2mdi4$1@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!panix!.POSTED.spitfire.i.gajendra.net!not-for-mail
From: cross@spitfire.i.gajendra.net (Dan Cross)
Newsgroups: comp.os.vms
Subject: Re: PHP "Features"
Date: Sat, 24 Oct 2026 17:22:07 -0000 (UTC)
Organization: PANIX Public Access Internet and UNIX, NYC
Message-ID: <11bipfv$190$1@reader2.panix.com>
References: <11bcbi1$k068$1@dont-email.me> <nk2bhaF5j2sU1@mid.individual.net> <11bh3ei$19g$1@reader2.panix.com> <11bi7bg$2mdi4$1@dont-email.me>
Injection-Date: Sat, 24 Oct 2026 17:22:07 -0000 (UTC)
Injection-Info: reader2.panix.com; posting-host="spitfire.i.gajendra.net:166.84.136.80";
	logging-data="1312"; mail-complaints-to="abuse@panix.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: cross@spitfire.i.gajendra.net (Dan Cross)