Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Arno Welzel Newsgroups: comp.lang.php Subject: Re: PHP boilerplate to appear at the top of any program Date: Thu, 31 Dec 2015 16:11:22 +0100 Lines: 71 Message-ID: <5685459A.50200@arnowelzel.de> References: <2838299.zdqeYZrqYU@PointedEars.de> <1473248.ziGLShfuNh@PointedEars.de> <5131195.4d26jNU0Ms@PointedEars.de> <1535700.EMr0ZOzjxF@PointedEars.de> <6olgy.31399$b8.17906@fx29.iad> <5683B141.5080909@arnowelzel.de> <5684E23B.30100@arnowelzel.de> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Trace: individual.net pT+tCHjEIQpD/Lor9GTbmg30dDIaXwXJ1QUztP8BSeaMpKsi2Y Cancel-Lock: sha1:/zWUQ3bkfcjS5rEGmSmHACEiYLM= In-Reply-To: Xref: csiph.com comp.lang.php:16031 Jerry Stuckle schrieb am 2015-12-31 um 13:47: > On 12/31/2015 3:07 AM, Arno Welzel wrote: >> Richard Damon schrieb am 2015-12-31 um 03:55: >> >>> On 12/30/15 3:18 PM, Jerry Stuckle wrote: >>>> >>>> Yes, I can. The latest I have is in Drupal, where adding PHP code to a >>>> page places that code in the database. The code is then exec()'d when >>>> it comes out. I have made extensive use of it in a couple of sites >>>> where I need to access an external resource in a couple of pages, but >>>> not enough to require a module. The same is true in WordPress and Joomla. >>>> >>>> >>> >>> In Drupal, to add PHP code to a page via the database, you need to turn >>> on the 'PHP' module. >>> >>> As described in the documentation >>> https://www.drupal.org/documentation/modules/php >>> there are major concerns about this, and would hardly be considered >>> 'standard' procedure. >>> >>> Putting PHP code in the database is possible, but it not the 'standard' >>> way to use the CMS. Developers will almost always create a custom module >>> (or other points in the code of the site itself) to inject PHP code into >>> a site (it really isn't hard), and the final users/maintainter tend to >>> focus on 'content' (the C in CMS). >> >> The same is true for WordPress: There is no standard way to add PHP code >> to a page or post which would then be stored in the database. There are >> only some third party plugins who try emulating this using output >> filters (as >> ) - but it >> is of course not recommended due to possible security problems and this >> is not part of the WordPress core framework. >> >> >> > > So it's not part of the core? There are a lot of things which aren't Correct - it's not part of the core. It's even not a plugin by the core team of WordPress. Therefore your claim that WordPress puts code in the database is just wrong. Or would you also say PHP is insecure because people implement insecure scripts? > part of the core of WordPress in use every day. In fact, I would > suspect most WordPress sites have additional modules - at least the > sites I've seen generally do. So what? It's not a core feature of WordPress but the specific implementation of the plugins for WordPress. By the way: there is no thing like a "module" for WordPress. WordPress has "themes" and "plugins". Modules are the extensions for Drupal. > And yes, it's not recommended for many CMS users they don't know how to > handle security properly. It is perfectly possible to put secure code > in the database. But you have to know what you're doing - which you > have repeatedly proven you don't. I know what I'm doing. You just can't stand it and you constantly trying to insult me. What's wrong with you? Having trouble with your "JDS Computer Training Corp." or "SmarTech Homes" or any of the other "companies" you run from your home address in Bethesda? -- Arno Welzel http://arnowelzel.de http://de-rec-fahrrad.de http://fahrradzukunft.de