Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Can not install silverstripe


Go to End


4 Posts   5067 Views

Avatar
N!ck

Community Member, 6 Posts

8 December 2015 at 7:25am

I'm trying to install SilverStripe on hosting server, it is working perfectly on local server with no warnings
but on hosting server I get this warning on install.php

Warning: Invalid argument supplied for foreach() in /home/u169069151/public_html/framework/dev/install/MySQLDatabaseConfigurationHelper.php on line 71

also during installation i get this error
 
Building database schema...
[User Error] Uncaught SS_DatabaseException: Couldn't run query: SHOW DATABASES LIKE 'u169069151_sil' Access denied; you need (at least one of) the SHOW DATABASES privilege(s) for this operation
POST /install.php

Line 55 in /home/u169069151/public_html/framework/model/connect/DBConnector.php
Source

46 		if (!empty($sql)) {
47 			$formatter = new SQLFormatter();
48 			$formattedSQL = $formatter->formatPlain($sql);
49 			$msg = "Couldn't run query:\n\n{$formattedSQL}\n\n{$msg}";
50 		}
51 
52 		if($errorLevel === E_USER_ERROR) {
53 			// Treating errors as exceptions better allows for responding to errors
54 			// in code, such as credential checking during installation
55 			throw new SS_DatabaseException($msg, 0, null, $sql, $parameters);
56 		} else {
57 			user_error($msg, $errorLevel);
58 		}
59 	}
60 	
61 	/**
Trace

DBConnector->databaseError(Access denied; you need (at least one of) the SHOW DATABASES privilege(s) for this operation,256,SHOW DATABASES LIKE 'u169069151_sil') 
MySQLiConnector.php:124
MySQLiConnector->query(SHOW DATABASES LIKE 'u169069151_sil',256) 
Database.php:109
SS_Database->{closure}(SHOW DATABASES LIKE 'u169069151_sil') 
Database.php:178
SS_Database->benchmarkQuery(SHOW DATABASES LIKE 'u169069151_sil',Closure) 
Database.php:111
SS_Database->query(SHOW DATABASES LIKE 'u169069151_sil',256) 
DBSchemaManager.php:86
DBSchemaManager->query(SHOW DATABASES LIKE 'u169069151_sil') 
MySQLSchemaManager.php:193
MySQLSchemaManager->databaseExists(u169069151_sil) 
Database.php:633
SS_Database->selectDatabase(u169069151_sil,,) 
MySQLDatabase.php:48
MySQLDatabase->connect(Array) 
DB.php:244
DB::connect(<filtered>) 
install.php5:1428
Installer->install(Array) 
install.php5:231
include(/home/u169069151/public_html/framework/dev/install/install.php5) 
install.php:26
include(/home/u169069151/public_html/framework/dev/install/install.php) 
install.php:13

i checked the files on local server but everythone goes OK during installation but while installing on hosting server i get this error. also i checked the databse privilege on hosting everything ticked so i dont what is wrong with the silverstripe

Avatar
jonm80

Community Member, 12 Posts

9 December 2015 at 5:16pm

Forgive the daft question...

But have you installed on the remote server from scratch? (using composer or fresh archive)

looks like to me you *may* have uploaded your local site and forgot to update the database config

or a possibility that you have not assigned the correct db privs to the db user?
easier to create a new db user, create database and grant all

Avatar
N!ck

Community Member, 6 Posts

10 December 2015 at 12:16am

Yes, I have used the fresh archive
No, I did not use the local site *I think the problem is in root permissions for DB as I use the free hosting. *
I checked the DB settings on the local environment there is an option called 'SHOW DATABASES' is available in privilege settings but it's not available in PHPMyAdmin provided by my hosting
And I tried to install SilverStripe 3.1.8 package provided by my hosting company *auto installer* and its working fine for now
But when I try to upgrade to 3.2 after upgrading I get the server error on all pages *I just copied cms, framework, reports, siteconfig folder after deleting the old folders* And yes, I have used '/dev/build? flush=1'

Avatar
martimiz

Forum Moderator, 1391 Posts

12 December 2015 at 2:30am

Looks like you stumbled into the same issue as described here: http://www.silverstripe.org/community/forums/upgrading-silverstripe/show/110872

Seems installing SilverStripe 3.2 may break on database names that have an underscore in it. So if you have the option to change the databasename, that might help.. If not - an issue has been raised on github, you'll find the link in the post above as well...