Way back in 2008 the PHP Group ended support for PHP 4. Since then the Coppermine team have been considering when to withdraw support for PHP 4. We have decided on a phased approach with PHP 4 support being removed completely as of CPG1.6.x.
Why? Since 2008 no more work was done on PHP 4 meaning any server still using it could pose a security risk. As a result, most hosts have removed PHP 4 and upgraded to PHP 5 but we are aware there are still a few out there.
Up to CPG 1.5.24, PHP 4 was fully supported but for those using newer versions of PHP could throw up warning messages depending on specific server setups. To remove these messages we have made a number of changes as outlined in the following thread.
http://forum.coppermine-gallery.net/index.php/topic,76493.0.html With these changes in place Coppermine will no longer work correctly on servers running PHP 4. In the short term we will be providing a patch package as part of the download which should be used just for those still running on outdated servers. This should only be used as a last resort and before doing so you should speak to your host with a view to updating to PHP5. In most cases it is a simple selection you can make in your cpanel, or the addition of a simple file in your root folder. Either way your host is the best source of the correct information as to how to do this.
OK, so I shall update to PHP 5. What are the main changes ?PHP 5 is designed to be as compatible with earlier versions of PHP as possible with little functionality being broken in the process, but there are things that you need to be aware of as depending on your site, you may have some work to do. Coppermine is fully compatible out of the box, but some third party PHP scripts may not be as well as a possibility that some of you custom modifications could cause problems. The information below outlines some of the main changes that you need to be aware of.
Removal of register_globalsRegister_globals will be removed due to major security concerns regarding the directive.
If your website relies on register_globals being available, you will need to re-code your website to work without them. If you're running a site using a package like Joomla or Wordpress alongside Coppermine, this can be as simple as upgrading to the latest version. However, if you've written the PHP code yourself, you will need to check that it works under PHP version 5.
Removal of MySQL LibrariesThe standard MySQL libraries have been flagged for removal in version 5. Although there is no confirmed date for removing these functions as yet, you should change your code to use one of the recommended methods of connecting to MySQL servers, such as PDO:MySQL.
More information about PDO is available
hereMore information about possible database issues can be found
hereRemoval of short tagsAs of PHP 5.3 the use of short tags is no longer supported, you will need to convert any files that use these tags to the standard tags. One exception to this rule is the use of the short tag definitions, as these are enabled by default without the need for "short_open_tag" being enabled in php.ini as of PHP 5.4.
More information about the use of short tags can be found
here.New object modelIn PHP 5 there is a new Object Model. PHP's handling of objects has been completely rewritten, allowing for better performance and more features.
More details about this can be found
here.New Reserved Words and KeywordsThere have been a number of words added to the reserved words list, meaning that you cannot use them anymore for variable names. Full details can be found
here.
New FunctionsThere are a number of new functions available in version 5, which can be used instead of having to write your own. For example, in version 5 there is a string split function which converts a string into an array of letters whereas in version 4, you had to write your own to do this.
A full list of new functions is available
here
If you have no idea what we are talking about above don't panic as almost every webhost of note has already upgraded to PHP 5, if they have not then you should jump up and down, shout at them then ask why they are putting themselves and their customers at risk. If you are your own webhost or server owner still running PHP 4 then see me after class for detention and lines.
A more in depth article on upgrading to PHP 5 can be found
here