MrTomahawk Posted March 8, 2010 Posted March 8, 2010 I have corrupted my index.php by pasting html code in it. (what an idiot!) I have a fresh template index.php I have downloaded. Can I replace the old corupted one with the blank new one without getting this error: Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/hengis/public_html/includes/functions/database.php:12) in /home/hengis/public_html/includes/functions/database.php on line 24 Or is there a fix for this error? My version is OScommerce 2.2ms2 and I have downloaded a new blank template index.php of the same version. Any help would be great as really scratching my head over this. Tom
rescuestat Posted March 8, 2010 Posted March 8, 2010 I have corrupted my index.php by pasting html code in it. (what an idiot!) I have a fresh template index.php I have downloaded. Can I replace the old corupted one with the blank new one without getting this error: Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/hengis/public_html/includes/functions/database.php:12) in /home/hengis/public_html/includes/functions/database.php on line 24 Or is there a fix for this error? My version is OScommerce 2.2ms2 and I have downloaded a new blank template index.php of the same version. Any help would be great as really scratching my head over this. Tom Hi Tom, That error quite possibly is not coming from your index.php page. What's happening is that something is attempting to call your includes/application_top.php file more than once. Replacing your index.php page may or may not resolve the problem. However, if you haven't changed anything(or installed any contributions that have changed it) then YES you can replace it with a fresh copy. Also, you may want to consider looking into upgrading to osC version RC2.2 , 2.2ms2 has issues with newer versions of PHP and if your host ever upgrades without telling you(and they often do) you may be forced to do an upgrading anyway. And as always....BACKUP before changing anything. Best of luck, and feel free to ask questions/PM if you need help. Frank
MrTomahawk Posted March 9, 2010 Author Posted March 9, 2010 Hi Tom, That error quite possibly is not coming from your index.php page. What's happening is that something is attempting to call your includes/application_top.php file more than once. Replacing your index.php page may or may not resolve the problem. However, if you haven't changed anything(or installed any contributions that have changed it) then YES you can replace it with a fresh copy. Also, you may want to consider looking into upgrading to osc rc2.2, 2.2ms2 has issues with newer versions of PHP and if your host ever upgrades without telling you(and they often do) you may be forced to do an upgrading anyway. And as always....BACKUP before changing anything. Best of luck, and feel free to ask questions/PM if you need help. Frank Thank you for your reply, You are the first person who has really just got straight to the point and said something that makes sense! Brilliant! Can I update to osC rc2.2 without loosing my previous settings and database? will the update lay over the existing store? I realise there will be some conflicts that I will have to sort out. I have backed up my whole www file which is everything I need I think. I have never done this before and am scared of ruining everything! Is there a walkthrough anywhere on upgrading to rc2.2 (I have looked at the official upgrade text and it doesn't help) Any help you can give me would be greatly appriciated. Thank you again, Tom
rescuestat Posted March 9, 2010 Posted March 9, 2010 Thank you for your reply, You are the first person who has really just got straight to the point and said something that makes sense! Brilliant! Can I update to osC rc2.2 without loosing my previous settings and database? will the update lay over the existing store? I realise there will be some conflicts that I will have to sort out. I have backed up my whole www file which is everything I need I think. I have never done this before and am scared of ruining everything! Is there a walkthrough anywhere on upgrading to rc2.2 (I have looked at the official upgrade text and it doesn't help) Any help you can give me would be greatly appriciated. Thank you again, Tom Hello Tom, Sorry about the delay, it's been a busy day here. There are some slight differences in the structure of the MySQL database(some field types/sizes are slightly different) however the answer is YES, you can take your existing MS2.2 database and use it with the RC2.2 website. I just recently was forced to upgrade from MS2.2 to RC2.2 when our host decided to upgrade both out MySQL and PHP. Something you may want to look into if you decide to upgrade to RC2.2, an individual here on the forums has written some very good autoinstallers for a number of popular oscommerce contributions, they work great and save a lot of time versus doing it manually. If you do a search in the contribs area for "autoinstaller' and look for the name of the author as Pektsekye, they work great. Now he did make his auntoinstallation routine public so I'm sure other people are also using it, but I've only ever used his and they work wonderfully. Just make sure you use the installers on a fresh version of RC2.2 before you make any changes, they'll walk you straight through the procedure and tell you exactly what you need to do. I beleive I used in the neighborhood of 7 of them and they all work flawlessly. If you have any questions, please feel free to ask. You can also email me through my profile page, I don't get on the forums everyday. Best of luck, Frank
MrTomahawk Posted March 9, 2010 Author Posted March 9, 2010 Hello Tom, Sorry about the delay, it's been a busy day here. There are some slight differences in the structure of the MySQL database(some field types/sizes are slightly different) however the answer is YES, you can take your existing MS2.2 database and use it with the RC2.2 website. I just recently was forced to upgrade from MS2.2 to RC2.2 when our host decided to upgrade both out MySQL and PHP. Something you may want to look into if you decide to upgrade to RC2.2, an individual here on the forums has written some very good autoinstallers for a number of popular oscommerce contributions, they work great and save a lot of time versus doing it manually. If you do a search in the contribs area for "autoinstaller' and look for the name of the author as Pektsekye, they work great. Now he did make his auntoinstallation routine public so I'm sure other people are also using it, but I've only ever used his and they work wonderfully. Just make sure you use the installers on a fresh version of RC2.2 before you make any changes, they'll walk you straight through the procedure and tell you exactly what you need to do. I beleive I used in the neighborhood of 7 of them and they all work flawlessly. If you have any questions, please feel free to ask. You can also email me through my profile page, I don't get on the forums everyday. Best of luck, Frank Frank, Thankyou for the reply, you are a life saver!!! seriously, thank you! I am quite a competant PC user but have never used php or osc before and I needed someone to point me in the right direction on how to fix this issue. What you have recommended sounds like the thing to do. I have backed up everything and am going to try and upgrade to rc2.2 and use the auto installers you have recommended (which look great)tomorrow afternoon. I will keep you posted, you may get an email or two tomorrow as I progress through the install. Thank you again and wish me luck with a smooth upgrade. Cheers, Tom
rescuestat Posted March 10, 2010 Posted March 10, 2010 Hello Tom, I was just looking over your previous posts and wanted to clarify something just in case. RC2.2 should not be overlayed over your existing MS2.2 version. You should back up your MS2.2 version(just in case and also for reference if need be), DELETE your MS2.2 version, and then install the RC2.2 The new RC2.2 install will overwrite everything that it needs to, but you may end up with alot of orphan files if you don't remove the MS2.2 version first. Best of luck, Frank
MrTomahawk Posted March 10, 2010 Author Posted March 10, 2010 Hello Tom, I was just looking over your previous posts and wanted to clarify something just in case. RC2.2 should not be overlayed over your existing MS2.2 version. You should back up your MS2.2 version(just in case and also for reference if need be), DELETE your MS2.2 version, and then install the RC2.2 The new RC2.2 install will overwrite everything that it needs to, but you may end up with alot of orphan files if you don't remove the MS2.2 version first. Best of luck, Frank Frank, Ok, I understand. I will treat it as a fresh install of rc2.2 and make sure I have removed ms2.2 before progressing. Just out of curiosity... If you go to my site www.hoganmusic.co.uk you will see that all the links on the right hand side of the page all lead to the front page, when they should go to there relevant catagories. Before I commit to this upgrade process, do you know of a way to fix this? If fixing this issue is more of a job than the upgrade then don't worry, but I just had to ask as this is the reason I am doning all of this in the first place. Thanks again Tom
rescuestat Posted March 10, 2010 Posted March 10, 2010 Frank, Ok, I understand. I will treat it as a fresh install of rc2.2 and make sure I have removed ms2.2 before progressing. Just out of curiosity... If you go to my site www.hoganmusic.co.uk you will see that all the links on the right hand side of the page all lead to the front page, when they should go to there relevant catagories. Before I commit to this upgrade process, do you know of a way to fix this? If fixing this issue is more of a job than the upgrade then don't worry, but I just had to ask as this is the reason I am doning all of this in the first place. Thanks again Tom Hello Tom, Just looking at the page quickly, I noticed that you had the Ultimate SEO(I believe) contribution installed. Not sure if you have replaced the index.php page yet, but try resetting the SEO URL cache...this might help. Check the email I sent you for other things. Best of luck, Frank
MrTomahawk Posted March 12, 2010 Author Posted March 12, 2010 Frank....... you legend!!!! I have managed to upload the blank index.php's and then reset the SEO URL as you suggested and now it works! perfect. I know I need to update to rca2.2 but I think if i spend some time getting used to .php by fixing up the site I have, wait till 3.0 is out and build my new site from scratch in that format. Thank you for all your help and wisdom. I'm sure this is not the last time we will speak as I'm bound to be a prat and mess something up in the future. Take it easy Tom :thumbsup:
MrTomahawk Posted March 12, 2010 Author Posted March 12, 2010 Oh and people.... .php is not html!! lol!
rescuestat Posted March 12, 2010 Posted March 12, 2010 Hello Tom, Great !!! I'm glad it turned out to be a quick fix. If there's any thing I can do help feel free to ask. Frank
Recommended Posts
Archived
This topic is now archived and is closed to further replies.