Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions

You are not logged in.

Announcement

#1 2014-09-23 00:14:59

devman
Member
Registered: 2014-09-20
Posts: 76

Automated-hosting install instructions

Hi,
Please clarify the follow part of the instructions.


9. This plugins limits functionality purely by time and purchased request number.
Setu this cronjob every 30 minits or so.
php cron.php -s site_admin -e instance -c cron/update_counter

Nginx log format for update view counter to work correctly.
log_format  main  '$remote_addr $http_host - [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

Make sure you have provided correct path to access log in settings.ini.php

10. Now make copy of installed lhc to another directory where all request for <lhc_name>.example.com will go.

11. Delete from copied folder extension/instance

11. All subdomains should be pointed to 9 directory.

Questions
1. Step 10 says to "make a copy of the installed lhc".  It is not clear where this should be.  I assume as a sibling to the current lhc install. Is that correct?
2. What should the name of the folder be and where is the name put in the settings?
3. What is the "9 directory" in the second step 11?  Should this be step 10?
4. Step 9 refers to nginx.  Can this be ignored if not using nginx or is nginx required for automated-hosting?
5. The second line of Step 9 has a couple spelling errors "Setup this cronjob every 30 minutes or so."

I'd be happy to help rewrite/clean up some of these instructions.

Thanks for your help.

Offline

#2 2014-09-23 04:53:33

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Automated-hosting install instructions

1. Let say you installed manager at
/var/www/manager so you just make a copy to
/var/www/clients all files from manager are copied here.
2. Did not understood your question here.
3. directory is https://github.com/LiveHelperChat/autom … oc.txt#L13
4. Yes you can use nginx or whatever you want.
5. You can just fork https://github.com/LiveHelperChat/automated-hosting, update documentation and create a pull request.

Offline

#3 2014-09-23 15:48:25

devman
Member
Registered: 2014-09-20
Posts: 76

Re: Automated-hosting install instructions

I am confused. In step "11. All subdomains should be pointed to 9 directory"  why would they be pointed to a log folder '/var/log/nginx/access_chat_manager_client.log',?

Wouldn't all the customer subdomains need to point to customer instance folder?

Last edited by devman (2014-09-23 16:26:11)

Offline

#4 2014-09-23 17:42:15

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Automated-hosting install instructions

Sorry,

1. Fixed typo it should tell point to 10 directory.
Also updated a little bit instructions. https://github.com/LiveHelperChat/autom … oc/doc.txt

Here is also folders structure i have
1411494351_structure.png

In this example I point directly to lhc_web folders so i can update easily with git also.

Offline

#5 2014-09-23 17:58:42

devman
Member
Registered: 2014-09-20
Posts: 76

Re: Automated-hosting install instructions

Following the instructions I ended up with

/var/www/html/lhc_web

/var/www/html/lhc_customer

I have the installation complete and have created an Instance. It does not appear that a new database was created.  When does that get created?

The Instance has the site admin url in the format 'http://subdomain.example.com/site_admin'.   I have the subdomains pointing to that directory (phpinfo.php works) but I am getting a 404 Not found.  I tried creating an .htaccess from the doc/http_conf_examples/.hstaccess.example.2  but still get a 404.  Any ideas?

Offline

#6 2014-09-23 18:08:32

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Automated-hosting install instructions

1. Instances are created by running this command from manager in your case being /var/www/html/lhc_web in folder
php cron.php -s site_admin -e instance -c cron/maintain

2. About that don't know. There is few examples of .htaccess try another one, perhaps .htaccess support is disabled in your part also.

Offline

#7 2014-09-23 18:14:04

devman
Member
Registered: 2014-09-20
Posts: 76

Re: Automated-hosting install instructions

From the log file it looks like it is trying to call the main site.  Is this correct?

"GET /site_admin HTTP/1.1" 404 518 "http://manager.example.com/index.php/si … nce/edit/1"

hover for full url

Last edited by devman (2014-09-23 18:31:07)

Offline

#8 2014-09-23 18:20:03

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Automated-hosting install instructions

Sorry I just don't know.
if you have created client with address "client"

So after database was crated it should be accessed using
http://client.example.com/index.php/site_admin/

Also if you are removing index.php read this, it's not removed by default.
http://livehelperchat.com/how-to-remove … -229a.html

Offline

#9 2014-09-23 18:23:42

devman
Member
Registered: 2014-09-20
Posts: 76

Re: Automated-hosting install instructions

Hmm...  I was not trying to remove index.php.  I was just clicking on the link shown in the Instance when editing.  The url generated is just http://client.example.com/site_admin.

The url is on the main data tab.  Second bullet to the right.

Bug?

Offline

#10 2014-09-23 18:24:33

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Automated-hosting install instructions

Perhaps. just try to access with index.php appended.

Offline

#11 2014-09-23 18:40:58

devman
Member
Registered: 2014-09-20
Posts: 76

Re: Automated-hosting install instructions

Found the issue.  There is an extra comma on line 91 of the instructions (end of line).  I did not notice it when I copied that section.  I have forked the instructions and have other edits to doc.txt. I will push them up as soon as I get this working. (You may want to change doc.txt to install.txt).

I ran the php cron.php and the database was created.

I am trying to log in but am getting incorrect username or password.  Are the credentials different for the subdomains?

Offline

#12 2014-09-23 18:42:16

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Automated-hosting install instructions

Credentials are mailed to instance admin during database creation . You can change them also from manager back office.

Offline

#13 2014-09-23 19:04:35

devman
Member
Registered: 2014-09-20
Posts: 76

Re: Automated-hosting install instructions

Ok.  Did not see that in the instructions.  I do not have mail set up yet.  Was able to change in manager site and log in.

Once logged in as the customer in the subdomain, I found Instance is on the menu.  Got the error below when I clicked on it.  In this case the customer is set up as Reseller.  Should Instance appear on the menu?  Can a Reseller create their own Instances??  if not what is Resller flag for?

1411499047_instanceerror.jpg

Offline

#14 2014-09-23 19:10:37

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Automated-hosting install instructions

Sorry, but something really not right there.
1. Client should not see Instances menu at all. And they should not have activated instace extension, for client there is instancecustomer extension. not Instance.
2. Clear cache from console to take effect after you active this extension. You have to be in client dir /var/www/html/lhc_customer
php cron.php -s site_admin -c cron/util/clear_cache
3. See my screenshot about folders structure where instancecustomer goes.

Try to create a free instance http://livehelperchat.com/order/now here and see yourself what client should see.

Offline

#15 2014-09-23 19:45:11

devman
Member
Registered: 2014-09-20
Posts: 76

Re: Automated-hosting install instructions

Apache appears to be pulling from the lhc_customer directory.  It is writing to the log files associated with it.

I did a Clean Cache from the manager site and customer site.

I restarted Apache.

I checked the lhextension_autoload.php in the customer site and it has the correct array pointing to /var/www/html/lhc_customer/extension/instancecustomer:
return array(   
    'erLhcoreClassModelInstance'          => 'extension/instancecustomer/classes/erlhcoreclassmodelinstance.php',
    'erLhcoreClassInstance'          => 'extension/instancecustomer/classes/erlhcoreclassinstance.php',
    'erLhcoreClassLazyDatabaseConfiguration' => 'extension/instancecustomer/classes/lhdb.php',
    'erLhcoreClassModelInstanceInvoice'      => 'extension/instancecustomer/classes/erlhcoreclassmodelinstanceinvoice.php'
       );

I cleared the cache with the php command in the lhc_customer folder.  This seemed to fix it.

The menu item Instance has now been replaced by Billing.  However when I click on Billing all I get is an empty screen.

Offline

#16 2014-09-23 19:48:00

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Automated-hosting install instructions

Now follow this.
http://livehelperchat.com/during-some-a … -215a.html

So far and so close at the same time smile

Offline

#17 2014-09-23 19:50:01

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Automated-hosting install instructions

Here is how my settings.ini.php looks like in clients folder

'seller_url' => 'http://livehelperchat.com',// Change to main site url
      'seller_domain' => 'livehelperchat.com',// Change to main site url
      'seller_mail' => '***.com', // Change mail
      'seller_title' => 'Live Help',	    // Change to your company title
      'seller_secret_hash' => 'random_text',  // Change to any random string
      'http_mode' => 'http://',
    		
    		'seller_paypal_mail' => '***.com',
    		// Left attribtues is button payment options right is options
    		// p -> period in days, r -> request number to sell
    		'seller_paypal_options' => array(
    				'250K'   => array('p' => 31,'r' => 25000000),
    				'1.5M'   => array('p' => 31,'r' => 150000000),
    				'3M' 	  => array('p' => 31,'r' => 300000000),
    				'1Month' => array('p' => 31,'r' => 0),
    		),
    		'seller_attributes' => "Remigijus Kiminas\nDarželio 31\nŠiauliai\nLithuania\***.com\nTax ID: 591583",
    		'seller_paypal_enabled' => false,

and database section looks like

'database' => 'lhc_manager',
'database_user_prefix' => 'lhc_manage_client_',

Offline

#18 2014-09-23 19:50:25

devman
Member
Registered: 2014-09-20
Posts: 76

Re: Automated-hosting install instructions

If I go to my manager domain  /order/now there is a Not Found.

Offline

#19 2014-09-23 19:52:27

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Automated-hosting install instructions

It's live helper chat address not instance manager. http://livehelperchat.com/order/now - if you decide to sell yourself you will have to make it your own, it just using automated hosting plugin API

devman wrote:

If I go to my manager domain  /order/now there is a Not Found.

Offline

#20 2014-09-23 20:03:47

devman
Member
Registered: 2014-09-20
Posts: 76

Re: Automated-hosting install instructions

remdex wrote:

Here is how my settings.ini.php looks like in clients folder

'seller_url' => 'http://livehelperchat.com',// Change to main site url
      'seller_domain' => 'livehelperchat.com',// Change to main site url
      'seller_mail' => '***.com', // Change mail
      'seller_title' => 'Live Help',	    // Change to your company title
      'seller_secret_hash' => 'random_text',  // Change to any random string
      'http_mode' => 'http://',
    		
    		'seller_paypal_mail' => '***.com',
    		// Left attribtues is button payment options right is options
    		// p -> period in days, r -> request number to sell
    		'seller_paypal_options' => array(
    				'250K'   => array('p' => 31,'r' => 25000000),
    				'1.5M'   => array('p' => 31,'r' => 150000000),
    				'3M' 	  => array('p' => 31,'r' => 300000000),
    				'1Month' => array('p' => 31,'r' => 0),
    		),
    		'seller_attributes' => "Remigijus Kiminas\nDarželio 31\nŠiauliai\nLithuania\***.com\nTax ID: 591583",
    		'seller_paypal_enabled' => false,

and database section looks like

'database' => 'lhc_manager',
'database_user_prefix' => 'lhc_manage_client_',


In my client settings after the seller_secret_hash I still have the  instance handler.  should this be removed?  I did  not see that in the instructions.

	'instance_handler' => 'erLhcoreClassInstanceDBMysql', // erLhcoreClassInstanceDBMysql - mysql, erLhcoreClassInstanceDBDirectAdmin - direct admin
	'access_log_path' => '/var/log/apache2/customer_access.log',
	'http_mode' => 'http://', // Set http:// or https://

Also you have a 'database' => 'lhc_manager', that I do not have.  There is no line in the setting for 'database'.

Edit: found the database => line in the array.

Last edited by devman (2014-09-23 20:05:44)

Offline

#21 2014-09-23 20:10:09

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Automated-hosting install instructions

it's ok to have instance_handler variable. In any case it's used only in manager.
as for 'database' => 'lhc_manager', this line. It's just same main database used for manager. Like according to tutorial you had to make a copy it should be the same as manager. And in general database part should identical to manager database part.

Offline

#22 2014-09-23 21:19:24

devman
Member
Registered: 2014-09-20
Posts: 76

Re: Automated-hosting install instructions

remdex wrote:

It's live helper chat address not instance manager. http://livehelperchat.com/order/now - if you decide to sell yourself you will have to make it your own, it just using automated hosting plugin API

devman wrote:

If I go to my manager domain  /order/now there is a Not Found.

That makes sense.

I tried the first api call to find a new instance.
The API Tutorial in the doc.txt says to use
http://manager.livehelperchat.com/insta … ewinstance

My manager site does not work with /instance/isfree/newinstance.  I have to use /index.php/instance/isfree/newinstance to return the work 'true'

Should the url without index.php be working?  or does doc.txt need to be updated?

Offline

#23 2014-09-23 21:36:21

devman
Member
Registered: 2014-09-20
Posts: 76

Re: Automated-hosting install instructions

remdex wrote:

Now follow this.
http://livehelperchat.com/during-some-a … -215a.html

So far and so close at the same time smile

Yes, so close....

Here is the output of the exception error from the billing page. seems to be pointing to lhconfig.php

Billing

Instances	0/999
Request left to sell	2147483647
Max request per instance	999999
Request left	999999
Expires	2015-03-27 20:32:28
E-mail	***.com
Exception Object
(
    [message:protected] => Setting with section {site} value {seller_paypal_enabled}
    [string:Exception:private] => 
    [code:protected] => 0
    [file:protected] => /var/www/html/lhc_customer/lib/core/lhconfig/lhconfig.php
    [line:protected] => 23
    [trace:Exception:private] => Array
        (
            [0] => Array
                (
                    [file] => /var/www/html/lhc_customer/extension/instancecustomer/design/instancecustomertheme/tpl/lhinstance/billing_paypal.tpl.php
                    [line] => 1
                    [function] => getSetting
                    [class] => erConfigClassLhConfig
                    [type] => ->
                    [args] => Array
                        (
                            [0] => site
                            [1] => seller_paypal_enabled
                        )

                )

            [1] => Array
                (
                    [file] => /var/www/html/lhc_customer/extension/instancecustomer/design/instancecustomertheme/tpl/lhinstance/billing.tpl.php
                    [line] => 35
                    [args] => Array
                        (
                            [0] => /var/www/html/lhc_customer/extension/instancecustomer/design/instancecustomertheme/tpl/lhinstance/billing_paypal.tpl.php
                        )

                    [function] => include
                )

            [2] => Array
                (
                    [file] => /var/www/html/lhc_customer/lib/core/lhtpl/tpl.php
                    [line] => 530
                    [args] => Array
                        (
                            [0] => /var/www/html/lhc_customer/extension/instancecustomer/design/instancecustomertheme/tpl/lhinstance/billing.tpl.php
                        )

                    [function] => include
                )

            [3] => Array
                (
                    [file] => /var/www/html/lhc_customer/lib/core/lhtpl/tpl.php
                    [line] => 505
                    [function] => fetchExecute
                    [class] => erLhcoreClassTemplate
                    [type] => ->
                    [args] => Array
                        (
                            [0] => /var/www/html/lhc_customer/extension/instancecustomer/design/instancecustomertheme/tpl/lhinstance/billing.tpl.php
                        )

                )

            [4] => Array
                (
                    [file] => /var/www/html/lhc_customer/extension/instancecustomer/modules/lhinstance/billing.php
                    [line] => 44
                    [function] => fetch
                    [class] => erLhcoreClassTemplate
                    [type] => ->
                    [args] => Array
                        (
                        )

                )

            [5] => Array
                (
                    [file] => /var/www/html/lhc_customer/lib/core/lhcore/lhmodule.php
                    [line] => 89
                    [args] => Array
                        (
                            [0] => /var/www/html/lhc_customer/extension/instancecustomer/modules/lhinstance/billing.php
                        )

                    [function] => include
                )

            [6] => Array
                (
                    [file] => /var/www/html/lhc_customer/lib/core/lhcore/lhmodule.php
                    [line] => 421
                    [function] => runModule
                    [class] => erLhcoreClassModule
                    [type] => ::
                    [args] => Array
                        (
                        )

                )

            [7] => Array
                (
                    [file] => /var/www/html/lhc_customer/index.php
                    [line] => 25
                    [function] => moduleInit
                    [class] => erLhcoreClassModule
                    [type] => ::
                    [args] => Array
                        (
                        )

                )

        )

    [previous:Exception:private] => 
)

Offline

#24 2014-09-23 23:45:23

devman
Member
Registered: 2014-09-20
Posts: 76

Re: Automated-hosting install instructions

Got the Billing page issue resolved.  Went through the setting.ini.php and found a syntax error from copying over text for paypal section.

There is still the issue with the link on the manager Instance page in edit mode showing the link to the instance with a /site_admin instead of /index.php/site_admin.
Similar situation with the api calls: they need to contain /index.php/ or don't return anything.  doc.txt may need to be udpated.

The last items I am trying to understand:
1. How does the Reseller feature work(so I know it is working correctly)?  Perhaps we can add something to the liverhelperchat.com documentation.
2. How an Instance is sold.  Time and http requests.  This also may be helpful in the documentation.

Should I start a new post with last two items?
I can also help write something once I understand it.

Offline

#25 2014-09-24 05:02:28

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Automated-hosting install instructions

1. As for link i wrote before just follow http://livehelperchat.com/how-to-remove … -229a.html
2. Then reseller logins to his instance he will see also list of his clients, and status box on left will show how many instances he has and how many request left to sell.
3. Instance is sold using API https://github.com/LiveHelperChat/autom … er_api.php

As for first one i will fix it in a day or two.

Offline

Board footer