Jump to content

Moving shop from local dev server to production host


Recommended Posts

I have a shop that I set up on a local machine for dev purposes. I now want to move the shop to my host server. I copied the entire web site up to the host, dumped my database and imported it on the host, and edited my settings.inc.php file with the new host's database server info.

 

When I try to go to the site, I get this error:

 

Link to database cannot be established: SQLSTATE[HY000] [1045] Access denied for user '*******'@'XX.XX.XX.XX' (using password: YES)

 

The IP address in the error message is that of the web server, NOT the address specified for the database server in the settings file. Is there somewhere else the address needs to be set?

 

Link to comment
Share on other sites

I have a shop that I set up on a local machine for dev purposes. I now want to move the shop to my host server. I copied the entire web site up to the host, dumped my database and imported it on the host, and edited my settings.inc.php file with the new host's database server info.

 

When I try to go to the site, I get this error:

 

Link to database cannot be established: SQLSTATE[HY000] [1045] Access denied for user '*******'@'XX.XX.XX.XX' (using password: YES)

 

The IP address in the error message is that of the web server, NOT the address specified for the database server in the settings file. Is there somewhere else the address needs to be set?

 

 

your mysql info in settings.inc.php are incorrect.

Link to comment
Share on other sites

I check the settings in my settings,inc.php file, and they are correct.

 

The settings file has:

 

define('_DB_SERVER_', '1.2.3.4:1006'); (example)

 

But the error message says

 

user '*******'@'2.5.7.9' (web server address, NOT the db server address specified in the settings file above - example address)

Link to comment
Share on other sites

hi, there are so many little caveats to localhost...

 

typically I use for db server name 1) localhost or 2) 127.0.0.1 (I use this as it's better for performance)..

 

I was going on the original error message 'Link to database cannot be established: SQLSTATE[HY000] [1045] Access denied for user '*******'@'XX.XX.XX.XX' (using password: YES)"

Link to comment
Share on other sites

The host doesn't use localhost for the database server. I figured out that part of it, but now there's another problem. ;)

 

On a suggestion from another thread, I ran HeidiSQL to check my connection settings, and discovered that my host changed the database server address. Once I changed that, connection was established.

 

However, now I am receiving a 500 Internal server error when trying to go to the site.

Link to comment
Share on other sites

I went into  my hosting settings and changed my PHP settings from FastCGI under 5.4 to ISAPI under 5.2 and now I got a bunch of debug messages, all having to do with files not in the allowed path. I'm going to re-check my folder permissions and see if there are any problems there.

  • Like 1
Link to comment
Share on other sites

I am using Prestashop 1.6.0.8

 

When trying to get to the front end, I get three pages of similar:

 

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(G:\PleskVhosts\windygapfarm.com\httpdocs/themesG:\PleskVhosts\windygapfarm.com\httpdocs/default-bootstrapG:\PleskVhosts\windygapfarm.com\httpdocs/cssG:\PleskVhosts\windygapfarm.com\httpdocs/css/grid_prestashop.css) is not within the allowed path(s): (G:/PleskVhosts//windygapfarm.com\;C:\Windows\Temp\) in G:\PleskVhosts\windygapfarm.com\httpdocs\classes\controller\FrontController.php on line 1019

 

and at the end I get:

 

Fatal error: Uncaught exception 'SmartyException' with message 'unable to write file G:\PleskVhosts\windygapfarm.com\httpdocs/cache/smarty/compile\79\ea\6d\79ea6d51baa0419077397fe513c48c0a8b425ef7.file.header.tpl.php' in G:\PleskVhosts\windygapfarm.com\httpdocs\tools\smarty\sysplugins\smarty_internal_write_file.php:73 Stack trace: #0 G:\PleskVhosts\windygapfarm.com\httpdocs\tools\smarty\sysplugins\smarty_internal_template.php(201): Smarty_Internal_Write_File::writeFile('G:\PleskVhosts\...', '<?php /* Smarty...', Object(Smarty)) #1 G:\PleskVhosts\windygapfarm.com\httpdocs\tools\smarty\sysplugins\smarty_internal_templatebase.php(155): Smarty_Internal_Template->compileTemplateSource() #2 G:\PleskVhosts\windygapfarm.com\httpdocs\classes\module\Module.php(2020): Smarty_Internal_TemplateBase->fetch() #3 G:\PleskVhosts\windygapfarm.com\httpdocs\modules\homeslider\homeslider.php(477): ModuleCore->display('G:\PleskVhosts\...', 'header.tpl') #4 G:\PleskVhosts\windygapfarm.com\httpdocs\classes\Hook.php(507): HomeSlider->hookdisplayH in G:\PleskVhosts\windygapfarm.com\httpdocs\tools\smarty\sysplugins\smarty_internal_write_file.php on line 73

 

When I try to get to the back end, I get:

 

Fatal error: Call to undefined function mcrypt_encrypt() in G:\PleskVhosts\windygapfarm.com\httpdocs\classes\Rijndael.php on line 50

Link to comment
Share on other sites

getting into the back office is crucial of course...there you can recreate .htaccess and clear out cache.

 

you will need to enable mcrypt_encrypt()  on your server to get back office up and running...

 

this is a bit more than building copy of prestashop but configuring your localhost.

 

tip: on new server it is good idea to download a fresh prestashop and do the installation with demo data.  PrestaShop can then check and report on server issues, this can take a lot of debugging trying to get prod  copy of ps  working on localhost or remote for that matter.

Link to comment
Share on other sites

getting into the back office is crucial of course...there you can recreate .htaccess and clear out cache.

 

you will need to enable mcrypt_encrypt()  on your server to get back office up and running...

 

this is a bit more than building copy of prestashop but configuring your localhost.

 

tip: on new server it is good idea to download a fresh prestashop and do the installation with demo data.  PrestaShop can then check and report on server issues, this can take a lot of debugging trying to get prod  copy of ps  working on localhost or remote for that matter.

 

The situation is this. My dev server is local to me. Everything is working fine there.

The Production server is not local to me, it's a hosting account. I have no access to the server to change settings. They assure me Mcrypt is enabled. I originally tried to do a clean install on the host, but after 7 tries of being unable to get it to install properly, I thought maybe I could copy a functional site over. The install would hang at various stages, it only completed once, but prestashop was that time installed in the wrong folder and wouldn't run so I had to do it again. prestashop made it past all the system checks fine, and the databse connection phase, but would crash when setting up the shop.

Since this isn't working either I supposed I will try another install. I've been trying to get this site up and running on my host now for over a month without much luck.

Link to comment
Share on other sites

  • 2 years later...

I am using Prestashop 1.6.0.8

 

When trying to get to the front end, I get three pages of similar:

 

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(G:\PleskVhosts\windygapfarm.com\httpdocs/themesG:\PleskVhosts\windygapfarm.com\httpdocs/default-bootstrapG:\PleskVhosts\windygapfarm.com\httpdocs/cssG:\PleskVhosts\windygapfarm.com\httpdocs/css/grid_prestashop.css) is not within the allowed path(s): (G:/PleskVhosts//windygapfarm.com\;C:\Windows\Temp\) in G:\PleskVhosts\windygapfarm.com\httpdocs\classes\controller\FrontController.php on line 1019

 

and at the end I get:

 

Fatal error: Uncaught exception 'SmartyException' with message 'unable to write file G:\PleskVhosts\windygapfarm.com\httpdocs/cache/smarty/compile\79\ea\6d\79ea6d51baa0419077397fe513c48c0a8b425ef7.file.header.tpl.php' in G:\PleskVhosts\windygapfarm.com\httpdocs\tools\smarty\sysplugins\smarty_internal_write_file.php:73 Stack trace: #0 G:\PleskVhosts\windygapfarm.com\httpdocs\tools\smarty\sysplugins\smarty_internal_template.php(201): Smarty_Internal_Write_File::writeFile('G:\PleskVhosts\...', '<?php /* Smarty...', Object(Smarty)) #1 G:\PleskVhosts\windygapfarm.com\httpdocs\tools\smarty\sysplugins\smarty_internal_templatebase.php(155): Smarty_Internal_Template->compileTemplateSource() #2 G:\PleskVhosts\windygapfarm.com\httpdocs\classes\module\Module.php(2020): Smarty_Internal_TemplateBase->fetch() #3 G:\PleskVhosts\windygapfarm.com\httpdocs\modules\homeslider\homeslider.php(477): ModuleCore->display('G:\PleskVhosts\...', 'header.tpl') #4 G:\PleskVhosts\windygapfarm.com\httpdocs\classes\Hook.php(507): HomeSlider->hookdisplayH in G:\PleskVhosts\windygapfarm.com\httpdocs\tools\smarty\sysplugins\smarty_internal_write_file.php on line 73

 

When I try to get to the back end, I get:

 

Fatal error: Call to undefined function mcrypt_encrypt() in G:\PleskVhosts\windygapfarm.com\httpdocs\classes\Rijndael.php on line 50

Did you solve this issue? Im having very same problem on 1.7.2.2, after migration from dev server to production, Im receiving this error Warning: file_exists() [function.file-exists]: open_basedir restriction in effect.

However I have no luck so far.

Edited by Rail Balco (see edit history)
Link to comment
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
×
×
  • Create New...