Jump to content
Latest News: (loading..)
KarenZoo

Broke my config.php file

Recommended Posts

I edited my config.php file under includes, now my store is broken. I can see my items in the catalog, but the catalog does not exist. , and people cannot use the link that previously worked to buy the product! what should my link be? Do I have to start over? The previous orders and customers are still there ....

 

Share this post


Link to post
Share on other sites

There is no need to start over right from scratch if its only one file that you messed up.

I take it you havent got a known good backup copy, which would be the ideal way to go about repairing it. Your other option is to ask your hosts whether they keep backups. Most of the better ones do. Your last hope is that you post the contents of the file here without the database info at the bottom, and hope that someone can see where you have gone wrong.


REMEMBER BACKUP, BACKUP AND BACKUP

Before installing the official version of oscommerce first look at a responsive version here

It's very easy to over complicate what are simple things in life

Share this post


Link to post
Share on other sites
Posted (edited)

What did you change inside that file? And if you don't mind me asking, why did you edit that file?
 

Edited by Tsimi

Share this post


Link to post
Share on other sites

@KarenZoo

(assuming you still have the source code for the version of osCommerce you are running, and complete access to your server)

0) BACK UP EVERYTHING ON YOUR SITE, BOTH CODE AND DATABASE.

1) osCommerce is typically installed in a sub-directory called /catalog/. On your server, create another sub-directory (lets call it /catalog-2/) along side your existing /catalog/ sub-directory, like this:
 

root -+-- /catalog/
      |
      +-- /catalog-2/

2) Create a new blank database on your server, making note of the database name, user name, and user password

3) Now, install your version of osCommerce in the /catalog-2/ sub-directory, using your new database. Examine the new /catalog-2/includes/configure.php file, and compare it to your original /catalog/includes/configure.php file. The new file will tell you what you need in the original file (other than the sub-directory name, which has changed to  /catalog-2/, instead of /catalog/).

HTH

Malcolm

 

 


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get the latest community-supported responsive "Edge" release here

Share this post


Link to post
Share on other sites

These days most hosting company's do nightly backups of the server! Simply ask then to restore from last working back up (ie just before you edited your file)

Or ask them to give you zip file of your back up so you can extract the good configure file and replace.


 

Share this post


Link to post
Share on other sites

Never seen a bad edit of config.php do that as it just defines but to my knowledge does not rewrite anything! Any mistake in config.php can normally just be rectified by removing edits.

I have seen problems like that before when errors have been made editing configuration.php as it re writes to the database which can brake a store.

If that is the case then simply removing edits and restoring database from backup should fix things.


 

Share this post


Link to post
Share on other sites

Thanks everyone. I ended up just starting a new store with the newer version of the osCommerce software, now will just need to migrate the existing customers to the newer (better) version of the store. 

Share this post


Link to post
Share on other sites

@KarenZoo

30 minutes ago, KarenZoo said:

Thanks everyone. I ended up just starting a new store with the newer version of the osCommerce software, now will just need to migrate the existing customers to the newer (better) version of the store. 

I *hope* you are now using the Edge community version of osC (link in my signature below).


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get the latest community-supported responsive "Edge" release here

Share this post


Link to post
Share on other sites
4 minutes ago, ArtcoInc said:

@KarenZoo

I *hope* you are now using the Edge community version of osC (link in my signature below).

How do I upgrade to "edge" without breaking the existing (funtional) store?

Share this post


Link to post
Share on other sites

@KarenZoo

You said you are starting a new store. How far have you progressed with your new store?

Unfortunately, upgrading to Edge is not an in-place upgrade. You install Edge in a separate directory, copy your existing data over to Edge, install any add-ons you want, and apply any style changes you want.

Then again, you have to do all of these when you start a new store, regardless of which version of osC you use.

Malcolm


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get the latest community-supported responsive "Edge" release here

Share this post


Link to post
Share on other sites

Untill you say what your original store is based on and what state its in its hard to say how easy or hard it will be to migrate to Edge. You will have to migrate as there is no upgrade path.

All of this is mute until we know what version your current store is and if you have a database backup or have recoverd the broken store.


 

Share this post


Link to post
Share on other sites
Quote

All of this is mute until we know what version your current store is and if you have a database backup or have recoverd the broken store.

See the link in my signature file regarding the information that is helpful to those trying to provide support.

Dan

Share this post


Link to post
Share on other sites
Posted (edited)

My current store is osCommerce version r 2.3.4.1. It is functional, and I am looking to import the customer data - accounts, passwords, and reviews - into it. are those all located in the /backups directory from the broken store?

Sorry I seem so clueless, I am used to good old html programming.

Edited by KarenZoo
adding info

Share this post


Link to post
Share on other sites
Posted (edited)

Ok 2.3.4.1 should be the latest Edge version if you down loaded it from the github

The link provided above by Dan is what you should have used and is worth checking to make sure you do indeed have the correct version.

https://github.com/gburton/osCommerce-234-bootstrap/archive/master.zip

If it is the correct version then migrating is straight forward.

Assuming you have installed on the same server but under a different directory.

First get Edge set up with the stock database. Then check if you have any add-ons in your current store! If you do then see if they are available in Edge and if they are install them. This is important for any add-on that changes the database.

So now you have Edge running as you need with the add-on’s you need, Good.

Ok now to migrate data! Do nothing until you backup your current store and its database.

Oh and now backup your current store and database! No really back it up.

OK with that done now Back up your new Edge install and database, Yes I know there is nothing in it but trust me you need to back it up as errors do happen in migration and its much easier to restore that start over again.

The Data

Now there are several ways of doing this, and many experts in this forum that can do it for you in the commercial support section, so its up too you to decide how you want to proceed.

I have used most methods and find that simply working with phpadmin is the simplest way to do this. It sounds scary but is not if you have some coding or file editing skill.

Need to do this in stages so I will give you a quick overview and then you can ask for more details on areas you need.

1) first make a copy of your old database and only use this copy for any further work.

2) Decide which bits of the database you want to transfer! Customers, orders ect.

Its important to pick only the ones you actually need as it will reduce the work required.

 

3) in the new store use phpAdmin to look at a single part of the database you have decided to move ie Customers, Look at the differences between the tables and edit the copy of your old database to match the new database. Repeat this for each table you wish to migrate, ( there are not that many changes to make )

The advantage of doing it this way is any changes you make will be automatically applied to the data when you update the table in phpAdmin.

Depending on the old database you may have to drop some parts of the old table to match the new database.

OK this is the hard bit done.

So you have one by one made the tables you need look the same as the tables in the new store database.

4) Using phpadmn export only the tables you have edited (this is very important) used SQL and all the default settings to do the export.

5) On your new store go to phpadmin and empty only the tables you have edited in the old database and wish to import.

6) Then import the edited tables you saved as export into the new database. If all has gone as it should you should now have migrated all the data you selected over to the new store.

7) You then need to manually copy over images and any other stuff you need.

Ok if it dose not work then its a case of checking each step one by one to see what went wrong! 99% of the time it will be in incorrect editing of original tables, just take your time and do it slowly.

This is just an overview, please ask for more detail on any step your not sure of.

 

Edited by justcatering

 

Share this post


Link to post
Share on other sites

@KarenZoo

If all of the steps to install Edge and migrate your data over seems overwhelming,  you can post in the Commercial Support area of this forum to hire someone to do it for you ...

https://forums.oscommerce.com/forum/79-commercial-support-inquiries/

Malcolm


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get the latest community-supported responsive "Edge" release here

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×