kodle Posted January 31, 2008 Share Posted January 31, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/88676-php-script-stopped-working-after-update-of-site/ Share on other sites More sharing options...
trq Posted January 31, 2008 Share Posted January 31, 2008 we have a php site that was recently upgraded to version 4,1,22. Why not ask the people who wrote the update what changes where made? Or check the changelog if there is one. Quote Link to comment https://forums.phpfreaks.com/topic/88676-php-script-stopped-working-after-update-of-site/#findComment-454110 Share on other sites More sharing options...
kodle Posted February 18, 2008 Author Share Posted February 18, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/88676-php-script-stopped-working-after-update-of-site/#findComment-469539 Share on other sites More sharing options...
redarrow Posted February 18, 2008 Share Posted February 18, 2008 post the zip were all look go for it........... Quote Link to comment https://forums.phpfreaks.com/topic/88676-php-script-stopped-working-after-update-of-site/#findComment-469569 Share on other sites More sharing options...
kodle Posted February 19, 2008 Author Share Posted February 19, 2008 all files are in the zip thank you Quote Link to comment https://forums.phpfreaks.com/topic/88676-php-script-stopped-working-after-update-of-site/#findComment-470191 Share on other sites More sharing options...
PFMaBiSmAd Posted February 19, 2008 Share Posted February 19, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/88676-php-script-stopped-working-after-update-of-site/#findComment-470212 Share on other sites More sharing options...
PFMaBiSmAd Posted February 19, 2008 Share Posted February 19, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/88676-php-script-stopped-working-after-update-of-site/#findComment-470323 Share on other sites More sharing options...
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.