jedigunz Posted April 20, 2023 Posted April 20, 2023 Now that PHP 7 is becoming deprecated across most servers, MCCODES 2.0.5b does not work on version 8. Has anyone played around with the engine to get it working on PHP 8 ?? Be good to know if there are any simple fixes for this issue. Quote
Ishraq Posted April 21, 2023 Posted April 21, 2023 It is something I'd play around with, however I decided to just convert it and implement an MVC approach using a basic MVC model from codeshack. It is working on PHP8 on MWG hosting. When adding a mod, some variables are renamed and file is stripped to follow MVC model. At the moment, it's being built as a game but I will surely look into making it into a game engine itself. Quote
jedigunz Posted April 21, 2023 Author Posted April 21, 2023 (edited) I was attempting to use a library called Rector but had no luck getting composer recognised by an IDE to actually run rector and convert the engine automatically. https://github.com/rectorphp/rector Also I have seen another library that could work but also needs composer PHPCodeSniffer https://github.com/squizlabs/PHP_CodeSniffer Composer https://getcomposer.org I have a subdomain running php8 and the main domain running php7 , 7 works but 8 doesn't and I get a Critical Error when logging in (A critical error has occurred, and this page cannot be displayed. Please try again later.) Change it back to PHP7 and no problems again. NOT WORKING (PHP8) http://phpupdate.deadlycountry.com/login.php WORKS (PHP7) https://deadlycountry.com/login.php If anyone uses composer and knows how to get it running on an IDE on Windows that would be great ! if anyone or yourself Ishraq have any other conversion suggestions for the base engine let me know. Edited April 21, 2023 by jedigunz Quote
AdamHull Posted April 21, 2023 Posted April 21, 2023 PHP 8.2 McCodes v1 Here is a repo of the v1 version modified to run PHP 8.2, be careful using it as there is a few bugs and runs a shim to enable MySQL connection, if you want any advise on how to upgrade the PHP version, give me a message and I will be able to show you how to get things going, including getting your composer to work on you IDE Quote
peterisgb Posted April 21, 2023 Posted April 21, 2023 3 hours ago, AdamHull said: PHP 8.2 McCodes v1 Here is a repo of the v1 version modified to run PHP 8.2, be careful using it as there is a few bugs and runs a shim to enable MySQL connection, if you want any advise on how to upgrade the PHP version, give me a message and I will be able to show you how to get things going, including getting your composer to work on you IDE Your link is 404 dead Quote
corruptcity || skalman Posted April 21, 2023 Posted April 21, 2023 I'm using php 8.2 on my xampp and mccodes works no problems. Things I've needed to change was removing the magic quotes from globals.php switched to my_sqli, not planning on switching to prepared queries just yet. the most common problem i've found is having to change if($_POST['some var']) to if(isset($_POST['some var']) in most pages that I've looked at sofar. haven't come across any game or script breaking code or errors. Quote
AdamHull Posted April 21, 2023 Posted April 21, 2023 3 hours ago, peterisgb said: Your link is 404 dead I did not put this public I have now 1 Quote
jedigunz Posted April 22, 2023 Author Posted April 22, 2023 Thanks for that @AdamHull I will have a look at your V1 conversion when I get a chance @skalman I removed magic quotes since PHP 7, might be some of the modification I have either added or coded which is affecting it then, I will look more closely and see what else could be the issue Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.