Jump to content
MakeWebGames

Php 5.3 advice


Bennyh789

Recommended Posts

I guess this goes here but feel free to move it mods.

So just received an email from my host saying that it will be upgraded within the next few days to 5.3.

Will this cause any issues for my game running in mccodes v2.

If so what issues and are they difficult to fix

Thanks

Ben

Link to comment
Share on other sites

Here is a list straight from the source for the lazies:

Although most existing PHP 5 code should work without changes, please take note of some backward incompatible changes:

 

  • The newer internal parameter parsing API has been applied across all the extensions bundled with PHP 5.3.x. This parameter parsing API causes functions to return NULL when passed incompatible parameters. There are some exceptions to this rule, such as the get_class()function, which will continue to return FALSE on error.
  • clearstatcache() no longer clears the realpath cache by default.
  • realpath() is now fully platform-independent. Consequence of this is that invalid relative paths such as __FILE__ . "/../x" do not work anymore.
  • The call_user_func() family of functions now propagate $this even if the callee is a parent class.
  • The array functions natsort(), natcasesort(), usort(), uasort(), uksort(), array_flip(), and array_unique() no longer accept objects passed as arguments. To apply these functions to an object, cast the object to an array first.
  • The behaviour of functions with by-reference parameters called by value has changed. Where previously the function would accept the by-value argument, a fatal error is now emitted. Any previous code passing constants or literals to functions expecting references, will need altering to assign the value to a variable before calling the function.
  • The new mysqlnd library necessitates the use of MySQL 4.1's newer 41-byte password format. Continued use of the old 16-byte passwords will cause mysql_connect() and similar functions to emit the error, "mysqlnd cannot connect to MySQL 4.1+ using old authentication."
  • The new mysqlnd library does not read mysql configuration files (my.cnf/my.ini), as the older libmysqlclient library does. If your code relies on settings in the configuration file, you can load it explicitly with the mysqli_options() function. Note that this means the PDO specific constantsPDO::MYSQL_ATTR_READ_DEFAULT_FILE and PDO::MYSQL_ATTR_READ_DEFAULT_GROUP are not defined if MySQL support in PDO is compiled with mysqlnd.
  • The trailing / has been removed from the SplFileInfo class and other related directory classes.
  • The __toString() magic method can no longer accept arguments.
  • The magic methods __get(), __set(), __isset(), __unset(), and __call() must always be public and can no longer be static. Method signatures are now enforced.
  • The __call() magic method is now invoked on access to private and protected methods.
  • func_get_arg(), func_get_args() and func_num_args() can no longer be called from the outermost scope of a file that has been included by calling include or require from within a function in the calling file.
  • An emulation layer for the MHASH extension to wrap around the Hash extension have been added. However not all the algorithms are covered, notable the s2k hashing algorithm. This means that s2k hashing is no longer available as of PHP 5.3.0.

The following keywords are now reserved and may not be used in function, class, etc. names.

Link to comment
Share on other sites

Sorry to hear that it will cause you problems. However this is what happens when you don't plan for the future. You could override the PHP version via htaccess I believe.

Link to comment
Share on other sites

if i was you i would update the all the mysql_query to mysqi_query , since your using $db-> for the query in V2 you can just update the database file. as mysql_query is being made redundant is 5.6, so might as well change, if your going thought the files ready for it, it will be a while before its launched but may as well be ready.

Link to comment
Share on other sites

if i was you i would update the all the mysql_query to mysqi_query , since your using $db-> for the query in V2 you can just update the database file. as mysql_query is being made redundant is 5.6, so might as well change, if your going thought the files ready for it, it will be a while before its launched but may as well be ready.

True, mysql_() will be dropped or has been dropped depending on your version >= 5.5 but that is still quite some time away for most people. Using mysqli() is better anyway so that should already be done by most people but I would look up another class that binds the queries for you so you dont have to.

But From what I see all those functions should still work as long as they are used correctly and its not like its a whole lot that needs to be fixed

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...