PHP Day 10: Security Issues with Superglobals and register_globals

This six-minute video explores the security issues and differences between the superglobals $_GET, $_POST, and $_REQUEST, as well as the problematic register_globals option.

Links for PHP Day 10: Security Issues with Superglobals and register_globals

Security issues and differences between superglobals $_GET, $_POST, and $_REQUEST:

  • PHP Get – Overview of the $_GET superglobal array.
  • PHP Post – Overview of the $_POST superglobal array.
  • Essential PHP Security Chapter 2 – Forms and URLS (PDF file) – A free sample chapter from the book Essential PHP Security by Chris Shiflett. I didn’t understand all of it, but it has some great explanations and examples of several exploits.

About register_globals:

Turning off register_globals:

  • Using a php.ini File – A good, basic overview.
  • .htaccess Tutorial – General info on the .htaccess file.
  • To turn off register_globals through the .htaccess file, just write “php_flag register_globals off” in it.

Originally I planned to cover PHP security in one video, but then I ended up spending half my day yesterday just reading about PHP security issues! Needless to say, I’ll be revisiting this topic.

4 thoughts on “PHP Day 10: Security Issues with Superglobals and register_globals

  1. Your tutorials are great and really helped with the superglobal concept. I have one question. I created several scripts that insert and retrieve data from a mySQL database. In my php.ini file, when I have register_globals set to on everything works fine but, I would really like to turn them off. But, when I do, I cannot set or retrieve from my database. I know I need to use superglobals but could you give me an example of how I need to change my code. Here is an example of my code:

    I sure could use your help. Thanks in advance

  2. Pingback: Tutorials on Code Security | Learn Web Design Online

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>