Hi,
I'm getting the following error when trying to install. Unfortunately it is not possible to rename the database. The hosting company prefixes all databases with "web(servernumber)-"
545 : $dbase = web123-databasename
546 : $dbase = SHOW TABLES FROM web123-databasename
547 : $params = You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-databasename' at line 1
-
☆ A M B ☆
- 3,112 Posts
don't use - (hypen), use _ (underscore)
Rico
Genius is one percent inspiration and ninety-nine percent perspiration.
Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!
www.virtudraft.com
Security, security, security! |
Indonesian MODx Forum |
MODx Revo's cheatsheets |
MODx Evo's cheatsheets
Author of
Easy 2 Gallery 1.4.x,
PHPTidy,
spieFeed,
FileDownload R,
Upload To Users CMP,
Inherit Template TV,
LexRating,
ExerPlan,
Lingua,
virtuNewsletter,
Grid Class Key,
SmartTag,
prevNext
Maintainter/contributor of
Babel
Because it's hard to follow all topics on the forum, PING ME ON TWITTER
@_goldsky if you need my help.
Hi Goldsky,
Thanks for the reply.
Unfortunatley it is not possible to use an underscore. The hosting company automatically appends 'web140-' to the database name.
Steve
-
☆ A M B ☆
- 3,112 Posts
OK,
looks like I found a workaround for this.
Hang on.
Rico
Genius is one percent inspiration and ninety-nine percent perspiration.
Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!
www.virtudraft.com
Security, security, security! |
Indonesian MODx Forum |
MODx Revo's cheatsheets |
MODx Evo's cheatsheets
Author of
Easy 2 Gallery 1.4.x,
PHPTidy,
spieFeed,
FileDownload R,
Upload To Users CMP,
Inherit Template TV,
LexRating,
ExerPlan,
Lingua,
virtuNewsletter,
Grid Class Key,
SmartTag,
prevNext
Maintainter/contributor of
Babel
Because it's hard to follow all topics on the forum, PING ME ON TWITTER
@_goldsky if you need my help.
-
☆ A M B ☆
- 3,112 Posts
replace this file inside the install/ folder
Rico
Genius is one percent inspiration and ninety-nine percent perspiration.
Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!
www.virtudraft.com
Security, security, security! |
Indonesian MODx Forum |
MODx Revo's cheatsheets |
MODx Evo's cheatsheets
Author of
Easy 2 Gallery 1.4.x,
PHPTidy,
spieFeed,
FileDownload R,
Upload To Users CMP,
Inherit Template TV,
LexRating,
ExerPlan,
Lingua,
virtuNewsletter,
Grid Class Key,
SmartTag,
prevNext
Maintainter/contributor of
Babel
Because it's hard to follow all topics on the forum, PING ME ON TWITTER
@_goldsky if you need my help.
-
☆ A M B ☆
- 1,780 Posts
Can't you just prefix the db name with the server's prefix during install?
That's the only way I've ever done it, as all the servers I've installed on use their own prefix. I only see this error when I forget to prefix the db name.
???
-
☆ A M B ☆
- 3,112 Posts
the problem is not on the prefix, but on the hyphen.
Rico
Genius is one percent inspiration and ninety-nine percent perspiration.
Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!
www.virtudraft.com
Security, security, security! |
Indonesian MODx Forum |
MODx Revo's cheatsheets |
MODx Evo's cheatsheets
Author of
Easy 2 Gallery 1.4.x,
PHPTidy,
spieFeed,
FileDownload R,
Upload To Users CMP,
Inherit Template TV,
LexRating,
ExerPlan,
Lingua,
virtuNewsletter,
Grid Class Key,
SmartTag,
prevNext
Maintainter/contributor of
Babel
Because it's hard to follow all topics on the forum, PING ME ON TWITTER
@_goldsky if you need my help.
-
☆ A M B ☆
- 1,780 Posts
So this means I should keep in mind that hyphens are not compatible with MODX db connections. Good to know.
-
☆ A M B ☆
- 24,524 Posts
Any MySQL database name with hyphens has to be enclosed in backticks. I'm not sure that MODx per se - meaning xPDO - has a problem with that; this may be exclusive to the setup code.
Line 224 of setup/includes/request/modinstallclirequest.class.php is one place where the database_dsn is defined. I don't know if you can include the backticks in a dsn; I would presume that you can, since database names with hyphens must have them. If not, then indeed a database name with hyphens would be incompatible with MODx, since MODx uses PDO exclusively.