Jump to content

Recommended Posts

we have a php site that was recently upgraded to version 4,1,22. the script is a points script. the site is for a online gaming guild. they do spawns and the participants get points for being there. Each spawn is worth different point values. The script is suppose to apply that many points to each participant and total them up. for some reason it is not working anymore. I have the script zipped and rar'ed if anyone is willing to look at it. Thank you in advance.

  • 3 weeks later...

We have search for the guy that wrote the original script and have found out that he no longer is scripting that we know of.  I dont know about scripting php to attempt to repair it and make it work again. If anyone is interested in looking at it I can provide the files to them. thank You once again

Having the previous version files would help as well. If you just upgraded, there must be some current development occurring. Can you provide a link to the author's site?

 

There is a general lack of consistency in the code and some things like the following that show a lack of knowledge -

 

$query = "SELECT * FROM `spawns`" or die("Could not connect to database");

 

The only thing that stands out in the posted code is that some short open tags are being used. One would imagine that the previous version used these as well, but you never know, someone could have went through and changed a number of full <?php tags to short ones <?

 

If you could also provide information on what, if anything, works and what specifically does not work, it would help. Just stating that it does not work is a fairly broad statement that could mean anything.

The code is also dependent on register globals being on, but there is a mix of code that properly references $_POST/$_GET variables and code that references the corresponding register global variable. Again, it is possible that the previous version did not have any references dependent on register globals and someone went through the code modifying it so that the latest version does, which could be the reason it no longer works.

 

Some of the mysql function calls have error checking, but most don't, so if the database table names/structure changed due to the upgrade and the queries are now failing, you won't know it.

 

There are also several double-mysql_query's where the second one incorrectly uses the result resource of the first one as the query string, which is incorrect and will always fail, but luckily the results of the second query are never referenced.

 

There are only a very few unhelpful comments in the code to help anyone looking at it to figure out what any portion of it should be doing.

 

Short answer, the code is really a joke. If a version of it ever worked, consider yourself lucky. As you found out, the current version does not work, but because it is so poorly and inconsistently written, it does not contain any logic to tell you what it is or is not doing.

 

To do anything useful with the code, it would take comparing it with the previous "working" version. Someone here might be willing to compare the two versions and figure out why the latest is not working, but your best bet would be to reinstall to the previous version until the problems with the latest version are found and fixed.

This thread is more than a year old. Please don't revive it unless you have something important to add.

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