add helper about RewriteBase into .htaccess

This commit is contained in:
Taras Machyshyn
2014-09-17 17:31:49 +03:00
parent 0ccda10de8
commit d908da46cb
15 changed files with 90 additions and 33 deletions
-1
View File
@@ -99,7 +99,6 @@ class Installer
return $this->getConfig()->get('version');
}
protected function auth()
{
if (!$this->isAuth) {
+32 -8
View File
@@ -26,6 +26,7 @@ class SystemHelper extends \Espo\Core\Utils\System
protected $requirements = array(
'phpVersion' => '5.4',
'MySQLVersion' => '5.1',
'exts' => array(
'json',
@@ -34,7 +35,9 @@ class SystemHelper extends \Espo\Core\Utils\System
),
);
protected $modRewriteUrl = '/api/v1/Metadata';
protected $apiPath = '/api/v1';
protected $modRewriteUrl = '/Metadata';
protected $writableDir = 'data';
@@ -55,7 +58,6 @@ class SystemHelper extends \Espo\Core\Utils\System
return $this->writableDir;
}
public function checkRequirements()
{
$result['success'] = true;
@@ -77,6 +79,17 @@ class SystemHelper extends \Espo\Core\Utils\System
return $result;
}
protected function getMySQLVersion($pdoConnection)
{
$sth = $pdoConnection->prepare("SHOW VARIABLES LIKE 'version'");
$sth->execute();
$res = $sth->fetch(PDO::FETCH_NUM);
$version = empty($res[1]) ? null : $res[1];
return $version;
}
public function checkDbConnection($hostName, $port, $dbUserName, $dbUserPass, $dbName, $dbDriver = 'pdo_mysql', $isCreateDatabase = true)
{
$result['success'] = true;
@@ -98,7 +111,6 @@ class SystemHelper extends \Espo\Core\Utils\System
try {
$dsn = "mysql:host={$hostName};" . ((!empty($port)) ? "port={$port};" : '') . "dbname={$dbName}";
$dbh = new PDO($dsn, $dbUserName, $dbUserPass);
$dbh = null;
} catch (PDOException $e) {
$result['errors']['dbConnect']['errorCode'] = $e->getCode();
@@ -106,9 +118,18 @@ class SystemHelper extends \Espo\Core\Utils\System
$result['success'] = false;
}
/** try to create a database */
if ($isCreateDatabase && !$result['success'] && $result['errors']['dbConnect']['errorCode'] == '1049') {
/** Check MySQL Version */
if ($result['success']) {
$currentMySQLVersion = $this->getMySQLVersion($dbh);
if (isset($currentMySQLVersion) && version_compare($currentMySQLVersion, $this->requirements['MySQLVersion']) == -1) {
$result['errors']['MySQLVersion'] = $this->requirements['MySQLVersion'];
$result['success'] = false;
}
}
/** try to create a database */
if ($isCreateDatabase && !$result['success'] && $result['errors']['dbConnect']['errorCode'] == '1049')
{
$dsn = "mysql:host={$hostName};" . ((!empty($port)) ? "port={$port}" : '');
$pdo = new PDO($dsn, $dbUserName, $dbUserPass);
@@ -125,8 +146,6 @@ class SystemHelper extends \Espo\Core\Utils\System
}
/** END: try to create a database */
break;
}
@@ -148,9 +167,14 @@ class SystemHelper extends \Espo\Core\Utils\System
return $baseUrl;
}
public function getApiPath()
{
return $this->apiPath;
}
public function getModRewriteUrl()
{
return $this->modRewriteUrl;
return $this->apiPath . $this->modRewriteUrl;
}
public function getChownCommand($path, $isSudo = false, $isCd = true)
+3 -2
View File
@@ -64,6 +64,7 @@
"Bad init Permission": "Zugriff verweigert für Verzeichnis \"{*}\". Bitte setzen Sie 775 für \"{*}\" oder führen Sie dieses Kommando in einem Terminal Fenster aus <pre><b>{C}<\/b><\/pre> Operation nicht erlaubt? Versuchen Sie das: {CSU}",
"Some errors occurred!": "Es sind Fehler passiert!",
"phpVersion": "Ihre PHP Version wird von EspoCRM nicht unterstützt. Bitte aktualisieren Sie zumindest auf {minVersion}",
"MySQLVersion": "Ihre MySQL Version wird von EspoCRM nicht unterstützt. Bitte aktualisieren Sie zumindest auf {minVersion}",
"The PHP extension was not found...": "Die <b>{extName}<\/b> PHP Erweiterung wurde nicht gefunden...",
"All Settings correct": "Alle Einstellungen sind korrekt",
"Failed to connect to database": "Konnte nicht zur Datenbank verbinden",
@@ -96,7 +97,7 @@
},
"modRewriteInstruction": {
"apache": {
"linux": "<br><br>Für die .htaccess Unterstützung ändern\/ergänzen Sie die Server Einstellungen innerhalb der &#60;VirtualHost&#62; Sektion (httpd.conf):<pre>&#60;Directory \/PATH_TO_ESPO\/&#62; <b>AllowOverride All<\/b> &#60;\/Directory&#62;<\/pre>Dann führen Sie dieses Kommando in einem Terminalfenster aus:<pre><b>service apache2 restart<\/b><\/pre><br>Um \"mod_rewrite\" zu aktivieren führen Sie diese Kommandos in einem Terminalfenster aus:<pre><b>a2enmod rewrite <br>service apache2 restart<\/b><\/pre>",
"linux": "<br><br>Um die RewriteBase Pfad hinzufügen, öffnen Sie eine Datei {API_PATH}.htaccess und ändern Sie die folgende Zeile:<pre># RewriteBase /</pre>To<pre>RewriteBase {ESPO_PATH}{API_PATH}</pre><br>Für die .htaccess Unterstützung ändern\/ergänzen Sie die Server Einstellungen innerhalb der &#60;VirtualHost&#62; Sektion (httpd.conf):<pre>&#60;Directory \/PATH_TO_ESPO\/&#62; <b>AllowOverride All<\/b> &#60;\/Directory&#62;<\/pre>Dann führen Sie dieses Kommando in einem Terminalfenster aus:<pre><b>service apache2 restart<\/b><\/pre><br>Um \"mod_rewrite\" zu aktivieren führen Sie diese Kommandos in einem Terminalfenster aus:<pre><b>a2enmod rewrite <br>service apache2 restart<\/b><\/pre>",
"windows": "<br> <pre>1. Finden Sie die httpd.conf Datei (normalerweise in einem Verzeichnis conf, config oder ähnlich)<br> 2. Innerhalb der httpd.conf Datei aktivieren Sie die Zeile LoadModule rewrite_module modules\/mod_rewrite.so (entfernen Sie das # Zeichen vom Anfang der Zeile)<br> 3. Stellen Sie sicher, dass die Zeile ClearModuleList nicht auskommentiert ist, genauso wie die Zeile AddModule mod_rewrite.c. <\/pre>"
},
"microsoft-iis": {
@@ -104,7 +105,7 @@
}
},
"modRewriteHelp": {
"apache": "API Fehler: EspoCRM API nicht verfügbar<br>Mögliches Problem: deaktiviertes \"mod_rewrite\" des Apache Servers oder des .htaccess Supports.",
"apache": "API Fehler: EspoCRM API nicht verfügbar<br>Mögliches Problem: RewriteBase erforderlich, deaktiviertes \"mod_rewrite\" des Apache Servers oder des .htaccess Supports.",
"nginx": "API Error: EspoCRM API nicht verfügbar.<br>Fügen Sie diesen Code zu Nginx Host Config (innerhalb des \"server\" Blocks) hinzu:<br> <pre> {0} <\/pre>",
"microsoft-iis": "API Fehler: EspoCRM API nicht verfügbar<br>Mögliches Problem: deaktiviertes \"URL Rewrite\". Bitte überprüfen und aktivieren Sie das \"URL Rewrite\" Modul im IIS Server.",
"default": "API Fehler: EspoCRM API nicht verfügbar<br>Mögliches Problem: deaktiviertes Rewrite Modul. Bitte überprüfen und aktivieren Sie das Rewrite Modul (z.B. mod_rewrite im Apache Server) und die .htaccess Unterstützung."
+3 -2
View File
@@ -64,6 +64,7 @@
"Bad init Permission": "Permission denied for \"{*}\" directory. Please set 775 for \"{*}\" or just execute this command in the terminal <pre><b>{C}</b></pre>\n\tOperation not permitted? Try this one: {CSU}",
"Some errors occurred!": "Some errors occurred!",
"phpVersion": "Your PHP version is not supported by EspoCRM, please update to PHP {minVersion} at least",
"MySQLVersion": "Your MySQL version is not supported by EspoCRM, please update to MySQL {minVersion} at least",
"The PHP extension was not found...": "PHP Error: Extension <b>{extName}</b> is not found.",
"All Settings correct": "All Settings are correct",
"Failed to connect to database": "Failed to connect to database",
@@ -96,7 +97,7 @@
},
"modRewriteInstruction": {
"apache": {
"linux": "<br><br>To enable .htaccess support add/edit the Server configuration settings inside your &#60;VirtualHost&#62; section (httpd.conf):<pre>&#60;Directory /PATH_TO_ESPO/&#62;\n <b>AllowOverride All</b>\n&#60;/Directory&#62;</pre>\n Afterwards run this command in a Terminal:<pre><b>service apache2 restart</b></pre><br>To enable \"mod_rewrite\" run those commands in a Terminal:<pre><b>a2enmod rewrite <br>service apache2 restart</b></pre>",
"linux": "<br><br>To add the RewriteBase path, open a file {API_PATH}.htaccess and change the following line:<pre># RewriteBase /</pre>To<pre>RewriteBase {ESPO_PATH}{API_PATH}</pre><br>To enable .htaccess support add/edit the Server configuration settings inside your &#60;VirtualHost&#62; section (httpd.conf):<pre>&#60;Directory /PATH_TO_ESPO/&#62;\n <b>AllowOverride All</b>\n&#60;/Directory&#62;</pre>\n Afterwards run this command in a Terminal:<pre><b>service apache2 restart</b></pre><br>To enable \"mod_rewrite\" run those commands in a Terminal:<pre><b>a2enmod rewrite <br>service apache2 restart</b></pre>",
"windows": "<br> <pre>1. Find the httpd.conf file (usually you will find it in a folder called conf, config or something along those lines)<br>\n2. Inside the httpd.conf file uncomment the line LoadModule rewrite_module modules/mod_rewrite.so (remove the pound '#' sign from in front of the line)<br>\n3. Also find the line ClearModuleList is uncommented then find and make sure that the line AddModule mod_rewrite.c is not commented out.\n</pre>"
},
"microsoft-iis": {
@@ -104,7 +105,7 @@
}
},
"modRewriteHelp": {
"apache": "API Error: EspoCRM API unavailable.<br> Possible problems: disabled \"mod_rewrite\" in Apache server or .htaccess support.",
"apache": "API Error: EspoCRM API unavailable.<br> Possible problems: RewriteBase required, disabled \"mod_rewrite\" in Apache server or .htaccess support.",
"nginx": "API Error: EspoCRM API unavailable.<br> Add this code to your Nginx Host Config (inside \"server\" block):<br>\n<pre>\n{0}\n</pre>",
"microsoft-iis": "API Error: EspoCRM API unavailable.<br> Possible problem: disabled \"URL Rewrite\". Please check and enable \"URL Rewrite\" Module in IIS server",
"default": "API Error: EspoCRM API unavailable.<br> Possible problem: disabled Rewrite Module. Please check and enable Rewrite Module in your server (e.g. mod_rewrite in Apache) and .htaccess support."
+4 -3
View File
@@ -62,7 +62,8 @@
"messages": {
"Bad init Permission": "Permission denied for \"{*}\" directory. Please set 775 for \"{*}\" or just execute this command in the terminal <pre><b>{C}</b></pre>\n\tOperation not permitted? Try this one: {CSU}",
"Some errors occurred!": "Some errors occurred!",
"phpVersion": "PHP version should be >= {minVersion}",
"phpVersion": "Your PHP version is not supported by EspoCRM, please update to PHP {minVersion} at least",
"MySQLVersion": "Your MySQL version is not supported by EspoCRM, please update to MySQL {minVersion} at least",
"The PHP extension was not found...": "PHP Error: Extension <b>{extName}</b> is not found.",
"All Settings correct": "All Settings are correct",
"Failed to connect to database": "Failed to connect to database",
@@ -95,7 +96,7 @@
},
"modRewriteInstruction": {
"apache": {
"linux": "<br><br>To enable .htaccess support add/edit the Server configuration settings inside your &#60;VirtualHost&#62; section (httpd.conf):<pre>&#60;Directory /PATH_TO_ESPO/&#62;\n <b>AllowOverride All</b>\n&#60;/Directory&#62;</pre>\n Afterwards run this command in a Terminal:<pre><b>service apache2 restart</b></pre><br>To enable \"mod_rewrite\" run those commands in a Terminal:<pre><b>a2enmod rewrite <br>service apache2 restart</b></pre>",
"linux": "<br><br>To add the RewriteBase path, open a file {API_PATH}.htaccess and change the following line:<pre># RewriteBase /</pre>To<pre>RewriteBase {ESPO_PATH}{API_PATH}</pre><br>To enable .htaccess support add/edit the Server configuration settings inside your &#60;VirtualHost&#62; section (httpd.conf):<pre>&#60;Directory /PATH_TO_ESPO/&#62;\n <b>AllowOverride All</b>\n&#60;/Directory&#62;</pre>\n Afterwards run this command in a Terminal:<pre><b>service apache2 restart</b></pre><br>To enable \"mod_rewrite\" run those commands in a Terminal:<pre><b>a2enmod rewrite <br>service apache2 restart</b></pre>",
"windows": "<br> <pre>1. Find the httpd.conf file (usually you will find it in a folder called conf, config or something along those lines)<br>\n2. Inside the httpd.conf file uncomment the line LoadModule rewrite_module modules/mod_rewrite.so (remove the pound '#' sign from in front of the line)<br>\n3. Also find the line ClearModuleList is uncommented then find and make sure that the line AddModule mod_rewrite.c is not commented out.\n</pre>"
},
"microsoft-iis": {
@@ -103,7 +104,7 @@
}
},
"modRewriteHelp": {
"apache": "API Error: EspoCRM API unavailable.<br> Possible problems: disabled \"mod_rewrite\" in Apache server or .htaccess support.",
"apache": "API Error: EspoCRM API unavailable.<br> Possible problems: RewriteBase required, disabled \"mod_rewrite\" in Apache server or .htaccess support.",
"nginx": "API Error: EspoCRM API unavailable.<br> Add this code to your Nginx Host Config (inside \"server\" block):<br>\n<pre>\n{0}\n</pre>",
"microsoft-iis": "API Error: EspoCRM API unavailable.<br> Possible problem: disabled \"URL Rewrite\". Please check and enable \"URL Rewrite\" Module in IIS server",
"default": "API Error: EspoCRM API unavailable.<br> Possible problem: disabled Rewrite Module. Please check and enable Rewrite Module in your server (e.g. mod_rewrite in Apache) and .htaccess support."
+3 -2
View File
@@ -64,6 +64,7 @@
"Bad init Permission": "Permission denied for \"{*}\" directory. Please set 775 for \"{*}\" or just execute this command in the terminal <pre><b>{C}</b></pre>\n\tOperation not permitted? Try this one: {CSU}",
"Some errors occurred!": "Des erreurs se sont produites !",
"phpVersion": "Your PHP version is not supported by EspoCRM, please update to PHP {minVersion} at least",
"MySQLVersion": "Your MySQL version is not supported by EspoCRM, please update to MySQL {minVersion} at least",
"The PHP extension was not found...": "L'extension PHP <b>{extName}</b> est introuvable...",
"All Settings correct": "Les Paramètres sont corrects",
"Failed to connect to database": "Impossible de connecter la base de donnée",
@@ -96,7 +97,7 @@
},
"modRewriteInstruction": {
"apache": {
"linux": "<br><br>To enable .htaccess support add/edit the Server configuration settings inside your &#60;VirtualHost&#62; section (httpd.conf):<pre>&#60;Directory /PATH_TO_ESPO/&#62;\n <b>AllowOverride All</b>\n&#60;/Directory&#62;</pre>\n Afterwards run this command in a Terminal:<pre><b>service apache2 restart</b></pre><br>To enable \"mod_rewrite\" run those commands in a Terminal:<pre><b>a2enmod rewrite <br>service apache2 restart</b></pre>",
"linux": "<br><br>To add the RewriteBase path, open a file {API_PATH}.htaccess and change the following line:<pre># RewriteBase /</pre>To<pre>RewriteBase {ESPO_PATH}{API_PATH}</pre><br>To enable .htaccess support add/edit the Server configuration settings inside your &#60;VirtualHost&#62; section (httpd.conf):<pre>&#60;Directory /PATH_TO_ESPO/&#62;\n <b>AllowOverride All</b>\n&#60;/Directory&#62;</pre>\n Afterwards run this command in a Terminal:<pre><b>service apache2 restart</b></pre><br>To enable \"mod_rewrite\" run those commands in a Terminal:<pre><b>a2enmod rewrite <br>service apache2 restart</b></pre>",
"windows": "<br> <pre>1. Find the httpd.conf file (usually you will find it in a folder called conf, config or something along those lines)<br>\n2. Inside the httpd.conf file uncomment the line LoadModule rewrite_module modules/mod_rewrite.so (remove the pound '#' sign from in front of the line)<br>\n3. Also find the line ClearModuleList is uncommented then find and make sure that the line AddModule mod_rewrite.c is not commented out.\n</pre>"
},
"microsoft-iis": {
@@ -104,7 +105,7 @@
}
},
"modRewriteHelp": {
"apache": "API Error: EspoCRM API unavailable.<br> Possible problems: disabled \"mod_rewrite\" in Apache server or .htaccess support.",
"apache": "API Error: EspoCRM API unavailable.<br> Possible problems: RewriteBase required, disabled \"mod_rewrite\" in Apache server or .htaccess support.",
"nginx": "API Error: EspoCRM API unavailable.<br> Add this code to your Nginx Host Config (inside \"server\" block):<br>\n<pre>\n{0}\n</pre>",
"microsoft-iis": "API Error: EspoCRM API unavailable.<br> Possible problem: disabled \"URL Rewrite\". Please check and enable \"URL Rewrite\" Module in IIS server",
"default": "API Error: EspoCRM API unavailable.<br> Possible problem: disabled Rewrite Module. Please check and enable Rewrite Module in your server (e.g. mod_rewrite in Apache) and .htaccess support."
+3 -2
View File
@@ -64,6 +64,7 @@
"Bad init Permission": "Permission denied for \"{*}\" directory. Please set 775 for \"{*}\" or just execute this command in the terminal <pre><b>{C}</b></pre>\n\tOperation not permitted? Try this one: {CSU}",
"Some errors occurred!": "Er zijn fouten gevonden!",
"phpVersion": "Uw PHP versie wordt niet ondersteund door EspoCRM, u moet minimaal updaten naar PHP {minVersion}",
"MySQLVersion": "Uw MySQL versie wordt niet ondersteund door EspoCRM, u moet minimaal updaten naar MySQL {minVersion}",
"The PHP extension was not found...": "PHP Error: Extension <b>{extName}</b> is not found.",
"All Settings correct": "Alle Instellingen zijn juist",
"Failed to connect to database": "Kan geen verbinding maken met de database",
@@ -96,7 +97,7 @@
},
"modRewriteInstruction": {
"apache": {
"linux": "<br><br>To enable .htaccess support add/edit the Server configuration settings inside your &#60;VirtualHost&#62; section (httpd.conf):<pre>&#60;Directory /PATH_TO_ESPO/&#62;\n <b>AllowOverride All</b>\n&#60;/Directory&#62;</pre>\n Afterwards run this command in a Terminal:<pre><b>service apache2 restart</b></pre><br>To enable \"mod_rewrite\" run those commands in a Terminal:<pre><b>a2enmod rewrite <br>service apache2 restart</b></pre>",
"linux": "<br><br>To add the RewriteBase path, open a file {API_PATH}.htaccess and change the following line:<pre># RewriteBase /</pre>To<pre>RewriteBase {ESPO_PATH}{API_PATH}</pre><br>To enable .htaccess support add/edit the Server configuration settings inside your &#60;VirtualHost&#62; section (httpd.conf):<pre>&#60;Directory /PATH_TO_ESPO/&#62;\n <b>AllowOverride All</b>\n&#60;/Directory&#62;</pre>\n Afterwards run this command in a Terminal:<pre><b>service apache2 restart</b></pre><br>To enable \"mod_rewrite\" run those commands in a Terminal:<pre><b>a2enmod rewrite <br>service apache2 restart</b></pre>",
"windows": "<br> <pre>1. Find the httpd.conf file (usually you will find it in a folder called conf, config or something along those lines)<br>\n2. Inside the httpd.conf file uncomment the line LoadModule rewrite_module modules/mod_rewrite.so (remove the pound '#' sign from in front of the line)<br>\n3. Also find the line ClearModuleList is uncommented then find and make sure that the line AddModule mod_rewrite.c is not commented out.\n</pre>"
},
"microsoft-iis": {
@@ -104,7 +105,7 @@
}
},
"modRewriteHelp": {
"apache": "API Error: EspoCRM API niet beschikbaar.<br> Mogelijke Oorzaak: disabled \"mod_rewrite\" in Apache server of .htaccess ondersteuning.",
"apache": "API Error: EspoCRM API niet beschikbaar.<br> Mogelijke Oorzaak: RewriteBase vereist, disabled \"mod_rewrite\" in Apache server of .htaccess ondersteuning.",
"nginx": "API Error: EspoCRM API unavailable.<br> Add this code to your Nginx Host Config (inside \"server\" block):<br>\n<pre>\n{0}\n</pre>",
"microsoft-iis": "API Error: EspoCRM API niet beschikbaar.<br> Mogelijk probleem: disabled \"URL Rewrite\". Controleer en activeer \"URL Rewrite\" Module in IIS server",
"default": "API Error: EspoCRM API unavailable.<br> Possible problem: disabled Rewrite Module. Please check and enable Rewrite Module in your server (e.g. mod_rewrite in Apache) and .htaccess support."
+3 -2
View File
@@ -64,6 +64,7 @@
"Bad init Permission": "Permission denied for \"{*}\" directory. Please set 775 for \"{*}\" or just execute this command in the terminal <pre><b>{C}</b></pre>\n\tOperation not permitted? Try this one: {CSU}",
"Some errors occurred!": "Wystapiły błędy!",
"phpVersion": "Wersja PHP nie jest wspierana przez EspoCRM, proszę wykonać aktualizację do minimalnej wersji PHP {minVersion}",
"MySQLVersion": "Wersja MySQL nie jest wspierana przez EspoCRM, proszę wykonać aktualizację do minimalnej wersji MySQL {minVersion}",
"The PHP extension was not found...": "PHP Error: Extension <b>{extName}</b> is not found.",
"All Settings correct": "Wszystkie ustwienia są poprawne",
"Failed to connect to database": "Błąd połączenia z bazą danych",
@@ -96,7 +97,7 @@
},
"modRewriteInstruction": {
"apache": {
"linux": "<br><br>To enable .htaccess support add/edit the Server configuration settings inside your &#60;VirtualHost&#62; section (httpd.conf):<pre>&#60;Directory /PATH_TO_ESPO/&#62;\n <b>AllowOverride All</b>\n&#60;/Directory&#62;</pre>\n Afterwards run this command in a Terminal:<pre><b>service apache2 restart</b></pre><br>To enable \"mod_rewrite\" run those commands in a Terminal:<pre><b>a2enmod rewrite <br>service apache2 restart</b></pre>",
"linux": "<br><br>To add the RewriteBase path, open a file {API_PATH}.htaccess and change the following line:<pre># RewriteBase /</pre>To<pre>RewriteBase {ESPO_PATH}{API_PATH}</pre><br>To enable .htaccess support add/edit the Server configuration settings inside your &#60;VirtualHost&#62; section (httpd.conf):<pre>&#60;Directory /PATH_TO_ESPO/&#62;\n <b>AllowOverride All</b>\n&#60;/Directory&#62;</pre>\n Afterwards run this command in a Terminal:<pre><b>service apache2 restart</b></pre><br>To enable \"mod_rewrite\" run those commands in a Terminal:<pre><b>a2enmod rewrite <br>service apache2 restart</b></pre>",
"windows": "<br> <pre>1. Find the httpd.conf file (usually you will find it in a folder called conf, config or something along those lines)<br>\n2. Inside the httpd.conf file uncomment the line LoadModule rewrite_module modules/mod_rewrite.so (remove the pound '#' sign from in front of the line)<br>\n3. Also find the line ClearModuleList is uncommented then find and make sure that the line AddModule mod_rewrite.c is not commented out.\n</pre>"
},
"microsoft-iis": {
@@ -104,7 +105,7 @@
}
},
"modRewriteHelp": {
"apache": "Błąd API: API jest nie dostępne.<br> Pradwdopodobnie: wyłączyłeś \"mod_rewrite\" w serwerze Apache lub .htaccess.",
"apache": "Błąd API: API jest nie dostępne.<br> Pradwdopodobnie: wymagane RewriteBase, wyłączyłeś \"mod_rewrite\" w serwerze Apache lub .htaccess.",
"nginx": "API Error: EspoCRM API unavailable.<br> Add this code to your Nginx Host Config (inside \"server\" block):<br>\n<pre>\n{0}\n</pre>",
"microsoft-iis": "Błąd API: API jest nie dostepne.<br> Pradopodobnie: wyłączyłeś \"URL Rewrite\". Proszę sprawdź i włącz \"URL Rewrite\" Moduł w IIS serwer",
"default": "API Error: EspoCRM API unavailable.<br> Possible problem: disabled Rewrite Module. Please check and enable Rewrite Module in your server (e.g. mod_rewrite in Apache) and .htaccess support."
+3 -2
View File
@@ -64,6 +64,7 @@
"Bad init Permission": "Permission denied for \"{*}\" directory. Please set 775 for \"{*}\" or just execute this command in the terminal <pre><b>{C}</b></pre>\n\tOperation not permitted? Try this one: {CSU}",
"Some errors occurred!": "Am intampinat erori!",
"phpVersion": "Your PHP version is not supported by EspoCRM, please update to PHP {minVersion} at least",
"MySQLVersion": "Your MySQL version is not supported by EspoCRM, please update to MySQL {minVersion} at least",
"The PHP extension was not found...": "PHP Error: Extension <b>{extName}</b> is not found.",
"All Settings correct": "Toate setarile sunt corecte",
"Failed to connect to database": "Nu s-a reusit conectarea la Baza de Date",
@@ -96,7 +97,7 @@
},
"modRewriteInstruction": {
"apache": {
"linux": "<br><br>To enable .htaccess support add/edit the Server configuration settings inside your &#60;VirtualHost&#62; section (httpd.conf):<pre>&#60;Directory /PATH_TO_ESPO/&#62;\n <b>AllowOverride All</b>\n&#60;/Directory&#62;</pre>\n Afterwards run this command in a Terminal:<pre><b>service apache2 restart</b></pre><br>To enable \"mod_rewrite\" run those commands in a Terminal:<pre><b>a2enmod rewrite <br>service apache2 restart</b></pre>",
"linux": "<br><br>To add the RewriteBase path, open a file {API_PATH}.htaccess and change the following line:<pre># RewriteBase /</pre>To<pre>RewriteBase {ESPO_PATH}{API_PATH}</pre><br>To enable .htaccess support add/edit the Server configuration settings inside your &#60;VirtualHost&#62; section (httpd.conf):<pre>&#60;Directory /PATH_TO_ESPO/&#62;\n <b>AllowOverride All</b>\n&#60;/Directory&#62;</pre>\n Afterwards run this command in a Terminal:<pre><b>service apache2 restart</b></pre><br>To enable \"mod_rewrite\" run those commands in a Terminal:<pre><b>a2enmod rewrite <br>service apache2 restart</b></pre>",
"windows": "<br> <pre>1. Find the httpd.conf file (usually you will find it in a folder called conf, config or something along those lines)<br>\n2. Inside the httpd.conf file uncomment the line LoadModule rewrite_module modules/mod_rewrite.so (remove the pound '#' sign from in front of the line)<br>\n3. Also find the line ClearModuleList is uncommented then find and make sure that the line AddModule mod_rewrite.c is not commented out.\n</pre>"
},
"microsoft-iis": {
@@ -104,7 +105,7 @@
}
},
"modRewriteHelp": {
"apache": "Eroare API: API-ul EspoCRM nu este valabil.<br> Probleme posibile: este dezactivat \"mod_rewrite\" in server-ul Apache, sau in .htaccess.",
"apache": "Eroare API: API-ul EspoCRM nu este valabil.<br> Probleme posibile: RewriteBase necesar, este dezactivat \"mod_rewrite\" in server-ul Apache, sau in .htaccess.",
"nginx": "API Error: EspoCRM API unavailable.<br> Add this code to your Nginx Host Config (inside \"server\" block):<br>\n<pre>\n{0}\n</pre>",
"microsoft-iis": "Eroare API: API-ul EspoCRM nu este valabil.<br> Probleme posibile: este dezactivat \"URL Rewrite\". Verificati si activati modulul \"URL Rewrite\" in server-ul IIS",
"default": "API Error: EspoCRM API unavailable.<br> Possible problem: disabled Rewrite Module. Please check and enable Rewrite Module in your server (e.g. mod_rewrite in Apache) and .htaccess support."
+4 -3
View File
@@ -62,7 +62,8 @@
"messages": {
"Bad init Permission": "Permission denied for \"{*}\" directory. Please set 775 for \"{*}\" or just execute this command in the terminal <pre><b>{C}<\/b><\/pre>\n\tOperation not permitted? Try this one: {CSU}",
"Some errors occurred!": "Bazı hatalar oluştu!",
"Supported php version >=": "Desteklenen Php Sürümü >=",
"phpVersion": "Your PHP version is not supported by EspoCRM, please update to PHP {minVersion} at least",
"MySQLVersion": "Your MySQL version is not supported by EspoCRM, please update to MySQL {minVersion} at least",
"The PHP extension was not found...": "<b>{extName}<\/b> PHP eklentisi bulunamadı...",
"All Settings correct": "Tüm ayarlar doğru",
"Failed to connect to database": "Veritabanına bağlanma başarısız oldu",
@@ -95,7 +96,7 @@
},
"modRewriteInstruction": {
"apache": {
"linux": "<br><br>To enable .htaccess support add/edit the Server configuration settings inside your &#60;VirtualHost&#62; section (httpd.conf):<pre>&#60;Directory \/PATH_TO_ESPO\/&#62;\n <b>AllowOverride All<\/b>\n&#60;\/Directory&#62;<\/pre>\n Afterwards run this command in a Terminal:<pre><b>service apache2 restart<\/b><\/pre><br>To enable \"mod_rewrite\" run those commands in a Terminal:<pre><b>a2enmod rewrite <br>service apache2 restart<\/b><\/pre>",
"linux": "<br><br>To add the RewriteBase path, open a file {API_PATH}.htaccess and change the following line:<pre># RewriteBase /</pre>To<pre>RewriteBase {ESPO_PATH}{API_PATH}</pre><br>To enable .htaccess support add/edit the Server configuration settings inside your &#60;VirtualHost&#62; section (httpd.conf):<pre>&#60;Directory /PATH_TO_ESPO/&#62;\n <b>AllowOverride All</b>\n&#60;/Directory&#62;</pre>\n Afterwards run this command in a Terminal:<pre><b>service apache2 restart</b></pre><br>To enable \"mod_rewrite\" run those commands in a Terminal:<pre><b>a2enmod rewrite <br>service apache2 restart</b></pre>",
"windows": "<br> <pre>1. Find the httpd.conf file (usually you will find it in a folder called conf, config or something along those lines)<br>\n2. Inside the httpd.conf file uncomment the line LoadModule rewrite_module modules\/mod_rewrite.so (remove the pound '#' sign from in front of the line)<br>\n3. Also find the line ClearModuleList is uncommented then find and make sure that the line AddModule mod_rewrite.c is not commented out.\n<\/pre>"
},
"microsoft-iis": {
@@ -103,7 +104,7 @@
}
},
"modRewriteHelp": {
"apache": "API Error: EspoCRM API unavailable.<br> Possible problems: disabled \"mod_rewrite\" in Apache server or .htaccess support.",
"apache": "API Error: EspoCRM API unavailable.<br> Possible problems: RewriteBase required, disabled \"mod_rewrite\" in Apache server or .htaccess support.",
"nginx": "API Error: EspoCRM API unavailable.<br> Add this code to your Nginx Host Config (inside \"server\" block):<br>\n<pre>\n{0}\n</pre>",
"microsoft-iis": "API Error: EspoCRM API unavailable.<br> Possible problem: disabled \"URL Rewrite\". Please check and enable \"URL Rewrite\" Module in IIS server",
"default": "API Error: EspoCRM API unavailable.<br> Possible problem: disabled Rewrite Module. Please check and enable Rewrite Module in your server (e.g. mod_rewrite in Apache) and .htaccess support."
+3 -2
View File
@@ -64,6 +64,7 @@
"Bad init Permission": "Permission denied for \"{*}\" directory. Please set 775 for \"{*}\" or just execute this command in the terminal <pre><b>{C}</b></pre>\n\tOperation not permitted? Try this one: {CSU}",
"Some errors occurred!": "Đã có lỗi xảy ra!",
"phpVersion": "Your PHP version is not supported by EspoCRM, please update to PHP {minVersion} at least",
"MySQLVersion": "Your MySQL version is not supported by EspoCRM, please update to MySQL {minVersion} at least",
"The PHP extension was not found...": "Không tìm thấy phần mở rộng <b>{extName}</b> của PHP",
"All Settings correct": "cài đặt thành công",
"Failed to connect to database": "Không thể kết nối tới csdl",
@@ -96,7 +97,7 @@
},
"modRewriteInstruction": {
"apache": {
"linux": "<br><br>To enable .htaccess support add/edit the Server configuration settings inside your &#60;VirtualHost&#62; section (httpd.conf):<pre>&#60;Directory /PATH_TO_ESPO/&#62;\n <b>AllowOverride All</b>\n&#60;/Directory&#62;</pre>\n Afterwards run this command in a Terminal:<pre><b>service apache2 restart</b></pre><br>To enable \"mod_rewrite\" run those commands in a Terminal:<pre><b>a2enmod rewrite <br>service apache2 restart</b></pre>",
"linux": "<br><br>To add the RewriteBase path, open a file {API_PATH}.htaccess and change the following line:<pre># RewriteBase /</pre>To<pre>RewriteBase {ESPO_PATH}{API_PATH}</pre><br>To enable .htaccess support add/edit the Server configuration settings inside your &#60;VirtualHost&#62; section (httpd.conf):<pre>&#60;Directory /PATH_TO_ESPO/&#62;\n <b>AllowOverride All</b>\n&#60;/Directory&#62;</pre>\n Afterwards run this command in a Terminal:<pre><b>service apache2 restart</b></pre><br>To enable \"mod_rewrite\" run those commands in a Terminal:<pre><b>a2enmod rewrite <br>service apache2 restart</b></pre>",
"windows": "<br> <pre>1. Find the httpd.conf file (usually you will find it in a folder called conf, config or something along those lines)<br>\n2. Inside the httpd.conf file uncomment the line LoadModule rewrite_module modules/mod_rewrite.so (remove the pound '#' sign from in front of the line)<br>\n3. Also find the line ClearModuleList is uncommented then find and make sure that the line AddModule mod_rewrite.c is not commented out.\n</pre>"
},
"microsoft-iis": {
@@ -104,7 +105,7 @@
}
},
"modRewriteHelp": {
"apache": "API Error: EspoCRM API unavailable.<br> Possible problems: disabled \"mod_rewrite\" in Apache server or .htaccess support.",
"apache": "API Error: EspoCRM API unavailable.<br> Possible problems: RewriteBase required, disabled \"mod_rewrite\" in Apache server or .htaccess support.",
"nginx": "API Error: EspoCRM API unavailable.<br> Add this code to your Nginx Host Config (inside \"server\" block):<br>\n<pre>\n{0}\n</pre>",
"microsoft-iis": "API Error: EspoCRM API unavailable.<br> Possible problem: disabled \"URL Rewrite\". Please check and enable \"URL Rewrite\" Module in IIS server",
"default": "API Error: EspoCRM API unavailable.<br> Possible problem: disabled Rewrite Module. Please check and enable Rewrite Module in your server (e.g. mod_rewrite in Apache) and .htaccess support."
+1
View File
@@ -21,6 +21,7 @@
action: 'errors',
langs: {$langsJs},
modRewriteUrl: '{$modRewriteUrl}',
apiPath: '{$apiPath}',
serverType: '{$serverType}',
OS: '{$OS}'
}
+1
View File
@@ -48,6 +48,7 @@
action: 'step3',
langs: {$langsJs},
modRewriteUrl: '{$modRewriteUrl}',
apiPath: '{$apiPath}',
serverType: '{$serverType}',
OS: '{$OS}'
}
+1 -1
View File
@@ -98,6 +98,7 @@ switch ($action) {
case 'step3':
case 'errors':
$smarty->assign("apiPath", $systemHelper->getApiPath());
$modRewriteUrl = $systemHelper->getModRewriteUrl();
$smarty->assign("modRewriteUrl", $modRewriteUrl);
$serverType = $systemHelper->getServerType();
@@ -126,7 +127,6 @@ if (!empty($actionFile) && file_exists('install/'.$actionFile)) {
include $actionFile;
}
if (!empty($actionFile) && file_exists('install/core/tpl/'.$tplName)) {
ob_clean();
$smarty->display('index.tpl');
+26 -3
View File
@@ -35,6 +35,10 @@ var InstallScript = function(opt) {
this.modRewriteUrl = opt.modRewriteUrl;
}
if (typeof(opt.apiPath) !== 'undefined') {
this.apiPath = opt.apiPath.substr(1) + '/';
}
if (typeof(opt.serverType) !== 'undefined') {
this.serverType = opt.serverType;
}
@@ -369,6 +373,9 @@ InstallScript.prototype.checkSett = function(opt) {
if (typeof(errors.phpVersion) !== 'undefined') {
msg += self.getLang('phpVersion', 'messages').replace('{minVersion}', errors.phpVersion) + rowDelim;
}
if (typeof(errors.MySQLVersion) !== 'undefined') {
msg += self.getLang('MySQLVersion', 'messages').replace('{minVersion}', errors.MySQLVersion) + rowDelim;
}
if (typeof(errors.exts) !== 'undefined') {
var exts = errors.exts;
@@ -629,10 +636,12 @@ InstallScript.prototype.callbackModRewrite = function(data) {
this.checkAction(ajaxData);
return;
}
ajaxData.success = false;
if (typeof(this.langs) !== 'undefined') {
ajaxData.errorMsg = (typeof(this.langs['options']['modRewriteHelp'][this.serverType]) !== 'undefined')? this.langs['options']['modRewriteHelp'][this.serverType] : this.langs['options']['modRewriteHelp']['default'];
ajaxData.errorMsg += (typeof(this.langs['options']['modRewriteInstruction'][this.serverType]) !== 'undefined' && typeof(this.langs['options']['modRewriteInstruction'][this.serverType][this.OS]) !== 'undefined') ? this.langs['options']['modRewriteInstruction'][this.serverType][this.OS] : '';
ajaxData.errorMsg = ajaxData.errorMsg.replace("{ESPO_PATH}", this.getEspoPath(true)).replace("{API_PATH}", this.apiPath).replace("{API_PATH}", this.apiPath);
}
var realCheckIndex = this.checkIndex - 1;
if (typeof(this.checkActions[realCheckIndex]) != 'undefined'
@@ -666,10 +675,24 @@ InstallScript.prototype.callbackChecking = function(data) {
}
}
InstallScript.prototype.getEspoPath = function(onlyPath) {
onlyPath = typeof onlyPath !== 'undefined' ? onlyPath : false;
var location = window.location.href;
if (onlyPath) {
location = window.location.pathname;
}
location = location.replace(/install\/?/, '');
return location;
}
InstallScript.prototype.goToEspo = function() {
var loc = window.location.href;
loc = loc.replace(/install\/?/, '');
window.location.replace(loc);
var location = this.getEspoPath();
window.location.replace(location);
}
window.InstallScript = InstallScript;