You are an unregistered user, you can register here
Navigation

Information

Site

Donations
If you wish to make a donation you can by clicking the image below.


Site Sponsor

BeyondUnreal News

 
Go Back   The Unreal Admins Page > Forums > Hosted Forums > UTStats > General Chat

Reply
Thread Tools Display Modes
  #1  
Unread 25th November, 2017, 09:27 PM
NightWing NightWing is offline
Dominating
 
Join Date: Jun 2011
Posts: 124
Default php7

i dont know all too much about php and mysql other than how to get a forum up and running, but I recently upgrading my forum to php7 which i guess makes it so u can no longer use mysql, u have to use mysqli (and a few other choices). The UTstats config.php still uses regular mysql by default, so is there a work around or will i have to reset my forum back/wait for a new version of utstats?
Reply With Quote
  #2  
Unread 20th December, 2017, 01:50 AM
SoNY_scarface SoNY_scarface is offline
Holy Shit!!
 
Join Date: Mar 2007
Posts: 1,726
Default

Best to use php5 NW
__________________




Reply With Quote
  #3  
Unread 9th January, 2018, 11:08 AM
NightWing NightWing is offline
Dominating
 
Join Date: Jun 2011
Posts: 124
Default

Unfortunately it was not my decision to upgrade to php 7, it was the company which we host our forums from, however theyve always been great with customer support and after a few messages they gave me a way to fix this issue. So for those of u who have this same issue they made this post for us: https://forums.nfoservers.com/viewto...p?f=19&t=14767

---------------------------------------------------------------------------------
In case the link ever goes down, it says:

If you're receiving the following error:


"Uncaught Error: Call to undefined function mysql_connect() in /usr/www/identifier/public/forums/functions/db.php:324"


...this is due to the deprecated mysql extension no longer being included, breaking all "mysql_" functions. Ideally, you would want to switch to one of the newer extensions, like mysqli or PDO, but the old functionality can be corrected with a shim that recreates the functions.

Download the shim here: https://raw.githubusercontent.com/ds.../lib/mysql.php
Upload the mysql.php file to your webhosting. Place it in the includes folder for your website, or a directory where typical config files can be found, if available
Locate a common file that is that is included everywhere in your software. Often this file is called "config.php" or "Settings.php" or similar. Edit that file to add this before other PHP statements:


"include_once('./mysql.php');"

This assumes the shim is in the same directory as the config file. If it's one directory up, you'll use '../mysql.php' and if it's one directory down, you'll use './folder_name/mysql.php'.
If you do not have a common config file, the line above will need to be included in all files using MySQL.
--------------------------------------------------

The link to the shim doesnt actually bring u to a download, u just copy and paste the coding into a blank file and call it "mysql.php"

Last edited by NightWing : 9th January, 2018 at 11:10 AM.
Reply With Quote
  #4  
Unread 9th January, 2018, 12:38 PM
NightWing NightWing is offline
Dominating
 
Join Date: Jun 2011
Posts: 124
Default

this was enough to get information to show and to remove any errors, but the importer isnt working, just shows this and then stops:

Connecting to server: *IP: Port*
Connected, now logging in...
Logged in!
Setting passive mode

Ive tried turning passive mode to false, but it still doesnt go any further, that last message just changes so that u know its not passive mode. Ill keep working on it.
Reply With Quote
  #5  
Unread 11th January, 2018, 09:11 AM
NightWing NightWing is offline
Dominating
 
Join Date: Jun 2011
Posts: 124
Default

so it appears to be getting to the files, its just not bringing them home. This happens for both "sockets" and "pure" ftp type's, but "php" ftp type actually manages to import the files if they are on the web server (so u can still manually import your stats), however u will see an error of "Unable to connect to server: No FTP support in this php build!" when it talks about trying to get the files automatically from the server. Idk what thats all about cause after creating an info.php script i can tell my web server does indeed have ftp enabled.

Obviously if no one is sure about my questions dont irritate yourself trying to figure it out if u dont want to, im mainly documenting as i go for those of us that got screwed and were forced to upgrade to php 7
Reply With Quote
  #6  
Unread 12th January, 2018, 03:52 PM
{SoP}axewound {SoP}axewound is offline
Killing Spree
 
Join Date: Aug 2006
Posts: 27
Default

PHP 7 doesn't support the mysql extension anymore. The database connectivity for UT Stats will need to be ported to mysqli or PDO.
Reply With Quote
  #7  
Unread 12th January, 2018, 11:56 PM
SoNY_scarface SoNY_scarface is offline
Holy Shit!!
 
Join Date: Mar 2007
Posts: 1,726
Default

The simple solution would be to switch to paid hosting with PHP selector.
__________________




Reply With Quote
  #8  
Unread 13th January, 2018, 04:58 AM
NightWing NightWing is offline
Dominating
 
Join Date: Jun 2011
Posts: 124
Default

ya i know, im just hoping to find a work around. It sounds like the shim was supposed to b just that, just not working to the extent i was hoping for
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:58 PM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

All pages are copyright The Unreal Admins Page.
You may not copy any pages without our express permission.