Required: MySQL 4 >= 4.0 is required

Closed
ft85 Posts 24 Registration date Thursday January 22, 2015 Status Member Last seen February 25, 2020 - Sep 28, 2016 at 03:02 PM
 Blocked Profile - Sep 29, 2016 at 04:38 PM
hi Team

am having a problem installing my application in php for chatting with my customers but the thing is every time i get in to a step of database in mysql i get an error saying that PERMISSIONS CHECK Required: MySQL 4 >= 4.0 is required. my mysql version is 5.6.x so how can i get read of this error so that i can proceed with my installation with out a problem?

below is my connection code

-----------------------



function siteURL()
{
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";
$domainName = $_SERVER['HTTP_HOST'] . '/';
return $protocol . $domainName;
}

define('SITE_URL', siteURL());

$current_directory = getcwd();
$curArr = explode('/', $current_directory);
unset($curArr[count($curArr) - 1]);
$appPath = implode('/', $curArr);
$appDir = str_replace("/install/install.php", "", $_SERVER['REQUEST_URI']);

$isInstalled = false;
if (file_exists($appPath . '/data/config/config.php')) {
$isInstalled = true;
header('Location: ' . siteURL() . $appDir . '/index.php');
die();
}

if (isset($_POST['install']) && !$isInstalled) {
$error = '';

if (substr(sprintf('%o', fileperms($appPath . '/engine/data/')), -4) != '0777') {
$error .= 'Please set writing permission (0777) on /engine/data<br />';
}

if (substr(sprintf('%o', fileperms($appPath . '/data/config/')), -4) != '0777') {
$error .= 'Please set writing permission (0777) on /data/config<br />';
}

if (!in_array('zlib', get_loaded_extensions())) {
$error .= 'The ZipArchive class uses the functions of » zlib<br />';
}

if (!function_exists('fopen')) {
$error .= 'Function "fopen" should be active<br />';
}

if (!function_exists('curl_init')) {
$error .= 'Function "curl" should be active<br />';
}

if (!function_exists('scandir')) {
$error .= 'Function "scandir" should be active<br />';
}

if (!function_exists('mysql_connect')) {
$error .= 'Function "mysql_connect" should be active<br />';
} else {
if (!version_compare("4.0", phpinfo_array('mysql', 'client_api_version'), "<=")) {
$error .= 'MySQL 4 >= 4.0 is required<br />';
}
}

if (!version_compare("5.2", phpversion(), "<=")) {
$error .= 'PHP 5 >= 5.2 is required<br />';
}


if (phpinfo_array('apache2handler') && phpinfo_array('apache2handler',
'loaded_modules') && strpos(phpinfo_array('apache2handler', 'loaded_modules'), 'mod_rewrite') === false
) {
$error .= 'Apache mod_rewrite is required<br />';
}

if (!version_compare("2.0", preg_replace('/([^0-9.]{1,})/i', '$2', phpinfo_array('gd', 'gd_version')), "<=")) {
$error .= 'PHP GD2 >= 2.0 is required<br />';
}

if ($error == '') {
$complete = 'yes';
}

} else {
$_POST['mysql_host'] = '';
$_POST['mysql_user'] = '';
$_POST['mysql_pass'] = '';
$_POST['mysql_db'] = '';
$_POST['admin_username'] = '';
$_POST['admin_password'] = '';
$_POST['admin_mail'] = '';
}

3 responses

Blocked Profile
Sep 28, 2016 at 04:27 PM
Did you set the permissions on the sql to allow for your IISUSER account to make connections?


Did you map the default catalog into the correct sql instance?
0
ft85 Posts 24 Registration date Thursday January 22, 2015 Status Member Last seen February 25, 2020
Sep 29, 2016 at 09:36 AM
Hi again thanks for your quick reply. am using MVC and PHP all is set fine , however i can't pass the step Required: MySQL 4 >= 4.0 is required. so the setup permission i still doubt how i can make change to allow it to work with my mysql version 5.6. and am still dont understand what u mean by default catalog sql instances.
0
Blocked Profile
Sep 29, 2016 at 04:38 PM
On the SQL side, you have to give the IIS user (or the agent you have administered, typically IIS_Usr), permission to log into the SQL DB Instance. In the SQL server, did you allow the WEB SERVER to make the connection? That is why it may be failing, if you have not given DBO or login permissions for the PHP machine.
0