Jump to content

Update script to PHP7.2

Recommended Posts


I am trying to install a script to my home page. It wont work cuas the script are a bit old and it does not suite the PHP 7.  I have no knowledge in how to change the script.

I am now asking if there is anyone in here that would like to spare a little time to try and help me out? I would be very greatfull.
If It would make it easier for the one that would like to help me, I can send all log in info to the ftp server and to the database if needed..

This is the error I get when I visit http://bhdstats.com/install.php :

Fatal error: Uncaught Error: Call to undefined function mysql_pconnect() in /customers/a/f/2/bhdstats.com/httpd.www/common.php:41 Stack trace: #0 /customers/a/f/2/bhdstats.com/httpd.www/install.php(34): DBConnect() #1 {main} thrown in /customers/a/f/2/bhdstats.com/httpd.www/common.php on line 41 

About the scrip:

The script is called Neos_Chronos and is a stats and status script for a game server that I host. It has worked fine in the old days on older PHP-versions but as I typed above, it wont work on the newer PHP-versions.

I would be very greatfull for all help I can get.

Link to the webpage: bhdstats.com
Download the script:




Edited by Molle
Wrong spelling

Share this post

Link to post
Share on other sites

the php mysql_ extension has been removed from php. however, if the script is old enough to still be using the mysql_ extension, it is probably using other removed features (the error you got is just the first of many.) it would require reviewing the entire script and rewriting everything that's been removed and to also add security for database queries (php's attempt at protecting against sql special characters in external data from breaking sql queries was also removed.)

Share this post

Link to post
Share on other sites
43 minutes ago, Molle said:

So, what you are saying is, throw this php-script in the trash?

didn't state that. it is possible to convert old code to use a new database extension and to manually modify any sql query that has data being directly put into it to be a prepared query (the query function needs to accept a second optional array of input data and either just execute the query if there is no input data or prepare and execute the query if there is.) this is simpler if the code is using a database abstraction layer, which the code has (some user written functions), but isn't consistently using everywhere, so, it would first require that all database interactions be rewritten to use the existing functions.

Share this post

Link to post
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.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.