How to upload a local site to a hosted server ?

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
1/12/2009 4:51:23 PM
Gravatar
Total Posts 11

How to upload a local site to a hosted server ?

Hello there !

Having made a site on my local machine, I have now tried to move it to a hosted server.
I have done it the following way:
- Imported my local MySql database to the hosted MySql server
- Uploaded all the files from my local installation
- Visited the Setup/default.aspx (several times)

Having finally got the connection string right, I got the following error message:

Probing system...
File system permissions ok.
MySQL database connection ok.
database permissions are sufficient to alter schema.
database initial schema already exists.
database core schema needs upgrade.
0 site(s) found.
Running script mojoportal-core - 2.2.1.5 - 00:00:00.1093750

An Error Occurred:Table 'silkeborgpigesdk.mp_SchemaVersion' doesn't exist
Source:MySql.Data
Stack Trace at MySql.Data.MySqlClient.MySqlStream.OpenPacket() at MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId) at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet() at MySql.Data.MySqlClient.MySqlDataReader.NextResult() at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) at MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(MySqlConnection connection, MySqlTransaction transaction, String commandText, MySqlParameter[] commandParameters, Boolean ExternalConn) at MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(String connectionString, String commandText, MySqlParameter[] commandParameters) at mojoPortal.Data.DBPortal.SchemaVersionGetSchemaVersion(Guid applicationId) at mojoPortal.Data.DBPortal.SchemaVersionExists(Guid applicationId) at mojoPortal.Business.DatabaseHelper.UpdateSchemaVersion(Guid applicationId, String applicationName, Int32 major, Int32 minor, Int32 build, Int32 revision) at mojoPortal.Web.UI.Pages.SetupHome.RunUpgradeScripts(Guid applicationId, String applicationName, String pathToScriptFolder, Version versionToStopAt) at mojoPortal.Web.UI.Pages.SetupHome.UpgradeSchema(String applicationName) at mojoPortal.Web.UI.Pages.SetupHome.RunSetup() at mojoPortal.Web.UI.Pages.SetupHome.Page_Load(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

In the CurrentLog.Config the following error is logged:

2009-01-12 23:48:19,386 ERROR mojoPortal.Web.UrlRewriter - MySql.Data.MySqlClient.MySqlException: Table 'silkeborgpigesdk.mp_FriendlyUrls' doesn't exist
at MySql.Data.MySqlClient.MySqlStream.OpenPacket()
at MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId)
at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet()
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(MySqlConnection connection, MySqlTransaction transaction, String commandText, MySqlParameter[] commandParameters, Boolean ExternalConn)
at MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(String connectionString, String commandText, MySqlParameter[] commandParameters)
at mojoPortal.Data.DBFriendlyUrl.GetByUrl(String hostName, String friendlyUrl)
at mojoPortal.Business.FriendlyUrl..ctor(String hostName, String friendlyUrl)
at mojoPortal.Web.UrlRewriter.RewriteUrl(HttpApplication app)
at mojoPortal.Web.UrlRewriter.UrlRewriter_BeginRequest(Object sender, EventArgs e)
2009-01-12 23:48:19,401 ERROR mojoPortal.Web.UrlRewriter - MySql.Data.MySqlClient.MySqlException: Table 'silkeborgpigesdk.mp_FriendlyUrls' doesn't exist
at MySql.Data.MySqlClient.MySqlStream.OpenPacket()
at MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId)
at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet()
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(MySqlConnection connection, MySqlTransaction transaction, String commandText, MySqlParameter[] commandParameters, Boolean ExternalConn)
at MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(String connectionString, String commandText, MySqlParameter[] commandParameters)
at mojoPortal.Data.DBFriendlyUrl.GetByUrl(String hostName, String friendlyUrl)
at mojoPortal.Business.FriendlyUrl..ctor(String hostName, String friendlyUrl)
at mojoPortal.Web.UrlRewriter.RewriteUrl(HttpApplication app)
at mojoPortal.Web.UrlRewriter.UrlRewriter_BeginRequest(Object sender, EventArgs e)
 

What am I doing wrong and how can I make it right ?

I am using MoJo version 2.2.7.6
My local MySql is version 5.0.67. The hosted MySql is version 5.0.51a.

BR

Kurt

1/12/2009 4:53:26 PM
Gravatar
Total Posts 11

Re: How to upload a local site to a hosted server ?

Hi again

Forgot to tell that the 'silkeborgpigesdk.mp_FriendlyUrls' does exist on the hosted MySql.

BR

Kurt

1/12/2009 5:05:49 PM
Gravatar
Total Posts 11

Re: How to upload a local site to a hosted server ?

And again

The 'silkeborgpigesdk.mp_SchemaVersion' table does also exist.

BR

Kurt

 

1/13/2009 7:51:00 AM
Gravatar
Total Posts 18439

Re: How to upload a local site to a hosted server ?

In general I recommend not populating a database on your local machine and then trying to move it to a hosted machine. You create problems for yourself doing that. Better to populate it in place at the host and then you can get a dump of the db and restore it on your local machine. But you need to use as similar an url on your local machine as possible. For example if your site is a root site like http://somedomain.com then you don't wan't a different relative url on your test machine like http://localhost/mojo has a different relative url. In some features like the blog absolute urls are used for images, otherwise the images would not display in the outbound rss feed. This is another reason not to populate the db on your test machine and then push to production. It should always be the other way around, move a copy from production to test and let production be the definitive copy.

Its not a problem when moving from host to host with the same domain and url but moving from host to host with diofferent domains and url structures is going to produce issues in the content because urls have changed.

Something isn't right with your db, it should never run script 2.2.1.5. On a new install it starts with 2.2.7.8, so for some reason its trying to run old scripts. Possibly the tables form your local db have a different owner. You can also run into problems if your local MySql is lowering all the table names and the host version is not or vice versa. Its a difference in server configuration, often on Windows hosted MySql tables will be forced to lower case whereas on linux this is not usually the case. Best to start with a clean empty db on your host.

Hope it helps,

Joe

1/13/2009 9:39:13 AM
Gravatar
Total Posts 11

Re: How to upload a local site to a hosted server ?

Hi Joe

I will go for the clean host db and create the site on the host.

Thanks for your speedy help.

Kurt

You must sign in to post in the forums. This thread is closed to new posts.