LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-23-2016, 08:31 PM   #16
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,161

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Cool


Quote:
Originally Posted by sundialsvcs View Post
Exactly so. "The SQL statement that is to be executed" is found only in supplied string, which does not have any user-provided content. This statement, in the example above, has four input-parameters which must be supplied with values each time the prepared statement-handle ($stmt ...) is executed. Different parameter values may be provided each time $stmt is executed: there is no need to re-prepare the handle. Even if the parameter values "look like SQL," they are interpreted only as character-strings (or whatever data-type you said they were ...). In other words, they are input data to the query; never a part of the query itself.

This is not only more secure, but also more efficient. The SQL engine parses the SQL and prepares the "execution plan," as represented by the statement-handle, only one time. And, if you happen to be executing a statement millions of times, that does make a measurable difference.

It utterly baffles me why PHP did not provide easy access to this facility from the very start. (And why, when they finally did add it, they did not make it "easy.") It has always been available.
Thanks again.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Injection attack against my server sneakyimp Linux - Security 22 12-10-2015 08:03 AM
False data injection Attack in ns-BGP newinubuntu Linux - Networking 0 02-14-2015 09:44 AM
LXer: Bash susceptible to environment variables code injection attack LXer Syndicated Linux News 0 09-25-2014 12:10 PM
Clean up begins after massive website attack Jeebizz Linux - News 0 04-04-2011 10:05 AM
Vulnerability in website with sql Injection tanveer Linux - Security 7 03-28-2009 08:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 01:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration