17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 2420 Views |
-
MySQL error during install

15 February 2007 at 6:53pm
I'm trying a first time install on a cpanel server, I have PHP5 and MySQL 4.1.21 , apache 1.3.37.
When I run install.php I get errors at the top of the page:
Warning: mysql_get_server_info() [function.mysql-get-server-info]: Access denied for user
and below the MySQL section, everything is OK except for this line:
MySQL version at least 4.1 MySQL version 4.1 is required, you only have ..
Is there a way to manually tell the install the MySQL version or trick MySQL into telling its version?
Thanks!
-
Re: MySQL error during install

15 February 2007 at 11:17pm
If you know that you have MySQL 4.1 or better installed, then feel free to search for the following line and place two forward slashes in front of it:
$this->requireMySQLVersion("4.1", array("MySQL Configuration", "MySQL version at least 4.1", "MySQL version 4.1 is required, you only have ", "MySQL " . mysql_get_server_info()));
Should become:
// $this->requireMySQLVersion("4.1", array("MySQL Configuration", "MySQL version at least 4.1", "MySQL version 4.1 is required, you only have ", "MySQL " . mysql_get_server_info()));
-
Re: MySQL error during install

16 February 2007 at 7:52am
Thanks Matt, I got past that hurdle, when running the install it overwrites the .htaccess where I must have
AddHandler application/x-httpd-php5 .php .php4 .php3 .phtml
I was attempting to install in my root (public_html) directory, not public_html/silverstripe-v2.0/
Once I ran the install in the subdirectory it installed fine.
-
Re: MySQL error during install

16 February 2007 at 8:56am
We'll need to update the installer so that it merges with the existing .htaccess file if one already exists.
-
Re: MySQL error during install

27 February 2007 at 8:44am
Commenting that line out worked like a charm.
I also had the .htaccess problem, however.
Here's what I did:
1 - Go to the section of install.php that writes the .htaccess file (around line 501)
2 - Insert "AddHandler application/x-httpd-php5 .php" after this line:
$this->createFile(".htaccess", <<<TEXT
3 - Save and upload.
-
Re: MySQL error during install

6 March 2007 at 12:28am Last edited: 6 March 2007 12:32am
I found that my host has some pretty strict requirements on accessing the database. Somewhere in the MySQL docs I read this and added it line 22 of install.php. Fixed it perfectly! Of course you'll want your info in there and to make sure the install.php is not accessible afterwards.
//-----
$link = mysql_connect('DATABASESERVER', 'USERNAME', 'PASSWORD');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
//------Perhaps it will work for you.
| 2420 Views | ||
|
Page:
1
|
Go to Top |


