Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How To Upload partly configured shop from local WAMP to online Hosted Account?


satyr37

Recommended Posts

Posted

Hi,

 

I have a partly configured shop installed on my local windows xampp server. I have done languages, lots of additional categories and graphics, currency, icons, Auspost plug-in, etc. It still requires SSL installation, gateway installation, and product populating.

 

The shop currently functions as it is at http://localhost/catalog and it is configured to run at that IP (127.0.0.1).

 

Before I continue developing it I would now like to upload it to my domain which is hosted on a Virtual Private Server online. So obviously my domains URL and IP will have to be entered into the shops files? How do I edit my shops URL's, IP's, and new file locations once I have uploaded the files?

 

Also, which files do I upload? I suspect I upload the entire catalog directory and it's contents? Is that correct? Which other files must I upload? For example, which of the local MySQL files must I also upload, and where do they go on my online directories?

 

What other files must I upload?

 

Further information. From my cPanel I have access to Fantastico, osCommerce, and Buysafe. I can upload using filezilla.

 

Thank you.

I'm fluent in gibberish. I've been reading gibberish since 1982.

Posted

The only files that need to be changed are the same if you were just switching servers or hosts.. that would be the configure files that are both on the admin and catalog includes directory.

 

You have to also give it the database address too. You basically upload the ENTIRE database and the entire catalog folder to the host.

 

I might think that if you have the ability to do a one click install of a stock oscommerce, install that. That will create the basis for the DB, then upload YOUR files and a "backup" of your database OVER the existing.

 

This is just my guess, as i have not ever done that. OTherwise, you can create a new database with the same name of your database on your local in phpmyadmin

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Posted

Actually it's just a tiny bit different uploading a wamp or xampp version than it is switching hosts but it's very similar.

 

When you switch hosts, you need to alter the includes/configure.php to match the new settings

 

When developing locally, you leave the includes/configure.php set for the server settings all the time. There is an includes/local/configure.php with settings for the localhost. When you upload to the server, upload absolutely everything EXCEPT the includes/local/configure.php

 

The first time you do it, you should upload that file too so you get to see the eror that gets generated. Then, next time when you accidently upload that file you'll see the error and hopefully remember that it is that file that causes it. It drove me crazy the first time I did that :)

Posted
The only files that need to be changed are the same if you were just switching servers or hosts.. that would be the configure files that are both on the admin and catalog includes directory.

 

Thanks for this Lindsay.

 

I could not find a configure.php in the admin folder on my local xampp setup. But I did find the configure.php file in the /includes folder and did modify all paths in that files online copy.

 

You have to also give it the database address too. You basically upload the ENTIRE database and the entire catalog folder to the host.

 

I didn't upload the dBase as I wasn't sure where it was on my xampp setup, nor am I sure where it goes on the hosted server.

 

On my xampp setup there is a mysql folder which is outside of the htdocs folder. If the entire mysql folder would have to be uploaded then I assume it would go in the root folder, equal and alongside with public_html folder? Furthermore, I suspect some mysql.ini(?) file would have to be edited to reflect the folders new location?

 

Instead of uploading the mysql folder I went into my cPanel and using MySQLdatabases I created a new database. I tried to give it the same name as the local dBase, but it prefixed it with my hosted username. So I then went back into the configure.php file and modified the dBase name, dBase username, and paths.

 

But when I tried to go to www.domain.com/catalog I got the following error message:

 

"Warning: mysql_connect() [function.mysql-connect]: Host 'host.domain.com' is not allowed to connect to this MySQL server in /home/user/public_html/catalog/includes/functions/database.php on line 19

Unable to connect to database server!" bold typefaces have been altered for privacy.

 

I might think that if you have the ability to do a one click install of a stock oscommerce, install that. That will create the basis for the DB, then upload YOUR files and a "backup" of your database OVER the existing.

 

This is just my guess, as i have not ever done that. OTherwise, you can create a new database with the same name of your database on your local in phpmyadmin

 

Ok, I think installing oscommerce using fantastico, then uploading local files over them [selectively] might be the way to go. Especially if I can't get the dBase to talk to the dBase server?

 

One other anomaly, and that is when I go into phpMyAdmin I see server as localhost. How or where do I change that?

 

Thank you again.

I'm fluent in gibberish. I've been reading gibberish since 1982.

Posted

Hi php_Guy,

 

[...]

When developing locally, you leave the includes/configure.php set for the server settings all the time. There is an includes/local/configure.php with settings for the localhost. When you upload to the server, upload absolutely everything EXCEPT the includes/local/configure.php

 

Actually I couldn't find any php files in the includes/local/ folder except a readme file which stated pretty much what you said. But there was no configure.php or any other file in that folder in my xampp setup. And obviously no similar file in the uploaded version either.

 

I did find a configure.php file in the /includes/ folder, and I did attempt to modify paths, filenames, usernames in that file.

 

The first time you do it, you should upload that file too so you get to see the eror that gets generated. Then, next time when you accidently upload that file you'll see the error and hopefully remember that it is that file that causes it. It drove me crazy the first time I did that :)

 

Well the error message I obtained before editing the configure.php file was;

 

"Warning: mysql_connect() [function.mysql-connect]: Host 'host.domain.com' is not allowed to connect to this MySQL server in /home/user/public_html/catalog/includes/functions/database.php on line 19

Unable to connect to database server!"

 

and the error message after modifying the configure.php file was;

 

"Warning: mysql_connect() [function.mysql-connect]: Host 'host.domain.com' is not allowed to connect to this MySQL server in /home/user/public_html/catalog/includes/functions/database.php on line 19

Unable to connect to database server!"

 

Also, PhpMyAdmin showed the server as localhost, which I think is wrong? But I couldn'f figure out how to change that?

 

I may have to first setup MySql for the hosted online account, then install osCommerce using Fantastico, then upload files from local xampp setup. In Which case, if I leave out the configure.php file, it should work I assume? Or do other files within /catalog also need modifying. If there is too much to modify I may as well start from scratch.

 

Thank you for your suggestions.

I'm fluent in gibberish. I've been reading gibberish since 1982.

Posted
Actually I couldn't find any php files in the includes/local/ folder except a readme file which stated pretty much what you said. But there was no configure.php or any other file in that folder in my xampp setup. And obviously no similar file in the uploaded version either.

 

If you didn't find one it is because you didn't make one :)

 

The standard way to set it up is to leave your includes/configure.php configured for the actual server settings and create an includes/local/configure.php with localhost settings. If osc detects the local version it uses it instead of the "real" one. That way you don't have to continually edit the one in includes.

 

As to the error... when you install osc on the server it creates the includes/configure.php based on the settings you used during the install. Oh, you did run the install at least once on the server didn't you? Or are you just uploading the files? That won't work. You need to run the install once to create the tables and populate them.

 

Assuming you did that, it's just a matter of giving it the correct name for the database server, database, database user and password. It's usually the name of the database server that messes people up. You should be able to find it in cpanel somewhere. Others, check with your host.

Posted
If you didn't find one it is because you didn't make one :)

 

Ok, that'd be because I didn't know I had to make one. I assumed it would be auto-generated by the setup/installation? Obviously not! :)

 

The standard way to set it up is to leave your includes/configure.php configured for the actual server settings and create an includes/local/configure.php with localhost settings. If osc detects the local version it uses it instead of the "real" one. That way you don't have to continually edit the one in includes.

 

Will do. Am still working on incorporating/trialling some scripts, so I can try it out on the local version before uploading it to the hosted server.

 

As to the error... when you install osc on the server it creates the includes/configure.php based on the settings you used during the install. Oh, you did run the install at least once on the server didn't you? Or are you just uploading the files? That won't work. You need to run the install once to create the tables and populate them.

 

Now you tell me lol! :)

 

Well, I did install first after reading this, then patched the files from my local server. Edited the /includes/configure.php according to the new dBase name, user, p/w. But not everything was updated. That is, the modified box labels, and text within them did transfer over, but the categories weren't updated. Even though the files uploaded. But that was easy to redo when I had both sides admin up and comparable.

 

Assuming you did that, it's just a matter of giving it the correct name for the database server, database, database user and password. It's usually the name of the database server that messes people up. You should be able to find it in cpanel somewhere. Others, check with your host.

 

Yep, that's what I did. After reading this :)

 

Thanks! :)

I'm fluent in gibberish. I've been reading gibberish since 1982.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...