Skip to content
Snippets Groups Projects
Commit 0f4d9bc0 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #570 from greezybacon/issue/win32-install


Install may fail on Windows platforms

Reviewed-By: default avatarPeter Rotich <peter@osticket.com>
parents 465497f2 3a62efd6
No related branches found
No related tags found
No related merge requests found
......@@ -113,10 +113,14 @@ class Installer extends SetupWizard {
$debug = true; //XXX:Change it to true to show SQL errors.
//Last minute checks.
if(!file_exists($schemaFile))
if(!file_exists($schemaFile) || !($fp = fopen($schemaFile, 'rb')))
$this->errors['err']='Internal Error - please make sure your download is the latest (#1)';
elseif(!($signature=trim(file_get_contents("$schemaFile.md5"))) || strcasecmp($signature, md5_file($schemaFile)))
$this->errors['err']='Unknown or invalid schema signature ('.$signature.' .. '.md5_file($schemaFile).')';
elseif(
!($signature=trim(file_get_contents("$schemaFile.md5")))
|| !($hash=md5(fread($fp, filesize($schemaFile))))
|| strcasecmp($signature, $hash))
$this->errors['err']='Unknown or invalid schema signature ('
.$signature.' .. '.$hash.')';
elseif(!file_exists($this->getConfigFile()) || !($configFile=file_get_contents($this->getConfigFile())))
$this->errors['err']='Unable to read config file. Permission denied! (#2)';
elseif(!($fp = @fopen($this->getConfigFile(),'r+')))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment