jsi Posted May 28, 2008 Share Posted May 28, 2008 I am currently getting this fatal error when I try to add a manufacturer. Fatal error: Uncaught exception 'Exception' with message 'Database query error' in /home/mysite/public_html/admin/includes/classes/upload.php:31 Stack trace: #0 /home/mysite/public_html/admin/manufacturers.php(41): upload->upload('manufacturers_i...', '/home/mysite/...') #1 {main} thrown in /home/mysite/public_html/admin/includes/classes/upload.php on line 31 My host currenlty upgraded from PHP4 to PHP5 and MySQL from 4.0 to 4.1 At first when I tried to login, I was getting an error on line 31. This was the original line 31: $this = null; So I changed that to this: throw new Exception('Database query error'); With that change I was able to login to admin but now I have another fatal error when trying to add a manufacturer. Please help! How can I fix this to add items? In this case it wont let me add a manufacturer. What else can I expect with this upgrade that I didn't ask for? Thanx. mmmmmmmmmmmm. Doughnuts . . . haha. i said nuts. Link to comment Share on other sites More sharing options...
jsi Posted May 28, 2008 Author Share Posted May 28, 2008 Can anyone shine a light this way? At least some hints to help me search on google? Ive searched all day with no good results. Thank you. mmmmmmmmmmmm. Doughnuts . . . haha. i said nuts. Link to comment Share on other sites More sharing options...
spooks Posted May 28, 2008 Share Posted May 28, 2008 You don`t say what versions your using or what mods you`ve done? Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
arietis Posted May 29, 2008 Share Posted May 29, 2008 the code $this = null; was valid in php 4 but not in php5. that line will be executed and it's a normal condition to do so. but now it's throwing an exception instead. i believe the normal resolution for this is to just remove the code...comment it out or something. Link to comment Share on other sites More sharing options...
jsi Posted May 29, 2008 Author Share Posted May 29, 2008 the code $this = null; was valid in php 4 but not in php5. that line will be executed and it's a normal condition to do so. but now it's throwing an exception instead. i believe the normal resolution for this is to just remove the code...comment it out or something. Thanx for the replies. I tried that and that worked but too many of my other mods were buggy so I downgraded back to PHP4. Im thinking about upgrading on a test server first to work on bugs then implement on live site when all bugs have been worked out. Thanx. mmmmmmmmmmmm. Doughnuts . . . haha. i said nuts. Link to comment Share on other sites More sharing options...
arietis Posted May 30, 2008 Share Posted May 30, 2008 Thanx for the replies. I tried that and that worked but too many of my other mods were buggy so I downgraded back to PHP4. Im thinking about upgrading on a test server first to work on bugs then implement on live site when all bugs have been worked out. there is a change list included with the newer releases. among other things, the list details what changes were made to each file and for what reasons. i'm pretty sure the php4 to php5 changes are noted as such. that'd be a good starting point for you. especially if you have a lot of mods and don't want to have to start over. but do keep this in mind: the change list only includes the fixes that are in the standard osc code. so, taking this as an example, and removing the $this = null code. if this code is also used in non-osc code (from a contribution) it won't tell you that. what this means is, when looking at the list of changes, you will also need to look through your own code to see if a similar change needs to be done. use the global search feature in your text editor to search through all of the code. bottom line: don't take the change list as the only changes that your heavily-modified site requires. and it's *always* a good idea to work on a test server, rather than your live shop. definitely a step in the right direction. Link to comment Share on other sites More sharing options...
jsi Posted May 30, 2008 Author Share Posted May 30, 2008 there is a change list included with the newer releases. among other things, the list details what changes were made to each file and for what reasons. i'm pretty sure the php4 to php5 changes are noted as such. that'd be a good starting point for you. especially if you have a lot of mods and don't want to have to start over. but do keep this in mind: the change list only includes the fixes that are in the standard osc code. so, taking this as an example, and removing the $this = null code. if this code is also used in non-osc code (from a contribution) it won't tell you that. what this means is, when looking at the list of changes, you will also need to look through your own code to see if a similar change needs to be done. use the global search feature in your text editor to search through all of the code. bottom line: don't take the change list as the only changes that your heavily-modified site requires. and it's *always* a good idea to work on a test server, rather than your live shop. definitely a step in the right direction. That is a most useful reply. Thank you. However, I cannot seem to find this list anywhere. Is it in a knowledgebase or contribution? mmmmmmmmmmmm. Doughnuts . . . haha. i said nuts. Link to comment Share on other sites More sharing options...
arietis Posted May 30, 2008 Share Posted May 30, 2008 That is a most useful reply. Thank you. However, I cannot seem to find this list anywhere. Is it in a knowledgebase or contribution? if you download the latest source code, it's in the .zip file. the file called chagelog. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.