Moving a site problem

Permalink
Hi
I am fairly new to concrete 5.
I am trying to move the site from my descktop pc which is on Xampp to my laptop which also has xampp.

I have followed the instructions on moving a site.
1. I have created the backup of the database
2.I have disabled and cleared the cache.
3.l I have disabled the pretty urls's
4. I have moved the directory from the desktop xampp to the laptop xampp.
5. I have opened the /config/site.php which looks as it should.
Xampp on the laptop has the same username and password as the desktop.
6. I have imported my backup database file. When I do this I have to create a database with the same name as on the desktop then it will allow me to import the backup file and the database is there.

I seem to have two problems.
1. Strict Standards: Non-static method Loader::database() should not be called statically in C:\xampp\htdocs\concrete-badminton\concrete\dispatcher.php on line 23

Strict Standards: Non-static method Loader::library() should not be called statically in C:\xampp\htdocs\concrete-badminton\concrete\libraries\loader.php on line 177

Strict Standards: Non-static method Loader::library() should not be called statically in C:\xampp\htdocs\concrete-badminton\concrete\libraries\loader.php on line 178

Strict Standards: Non-static method Loader::library() should not be called statically in C:\xampp\htdocs\concrete-badminton\concrete\libraries\loader.php on line 179

Strict Standards: Non-static method Loader::library() should not be called statically in C:\xampp\htdocs\concrete-badminton\concrete\libraries\loader.php on line 180

Strict Standards: Declaration of dbTable::create() should be compatible with that of dbObject::create() in C:\xampp\htdocs\concrete-badminton\concrete\libraries\3rdparty\adodb\adodb-xmlschema03.inc.php on line 642

Strict Standards: Declaration of dbIndex::create() should be compatible with that of dbObject::create() in C:\xampp\htdocs\concrete-badminton\concrete\libraries\3rdparty\adodb\adodb-xmlschema03.inc.php on line 806


2.Strict Standards: Non-static method Loader::element() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\concrete-badminton\concrete\themes\core\error.php on line 15

Unable to connect to database.
A database error occurred while processing this request.
Catchable fatal error: Argument 1 passed to ConfigStore::__construct() must be an instance of Database, null given, called in C:\xampp\htdocs\concrete-badminton\concrete\models\config.php on line 48 and defined in C:\xampp\htdocs\concrete-badminton\concrete\models\config.php on line 136


I would really appreciate if someone would point me in the right direction here.

View Replies:
thephilm replied on at Permalink Reply
thephilm
Add the following line:
php_flag display_errors off

to the .htaccess file in the root of the concrete install... this will disable the errors being displayed, but shouldn't be used on a live production environment.
You are seeing this likely because the version of PHP is newer.

- Phil
macfi replied on at Permalink Reply
Thanks for the help Phil,

Errors now gone although I am now getting:-
Unable to connect to database. A database error occurred while processing this request.

As far as I am aware the password etc is correct as I use the same on both machines.

In the config directory the site file shows
<?php
define('DB_SERVER', 'localhost');
define('DB_USERNAME', 'root');
define('DB_PASSWORD', 'macgus');
define('DB_DATABASE', 'ldbc');
define('BASE_URL', 'http://localhost');
define('DIR_REL', '/concrete-badminton');
define('PASSWORD_SALT', 'InSyF9ZaTibXY2H4V8W1TVxjbNTlL8KaX0AJtsEl2aCOLBzvjWMkFoaTlmih0NkK');


One thing I noticed is that there is no closing ?> at the end but on looking back at the original site which works it is not there either.

When creating the database on the new machine I created the database ldbc then imported the database, as when I tried to import the database without first creating ldbc it would not work, this is the first time I have tried to import an mysql database so was not quite sure what I was doing.

Any help would really be appreciated as I want to take the website to the clubs agm later this week.

REgards
Fiona
thephilm replied on at Permalink Reply
thephilm
Fiona,
Unless you have explicitly changed the root password on a XAMPP install, it would actually be blank. I'd go and give that a shot to see if it will work.
macfi replied on at Permalink Reply
Hi Phil,

That was a very quick reply. I reset the password and it is all working now, Thanks for all the help it was really appreciated.

Regards
Fiona
macfi replied on at Permalink Reply
Hi
I managed to transfer my website from my desktop to my laptop both running XAMPP now trying to transfer to my server so it can go live.

I have done the following steps:
1. Disabled pretty URL and cache
2. Delete .htaccess file
3. Debug and disable cache, clear cache
4. Transfer MySQL database
5. Transfer files to server
6. Updated configuration file

When I try to view the website I get the following error message:

Unable to connect to database.
A database error occurred while processing this request.
Catchable fatal error: Argument 1 passed to ConfigStore::__construct() must be an instance of Database, null given, called in /home/lothiand/public_html/concrete/models/config.php on line 48 and defined in /home/lothiand/public_html/concrete/models/config.php on line 136




Any help would be greatly appreciated.
thephilm replied on at Permalink Reply
thephilm
Sounds like a case of case sensitivity....
On a windows machine, without explicitly making a few config file changes, the database table names are all lowercase. When moved to a live server, this causes several errors.
There is an addon that takes care of this for you (paid)http://www.concrete5.org/marketplace/addons/mysql-case-insensitive-...

Or you can run an SQL query yourself to fix it...
See this thread for the fix (look for the attachment on March 15th)
http://www.concrete5.org/community/forums/installation/table-names-...

- Phil
Mainio replied on at Permalink Reply
Mainio
There is also an add-on that handles the case sensitivity migration (free):
https://github.com/ahukkanen/c5_db_case_sensitivity...

It isn't in the marketplace because it is yet to be tested by some PRB member who would have windows machine to test it with. Has been in the queue almost for 2 months, though.


Antti / Mainio
macfi replied on at Permalink Reply
Hi Phil

Ran the query and checked all the tables are now mixed case. Still showing:
Catchable fatal error: Argument 1 passed to ConfigStore::__construct() must be an instance of Database, null given, called in /home/lothiand/public_html/concrete/models/config.php on line 48 and defined in /home/lothiand/public_html/concrete/models/config.php on line 136

Your help is very much appreciated.
Mainio replied on at Permalink Reply
Mainio
Actually this doesn't sound like case sensitivity issue. There was similar post before on these forums.

I THINK some people experienced this after upgrading the core. Have you upgraded your core?
Mainio replied on at Permalink Reply
Mainio
Might also be an issue with MySQL privileges:
http://www.concrete5.org/community/forums/installation/migrating-fr...


If you get it fixed with this, please post your results here. I think this might be a place for a proper how-to since quite many seem to experience this issue.

Antti / Mainio
macfi replied on at Permalink Reply
Right firstly it was a mixture of what you had both suggested.
Changed tables to mixed case using the query Phil had sugested then had to do several myself as they had not changed.

Set up the priveledges for mySQL as suggested. Thought I had already done that but never mind!

Had a couple of path problems in my site.php which now seem to be OK.
Site up and running now just needs a bit of fine tuning!

A very big thanks for all your help, it was really appreciated.