I have created an Opencart shop on my locally hosted site on MAMP. Now I have moved the site to a hosting company, I need to know what I need to update for the shop to work. I know that I need to edit the "config.php" files to point to the new links. Then upload the SQL db to the server.
I would be grateful for step by step instructions to get this to work. My opencart config files:
// HTTP
define('HTTP_SERVER', 'http://localhost:8888/shop/');
// HTTPS
define('HTTPS_SERVER', 'http://localhost:8888/shop/');
// DIR
define('DIR_APPLICATION', '/Applications/MAMP/htdocs/shop/catalog/');
define('DIR_SYSTEM', '/Applications/MAMP/htdocs/shop/system/');
define('DIR_IMAGE', '/Applications/MAMP/htdocs/shop/image/');
define('DIR_LANGUAGE', '/Applications/MAMP/htdocs/shop/catalog/language/');
define('DIR_TEMPLATE', '/Applications/MAMP/htdocs/shop/catalog/view/theme/');
define('DIR_CONFIG', '/Applications/MAMP/htdocs/shop/system/config/');
define('DIR_CACHE', '/Applications/MAMP/htdocs/shop/system/storage/cache/');
define('DIR_DOWNLOAD', '/Applications/MAMP/htdocs/shop/system/storage/download/');
define('DIR_LOGS', '/Applications/MAMP/htdocs/shop/system/storage/logs/');
define('DIR_MODIFICATION', '/Applications/MAMP/htdocs/shop/system/storage/modification/');
define('DIR_UPLOAD', '/Applications/MAMP/htdocs/shop/system/storage/upload/');
// DB
define('DB_DRIVER', 'mysqli');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'root');
define('DB_PASSWORD', 'root');
define('DB_DATABASE', 'opencart');
define('DB_PORT', '3306');
define('DB_PREFIX', 'oc_');
I have contacted my hosting company and the address of folder is:
/home/cluster-sites/3/c/MYWEBSITE.co.uk/public_html/shop
What do I need to change?
My SQL db is set up on phpMyAdmin as "opencart". How do I transfer this to my hosting - do i need to keep naming exactly the same?
I have searched for a step by step guide but so far no luck. Any help would be appreciated.
I found a great step by step guide here:
https://www.squirrelhosting.co.uk/hosting-blog/hosting-blog-info.php?id=47
Is is now working for me
Related
I'm working on a Perl6 project, but having difficulty connecting to MySQL. Even when using the DBIish (or perl6.org tutorial) example code, the connection fails. Any suggestions or advice is appreciated! User credentials have been confirmed accurate too.
I'm running this on Windows 10 with MySQL Server 8.0 and standard Perl6 with Rakudo Star. I have tried modifying the connection string in numerous ways like :$password :password<> :password() etc. but can't get a connection established. Also should note that I have the ODBC, C, C++, and.Net connectors installed.
#!/usr/bin/perl6
use v6.c;
use lib 'lib';
use DBIish;
use Register::User;
# Windows support
%*ENV<DBIISH_MYSQL_LIB> = "C:/Program Files/MySQL/MySQL Server 8.0/liblibmysql.dll"
if $*DISTRO.is-win;
my $dbh = DBIish.connect('mysql', :host<localhost>, :port(3306), :database<dbNameHere>, :user<usernameHere>, :password<pwdIsHere>) or die "couldn't connect to database";
my $sth = $dbh.prepare(q:to/STATEMENT/);
SELECT *
FROM users
STATEMENT
$sth.execute();
my #rows = $sth.allrows();
for #rows { .print }
say #rows.elems;
$sth.finish;
$dbh.dispose;
This should be connecting to the DB. Then the app runs a query, followed by printing out each resulting row. What actually happens is the application hits the 'die' message every time.
This is more of a work around, but being unable to use use a DB is crippling. So even when trying to use the NativeLibs I couldn't get a connection via DBIish. Instead I have opted to using DB::MySQL which is proving to be quite helpful. With a few lines of code this module has your DB needs covered:
use DB::MySQL;
my $mysql = DB::MySQL.new(:database<databaseName>, :user<userName>, :password<passwordHere>);
my #users = $mysql.query('select * from users').arrays;
for #users { say "user #$_[0]: $_[1] $_[2]"; }
#Results would be:
#user #1: FirstName LastName
#user #2: FirstName LastName
#etc...
This will print out a line for each user formatted as shown above. It's not as familiar as DBIish, but this module gets the job done as needed. There's plenty more you can do with it to, so I highly recommend reading the docs.
According to this github DBIish issue 127
The environmental variable DBIISH_MYSQL_LIB was removed. I don't know if anyone brought it back.
However if you add the library's path, and the file is named mysql.dll, it will work. Not a good result for the scientific method.
So more testing is needed - and perhaps
C:\Program Files\MySQL\MySQL Server 8.0\lib>mklink mysql.dll .\libmysql.dll
Oviously you can create your own lib directory and add that to your path and then add this symlink to that directory.
Hope this helps. I've spent hours..
EDIT: Still spending time - accounting later.
Something very transitory is going on. I reset the machine (perhaps always do this from now on), and still got the missing mysql.dll errors. Tried going into the MySQL lib directory to execute raku from there.. worked. changed directories.. didn't work.
Launched administrator cmd - from home directory, tried the raku command. Worked. Ok - not good, but perhaps consistent. Launched non admin cmd, tried it from the MySQL lib directory, worked. And just for giggles, tried it outside of that directory.. worked.
Now I can't get it not to work. Will explore NativeLibs::Searcher as Valle Lukas suggested!
Maybe the example in the dbiish repository is not valid anymore.
The DBIISH_MYSQL_LIB Env seems to be replaced by NativeLibs::Searcher with commit 9bc4191
Looking at NativeLibs::Searcher may help to find the root cause of the problem.
I need to fix bugs in styles on the site, built on Drupal 7. But when I changed some lines in styles, nothing changed in the browser. When I ran "drush cc all", I saw in my terminal next (full log contains more than 45k simbols):
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'fr_bote.watchdog' doesn't exist: INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array
I have no idea how to fix it, please help me! Thanks for advance!
**Edit
drush status
Drupal version : 7.34
Site URI : http://default
Database driver : mysql
Database hostname : localhost
Database username : admin
Database name : fr_bote
Database : Connected
Drupal bootstrap : Successful
Drupal user : Guest
Default theme : bote
Administration theme : shiny
PHP configuration : /etc/php5/cli/php.ini
Drush version : 5.0-dev
Drush configuration :
Drupal root : /var/www/my-website
Site path : sites/default
File directory path : sites/default/files
Temporary file directory path : /tmp
there is a solution! the problem was in the settings database. in file php.ini changed fields max_execution_time, and upload_max_filesize at large values, delete the old tables, again made export - import tables and everything worked!
The message is pretty clear:
The Table fr_bote.watchdog is missing in your DB. You have to create it.
I suppose Drush doesn't find your database. You should call it using
drush -r /path/to/drupal -l your.website.url
so that drush finds your installation directory as well as the correct sites/folder, where the settings.php for this site is located.
Maybe to uses sites/default/settings.php as a fallback and gets pointed to an empty database?
The best way to use drush is to getting used to site aliases (e.g. start at https://duckduckgo.com/?q=drush+site-aliases). A site alias defines the root path as well as the base.url of a drupal installation. You can even define aliases to remote drupal installations. Drush connects them via ssh - no need to leave your local shell.
I have configure ejabberd server 2.1.10 with mysql database integration,mod_admin_extra module and mod_xmlrpc module.
Issues is ejaberd admin commands like add_rosteritem, delete_rosteritem are notworking with xml_rpc.
When we use direct command line like,
*root#ejabberdserver:~# ejabberdctl add_rosteritem admin domain.com karthik domain.com karthik none both*
it will work and store in to database.
but same command does not work with xml_rpc.
xml_rpc does not return any error, it retun {ok,{response,[0]}}
But it does't store database.
Any permission issue?
Any body please help!!!!!
I meet the similar issue recently, and turn out the root cause was there a bug in (svn)ejabberd_module source code, and this was reported in https://github.com/processone/ejabberd-contrib/issues/22 and fixed in ejabberd-contrib,
So I suggest you download the source https://github.com/processone/ejabberd-contrib and rebuild the mod_admin_extra.
I am trying to put SSL encryption between my Wordpress application and its MySQL database, is anyone aware of a solution/tutorial for this? Haven't managed to find anything on Google or the Wordpress codex.
Further to #ticoombs response, and after some digging / testing, I found that by changing the constant defined in wp-config.php (in the root directory) to the following it worked!
define('MYSQL_CLIENT_FLAGS', MYSQLI_CLIENT_SSL);
...note the extra "I" in MYSQLI_CLIENT_SSl.
Symptoms: The symptom I observed was that the call to mysql_connect in /wp-includes/wp-db.php was generating a warning that parameter 8 (i.e. $client_flags) was not an integer.
Version: Vanilla install of 4.8.1, running on php 7.0
Yes. It is possible to connect Wordpress to mysql using SSL. Add define('DB_SSL', true); to your wp-config.php file and take a look at this:
http://wordpress.org/support/topic/wordpress-with-mysql-over-ssl
Just to build on the answer:
File Location: /wordpress/wp-includes/wp-db.php
From:
$client_flags = defined( 'MYSQL_CLIENT_FLAGS' ) ? MYSQL_CLIENT_FLAGS : 0;
To:
$client_flags = defined( 'MYSQL_CLIENT_FLAGS' ) ? MYSQL_CLIENT_FLAGS : MYSQL_CLIENT_SSL;
Currently WP should be able to handle adding, (below) to the wp-config.php. (But in my findings i have not been able to get it to work.
define('MYSQL_CLIENT_FLAGS', MYSQL_CLIENT_SSl);
I wrote a good blog post on the matter.
Source
I have just installed the CodeStriker code review tool.
Has anyone attempted connecting it to FogBugz?
In the CodeStriker documentation I saw it works with Scmbug, whichintegrates software configuration management (SCM) with bug-tracking.
Has anyone connected Scmbug to FogBugz?
We haven't heard of anyone doing so at Fog Creek. You might also ask at http://fogbugz.stackexchange.com.
Well, I now have a partial answer:
Let FOGBUGZSERVER be the machine where fogbugz is installed. In the codestriker.conf file under /var/www/codestriker/codestriker-x.y.z Redefine the $bugtracker variable as:
$bugtracker = 'http://FOGBUGZSERVER/fogbugz/default.asp?';
Rerun install.pl
Restart the apache server.
Now when you insert a case id in the topic information, you will get a link to the proper fogbugz case.