PHP 5.3.0 Upgrade
The upgrade to PHP 5.3.0 (and possibly mysqlnd) brought some odd and annoying changes to how PHP works, especially concerning MySQL.
MySQL
- mysql_close() requires a resource link identifier; without one, the script will crash on that line.
- mysql_insert_id() needs to be immediately following the mysql_query() that does the insert. If any other queries, even non-inserting queries, separate the insert query from mysql_insert_id() you’ll get a zero back as the ID.
Other
- PHP 5.3.0 is less forgiving of blank lines at the beginning of a page. Any blank lines will now cause PHP to send headers, thus invalidating any header() functions in the page.
- getHostName() is now a built-in function; having a function of that name will fail.
- SCRIPT_URL is gone; SCRIPT_NAME seems to be its replacement. However, note that SCRIPT_NAME will sometimes contain index.php or other index filenames.
