Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to install in a private server #81

Open
xhqiao89 opened this issue Aug 14, 2017 · 14 comments
Open

How to install in a private server #81

xhqiao89 opened this issue Aug 14, 2017 · 14 comments
Labels

Comments

@xhqiao89
Copy link
Contributor

tengu8740[CodePlex]
Hi,
I'm tryng to install in internal host with LAMP HydroServer Lite 3 but client/setup doesn't exists.

The Mysql DB is ready with the table created with sql batch.
Is a different config procedure with HIS3 ?

thanks.
Alex

@xhqiao89
Copy link
Contributor Author

tengu8740[CodePlex]
Ok now i find the problem
in application/core/MY_controller there is the include of language_helper; this control each page loaded and each time that it run is called $lang=processLang();

This function in language_helper is used to refresh the languages file under application/language ; if the difference between creation and nowtime is greater 4 h is called the function createNew($language) ( previously patched with return; )
Now i set the control

if($time_lapse = '240000.0'){
createNew($language);
}

@xhqiao89
Copy link
Contributor Author

tengu8740[CodePlex]
Hi
It's normal that a user with Admin Authority not view the other Admin users? I see in model of moss_user that retries only the users with authority lower than the user that call the function.
If i inserted some other Admin user how can i delete the user if i don't see in the section User?

I changed in line 46 of application/models/user.php
if($authAccess==2)
{

// $this-db-or_where('authority','teacher');
$this-db-or_where('authority like ','%');
}

Now i see all the user me too.

Alex

@xhqiao89
Copy link
Contributor Author

tengu8740[CodePlex]
Thanks xenomorph1030
I'm old programmer.. I know PHP but i don't like MVC frameworks ... i'm putting right now
I've downloaded servelite to try install the server in a local network that is behind an agency firewall.
I think that the downloading from BYU server made done in initial installation/configuration step.
Another question ... how can can update translation db in BYU ?
Alex

@xhqiao89
Copy link
Contributor Author

jirikadlec2[CodePlex]
Thank you xenomorph1030 for the patch.
I think we have a problem with the language translations. The external database is a language translation database on a BYU server with website texts translated to different languages. Some other users have also reported problems with connecting
to the external language translation database. we'll try to find a better solution for updating the translations.

@xhqiao89
Copy link
Contributor Author

xenomorph1030[CodePlex]
Hey Alex. No worries. Code Igniter is easy in my opinion. The models are what should be working with information from the database (retrieving, normalizing, etc). However, the database information directly in the model is unconventional and possibly something
left over.

It looks like the point of that function was to get data from an external source. If it actually retrieved data, it would update your language files depending on the TTL (time to live). What instead happened was a 20 second timeout and no idea why because of
the error suppression.

Glad it is working now and hopefully the team will patch that in a future release.

@xhqiao89
Copy link
Contributor Author

tengu8740[CodePlex]
Hi xenomorph1030
I patched the server with your suggest and now works; i'm not an Code Igniter expert so i don't understand the use of language model to create the languages files.
Thanks Alex

@xhqiao89
Copy link
Contributor Author

xenomorph1030[CodePlex]
I fixed my issue which might be yours. In the language model (application/models/language.php), it is attempting to connect to an outside MySQL database. The real problem is the use of @ which suppresses any errors. It would have been obvious what the
issue was had that not been there.

Anyway, I fixed it by changing the language helper (application/helpers/language_helper.php). In the function createNew, I added as the first line: return;

It was the easiest way to bypass the connection attempt. Hope this helps.

@xhqiao89
Copy link
Contributor Author

xenomorph1030[CodePlex]
There is definitely something odd going on. With a fresh install, it takes a page over 20 seconds to load on my local system with a local database.

My guess is something added to Code Igniter. I use it all the time and haven't had performance issues.

@xhqiao89
Copy link
Contributor Author

tengu8740[CodePlex]
I suppose that is a Code Igniter problem; at staring time the response of webserver is normal but a day after the time response is high.

I tried by modifying index.php with define('ENVIRONMENT', 'production'); but never change.
i'm using Linux

Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty
Server version: Apache/2.4.7 (Ubuntu)
Server built: Mar 10 2015 13:05:59

PHP 5.5.9-1ubuntu4.6 (cli) (built: Feb 13 2015 19:17:11)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans

@xhqiao89
Copy link
Contributor Author

xenomorph1030[CodePlex]
That answers my question if the webserver was the issue. The response is also very slow on IIS 8.5.

@xhqiao89
Copy link
Contributor Author

tengu8740[CodePlex]
Ok now is working but the response is too slow.
After installation the time response from Apache is ok but after a day the response is too slow.

@xhqiao89
Copy link
Contributor Author

jirikadlec2[CodePlex]
Hello!
Here are the commands how you can install HydroServer Lite 3.0 on a private Linux Server. I've tested it on Ubuntu 14.04 using the following commands in the terminal:
install lamp
sudo apt-get install lamp-server^
in the LAMP installation you'll be asked to enter a password for mysql root user. remember this password.
install php5-mcrypt
sudo apt-get install php5-mcrypt
sudo php5enmod mcrypt sudo service apache2 restart
get the latest HydroServer Lite Files
sudo apt-get install git
git clone https://git.codeplex.com/hydroserverlite ~/hydroserverlite
sudo mv ~/hydroserverlite /var/www/html/hydroserverlite
setup the MySQL Database (instead of ROOT_PASSWORD use your real mysql root password!)
mysql --user=root --password=ROOT_PASSWORD --execute=CREATE DATABASE hydrodb;
mysql --user=root --password=ROOT_PASSWORD --execute=CREATE USER 'hydrouser'@'localhost' identified by 'mypass';
mysql --user=root --password=ROOT_PASSWORD --execute=grant all on hydrodb.* to hydrouser@localhost idendified by 'mypass';
setup the HydroServer file permissions
cd /var/www/html/hydroserverlite
sudo chmod -R 777 application/config/installations
sudo chmod -R 777 application/language
sudo chmod -R 777 uploads
create the default installation file: replace the mysql username, mysql db name, and mysql password.
sudo sed -i 's/YOUR_DATABASE_USER_NAME/hydrouser/' sample_installation_file.txt
sudo sed -i 's/YOUR_MYSQL_DATABASE_NAME/hydrodb/' sample_installation_file.txt
sudo sed -i 's/YOUR_MYSQL_DATABASE_PASSWORD/mypass/' sample_installation_file.txt
sudo mv sample_installation_file.txt default.php
now open the Firefox browser. In firefox, go to:
http://localhost/hydroserverlite/index.php/default/home/installation
enter the new HydroServer password for the user his_admin. For example you can use his_password.
Select Setup Type: Basic
Set Use default database connection? to Yes
Set the Website Path to hydrodb.
Set the Language Code to English, and enter the Organization's name, Parent Website's name, and Parent Website.
Enter the Variable Code, Time Support, and UTCOffset.
Click Save Settings.
YOUR Private Linux HydroServer installation is complete!

@xhqiao89
Copy link
Contributor Author

tengu8740[CodePlex]
Not at all!
I've downloaded the 2.2 version and the setup/client is now found.
Thanks Alex

@xhqiao89
Copy link
Contributor Author

1019Fowler[CodePlex]
Thank you for downloading the recent version, we're working on the solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant