Php update problem

Website URL

dupywars.xyz

Error Message

This version of Discuz! is not compatible with >= PHP 8.0, Please install or update to higher version.

Other Information

Can I downgrade php? 8.0 or higher versions arent supported :frowning:

Not possible on free hosting

4 Likes

oh which plan it will be possible?

Is there a reason why you don’t update whatever you are using?

5 Likes

becuz it doesnt have a version that supports php 8.0

Then it may be a good idea to find new software, as it’s probably not supported anymore by the developer, and may contain security vulnerabilities

6 Likes

it actually does support php 8.2 with latest version, but upgrading to the latest version requires php 7.4.
(Also i need the set_time_limit() function because the script might take a long time to upgrade the software, depending on the server’s performance)

You can always upgrade things manually through an FTP client such as filezilla.

3 Likes

but thats not an easy job, because im not the dev of the software

You can update it locally and replace the files

4 Likes

but i cant access mysql locally cuz im not on premium

You can always install mysql locally (XAMPP or Laragon), export the database data via phpmyadmin, inport it into your local database and finally after upgrading import the data of local database to the InfinityFree database.

6 Likes

is it possible to install mysql on windows?

Yes, software like XAMPP or WAMP usually include it by default.

6 Likes

they dont support older versions of php :frowning:

As far as I’m aware, WAMP includes PHP 7.4 by default, and if it doesn’t you can download it from here:
https://wampserver.aviatechno.net/?lang=en&allversions=afficher

For XAMPP, you could try looking for an online guide, a quick Google search produced this:

4 Likes

the XAMPP’s sql server cant read the file i exported from phpmyadmin, it says “Regular expression missing. (near “ON” at position 25)”.

1 Like

What is your hosting volume information?

Can you share a few lines of code before and after line 25? Hide any sensitive data.

3 Likes

Hi minecraft8723,

Please follow this full guide on the entire upgrade process with your local computer and your own hosting.

In the meantime, it is not necessary for you to disclose this sensitive information, nor should non-staff members ask about this, nor would they ask publically.

Yes, that translates to:

You can update your software by:

  1. Download the whole source code to your computer using FTP software like FileZilla.
  2. Setup a local multi-version PHP development environment to test your code and update
  3. Update the files.
  4. Upload exactly the source files again to the new PHP 8 enabled hosting onto InfinityFree.

To do this, you might want to make sure you have sufficient disk space and time on your computer and your schedule. All tools mentioned in this guide are completely free at the time of writing and you should not need to pay for anything, skip all sponsored downloads or messages if you encounter any.

1. Download your whole source code

Step 1. Download and install FileZilla.
Step 2. Login to your client area panel and you will see different websites you own in the account, in the one that is having issues, you can find your FTP information.

Step 3. Launch FileZilla and establish a connection using the information you obtained in Step 2.
Step 4. On the left-hand side of FileZilla, which is your local computer, navigate to a blank folder with nothing in it, create one if necessary, preferably in the D drive if you have one.
Step 5. On the right-hand side of FileZilla, that is the InfinityFree hosting, some folders should show if you connected successfully, go all the way up until the path is “/”.
Step 6. Select the folder “htdocs” and right-click> Download.
Step 7. A bunch of progress bars and items should fill up the bottom area, that represents each download per file, wait until this finishes.
Step 8. After a nice nap, you now have a full set of source code on your computer!

2. Setup local development environment

By this, we want to run PHP on your own computer, so that you can upgrade the source code by yourself. Assuming you have never done this before, just download the following items and install all necessary packages exactly according to the following order.

Step 1. Open your browser and navigate to the following link:
https://wampserver.aviatechno.net/
Step 2. Download ALL files in the red box, but do not start installing just yet:



Step 3. Install all the Visual C++ Redistributable Packages first (links in the 3rd image) for both 32 and 64-bit versions regardless of your computer specs, you’ll need both versions even if you run a 64-bit computer.

Step 4. Install an IDE if you haven’t already at:
notepad++ : Downloads | Notepad++
VSCode (Recommended) : Download Visual Studio Code - Mac, Linux, Windows

Step 5. Install the files in the first image, it will guide you through the entire process. When you get asked about your default browser and default IDE, navigate to the Program Files folder by typing %programfiles% and you can find your IDE program very easily.

This process installs Apache (the server application), a copy of MySQL (same as hosting) and the latest PHP version.

You’ll also be prompted to setup a database login with a password, remember this for the next big step, write this down if you need. You’ll lose everything and have to start again in the long run if you forget this new login and password.

Step 6: Install the additional PHP versions (files downloaded in 2nd image). Run each one, one at a time. Do not attempt to install multiples at the same time or you risk starting from step 5 again with a painful clearup.

Step 7. A Start Wampserver logo should appear on your desktop, keep this shortcut and run this one.
Step 8. A splash screen saying it’s starting and being patient appears with a bit of flashing console windows, let it do its thing.
image

Step 9. A tray icon looking like W representing wampserver should turn from red to orange to green.
Step 10. Once you have a green W image , you’re good to go.

3. Update the files

Step 1. Copy all your source code files in Big Step 1 to “wampserver installation folder > www”.
Continue the following while you wait.

Step 2. Return to your client panel and you should have the option to review database information, from there each database you have for this website should come with a phpmyadmin button, click on that to access phpmyadmin.

Step 3. Once you’re in phpmyadmin, locate the database your website’s using and click it’s name.

Step 4. Once it shows the database and lists the tables, click on the Export tab.
image

Step 5. Select as follows:
image
image

Step 6. Click on Export to download the complete SQL file of your database, it’s all the way at the bottom.
image

Step 7. On your computer taskbar, click on W tray icon image > PHPMyAdmin
image

Step 8. Login with the database password you’ve set. The one I’ve told you to write down, and warned about losing stuff before.
Step 9. Import your database by going to “Import”
image

Step 10. Upload your previously downloaded SQL file here.

Step 11. Once BOTH the database import and file copying is done, click on the W tray icon > PHP version, and select 7.4. This will turn off the existing wampserver, W tray icon turns cycles through the colors and becomes green again after all console windows come and go, let it do it’s thing.
image

Step 12. Once the green W appears, it will either run the server page or the local application. If your application does not connect to the database, change any configuration files to match your logins on the paper I’ve been talking about. Alternatively you can create a new user in your local phpmyadmin to match your application settings.

Step 13. Once that’s all done, update your application as per the developers’ instructions. During any stage when the developer asks you to switch to PHP 8, use the W tray to change PHP versions.

4. Upload everything back to InfinityFree

Step 1. Export your database, this time from your local phpmyadmin, the same process applies from big Step 3, with the local database, same selections and download a new SQL file.
Step 2. Once you’re in phpmyadmin, locate the local database and click it’s name. (If you’re a fresher/new install, there should only be one).
Step 3. Once it shows the database and lists the tables, click on the Export tab.
image
Step 4. Select as follows:
image
image
Step 5. Click on Export to download the complete SQL file of your database, it’s all the way at the bottom.
image
Step 6. Login to the InfinityFree and using the client panel and access phpmyadmin.
Step 7. Import your database tables by going to “Import”
image
Step 8. Upload your previously downloaded SQL file here.


Step 9. Depending on your application, change your database access info in the configuration file before moving on to the next step.
Step 10. Back in FileZilla, since you should have everything untouched, simply select everything from left hand side and click upload, and choose to overwrite everything up there.

You can export the data as a download, and then import it to the local database following the above guide.

It’s recommended to use WAMP instead of XAMPP due to many bugs from my experience.

In addition, if your line contains comment characters, it may cause issues similar to this:

Anyways, feel free to share us more info so we can better help with your case.

Cheers!

6 Likes