ElkArte Community

Project Support => General ElkArte discussions => Topic started by: Xarcell on May 27, 2013, 11:38:37 am

Title: Install: Language Directory Not Found
Post by: Xarcell on May 27, 2013, 11:38:37 am
I downloaded the zip from Github, and trying to install locally so I can check it out. I am considering contributing to the project. I am unable to install because I get this error:

QuoteA critical error has occurred.

This installer was unable to find the installer's language file or files. They should be found under:

/elkarte/install/themes/default/languages

When I visit: http://127.0.0.1:8080/elkarte/install/install.php
Title: Re: Install: Language Directory Not Found
Post by: emanuele on May 27, 2013, 12:33:54 pm
You don't have to run the install script from /elkarte/install.
What you have to do is pretty much what you do when preparing an install package for SMF: copy install.php, all the install_1.0_*.sql, Settings.php and Settings_bak.php to the root of your forum and run the installer from there. ;)
Title: Re: Install: Language Directory Not Found
Post by: Xarcell on May 27, 2013, 01:55:05 pm
When I copy the files over and visit: http://127.0.0.1:8080/elkarte/install.php

It says: "We've completed some initial tests on your server and everything appears to be in order. Simply click the "Continue" button below to get started."

I click continue.

It jumps to step 3, but URL says "http://127.0.0.1:8080/elkarte/install.php?step=0".

It says: "This is the name of the file in which to store the ELKARTE data. We recommend you use the randomly generated name for this and set the path of this file to be outside of the public area of your webserver."

So on a local install, I'm not sure where to put it. I leave what is suggested, and click "continue".

The URL then jumps to: "http://127.0.0.1:8080/elkarte/install.php?step=2"

Then I get this error at the top: "Warning: mysql_error() expects parameter 1 to be resource, null given in C:\Program Files (x86)\EasyPHP-12.1\www\elkarte\sources\database\Db-mysql.class.php on line 499"

And this error on the page: "Cannot connect to the database server with the supplied data."

I cannot get past this step.

Title: Re: Install: Language Directory Not Found
Post by: emanuele on May 27, 2013, 05:33:19 pm
Quote from: Xarcell – It says: "This is the name of the file in which to store the ELKARTE data. We recommend you use the randomly generated name for this and set the path of this file to be outside of the public area of your webserver."
That is the SQLite screen...

Quote from: Xarcell – Then I get this error at the top: "Warning: mysql_error() expects parameter 1 to be resource, null given in C:\Program Files (x86)\EasyPHP-12.1\www\elkarte\sources\database\Db-mysql.class.php on line 499"
And according to the previous message this is weird...

Norv, is SQLite
Title: Re: Install: Language Directory Not Found
Post by: TestMonkey on May 27, 2013, 06:21:49 pm
https://github.com/elkarte/Elkarte/blob/master/install/install.php#L2336
It doesn't initialize correctly the database name/type (it's empty, so it thinks it's file-based). Since it skipped step 2. (just posting on the run)
Title: Re: Install: Language Directory Not Found
Post by: Xarcell on May 27, 2013, 06:49:11 pm
I'm running MySQL, not S
Quote from: emanuele –
Quote from: Xarcell – It says: "This is the name of the file in which to store the ELKARTE data. We recommend you use the randomly generated name for this and set the path of this file to be outside of the public area of your webserver."
That is the SQLite screen...

Quote from: Xarcell – Then I get this error at the top: "Warning: mysql_error() expects parameter 1 to be resource, null given in C:\Program Files (x86)\EasyPHP-12.1\www\elkarte\sources\database\Db-mysql.class.php on line 499"
And according to the previous message this is weird...

Norv, is SQLite

I'm not running SQLite, just an FYI. I'm running EasyPHP 12.1, with Apache 2.4.1, MYSQL 5.5.27, and PHP 5.4.6.

Thanks.
Title: Re: Install: Language Directory Not Found
Post by: TestMonkey on May 27, 2013, 07:18:32 pm
Thank you, no worries, I saw that. Yes, the install script is clumsy when it doesn't have a clue what your db is (and it just skipped that step), and it suddenly hopes it's SQLite.
I'm not sure why it skipped through steps like that, though. I don't seem to replicate the issue.
Could you please tell, have you installed this setup with EasyPHP recently or do you have on it, other MySQL/PHP running? Is it working properly (it has MySQL support in PHP)? Just a thought.
Can you confirm, install.php, install_1-0_mysql.php, are both in the forum directory?
Do you have mod_security enabled?
Title: Re: Install: Language Directory Not Found
Post by: Xarcell on May 27, 2013, 08:45:28 pm
Quote from: TestMonkey – Thank you, no worries, I saw that. Yes, the install script is clumsy when it doesn't have a clue what your db is (and it just skipped that step), and it suddenly hopes it's SQLite.
I'm not sure why it skipped through steps like that, though. I don't seem to replicate the issue.
Could you please tell, have you installed this setup with EasyPHP recently or do you have on it, other MySQL/PHP running? Is it working properly (it has MySQL support in PHP)? Just a thought.
Can you confirm, install.php, install_1-0_mysql.php, are both in the forum directory?
Do you have mod_security enabled?

Yes, I have both the files in the forum directory.

No, I do not have mod_security installed. I basically have installed EASYPHP and that's it. I haven't changed any settings for it, it's just the default installation.
Title: Re: Install: Language Directory Not Found
Post by: TE on May 28, 2013, 02:51:21 am
I'm able to reproduce this, a quick'n dirty hack  :D
Code: (install.php) [Select]
if (count($incontext['supported_databases']) < 2)
replace with:
Code: [Select]
if (count($incontext['supported_databases']) < 0)
Sorry, I'm busy right now, can't post a valid fix..
Title: Re: Install: Language Directory Not Found
Post by: TE on May 28, 2013, 11:36:31 am
The bug was introduced with removing sqlite from the installer:
Code: [Select]
	if (!isset($incontext['supported_databases']['sqlite']))
echo '
var showAll = true;';

!isset: var showAll needs to be true for mysql and pgsql but not for sqlite
The current version from the repo sets var ShowAll to false if  there's only one database type supported;
Code: [Select]
	if (count($incontext['supported_databases']) < 2)
echo '
var showAll = false';

With the removal of sqlite from the core / installer it might be an option to simply remove the toggleDB() and just leave the checks for pgsql..
Norv?
Title: Re: Install: Language Directory Not Found
Post by: TestMonkey on May 28, 2013, 11:59:41 am
The simplest solution that works for both is better IMHO. Sounds good to me.
Title: Re: Install: Language Directory Not Found
Post by: TE on May 28, 2013, 02:41:29 pm
Xarcell, this error was fixed with PR #471, feel free to download the (updated) zip from Github  :)  There are several other fixes included, I'd recommend to replace all files with the new ones from the zip.
Title: Re: Install: Language Directory Not Found
Post by: Xarcell on May 30, 2013, 01:44:17 am
Thanks.