Deprecated Extensions and Features in PHP

by Hiroshi on January 31, 2013

in connection

To maintain security and stability, PHP extensions, features and mySQL have to be updated. Now old mySQL Database Queries will run the same but for the new PHP version they might through an error of deprecated query or something. After sometime deprecated extensions won’t be supported by PHP servers and phpMyAdmin mySQL server. Here are few changes that you should consider to make immediately in your PHP code.

mysql_db_query() selects a database, and executes a query on it. It has been deprecated and highly discouraged to use. mysql_db_query supported by PHP4 and PHP5 is deprecated and will be removed in future. Instead, the MySQLi or PDO_MySQL extension should be used.

See MySQL Improved Extension. mysqli is one of them.

Following features of PHP have been also deprecated. These are PHP.ini directives.

  • define_syslog_variables
  • register_globals
  • register_long_arrays
  • safe_mode
  • magic_quotes_gpc
  • magic_quotes_runtime
  • magic_quotes_sybase

Deprecated INI directives and functions

Recommendation is to use the latest version of PHP on your server. If your dynamic website code is old then get a developer to fix it according to the new standards to avoid SQL injections, website getting hacked and other issues.

Related Posts

Previous post:

Next post: