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

You are not logged in.

Announcement

#1 2014-11-17 17:05:16

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

Instance Billing page returns 302

I have our production server with automated hosting set up and 95% working.  When the Billing page (index.php/site_admin/instance/billing) within a client is clicked the page is not opened.  I can see that it is returning a 302.  I have been through the code but don't see why it is not finding it.

The server is setup with nginx and every other page appears to be working so far.

Any ideas?

Offline

#2 2014-11-17 17:07:46

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

Re: Instance Billing page returns 302

Hi,

1. Try to clear a cache.
2. Also you can try to setup debug output, perhaps there is some error etc. Really no idea smile
https://livehelperchat.com/during-some- … -215a.html

Offline

#3 2014-11-17 19:01:27

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

Re: Instance Billing page returns 302

remdex wrote:

Hi,

1. Try to clear a cache.
2. Also you can try to setup debug output, perhaps there is some error etc. Really no idea smile
https://livehelperchat.com/during-some- … -215a.html

Tried clearing cache (and turned it off) and turning on debug, but there are no errors.

I put a log statement in the each of the billing templates in /var/www/chatserver/lhc_customer/extension/instancecustomer/design/instancecustomertheme/tpl/lhinstance but nothing is getting logged.  This indicates something before the page is even loaded is causing the redirect.

It is curious this only happens to a page within the extension folder.  I checked the rights and they are the same as other files.

Is there a file that acts as a "router" to determine what gets loaded?

Any suggestions on where I could put some log statements before the template gets loaded?

Offline

#4 2014-11-17 19:41:20

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

Re: Instance Billing page returns 302

Well, you can try to just set exit in module file. So you will know is it template or some other error. Just echo exit; no other way...

Offline

#5 2014-11-17 22:58:20

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

Re: Instance Billing page returns 302

I got a bit further by debugging in nginx turned on but am still not sure what is happening.

The only thing I found that affects this is the 'modulecompile' => true, setting in the lhc_customer site settings.ini.php

When it is set to false, the only thing that appears on the page is the output of the billing.tpl.php and billing_paypal.php.  The title Billing and the 3 lines about requests left, expiration and email.  There is no header, menu, footer or anything else.  The browser debugger reports a 503 Service Temporarily Unavailable. 

When set to true, it just keeps redirecting to the default page as originally explained with nothing output from the billing php files.

My settings are currently

[== HTML ==]
      'templatecache' => false,
      'templatecompile' => false,
      'modulecompile' => false,
      'force_virtual_host' => true,

What settings besides modulecompile affects the compiling modules?

Why might it only affect files that are in the instance folders?

Any ideas are appreciated.
Thanks!

Offline

#6 2014-11-18 05:58:31

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

Re: Instance Billing page returns 302

Hi,

Try to setup debug output. Also check your error log
https://livehelperchat.com/during-some- … -215a.html

Offline

#7 2014-11-18 16:06:51

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

Re: Instance Billing page returns 302

The exception is on the Billing page but I am not sure why it would fail.

This is how it is now set in the settings.ini.php in the customer site: 'seller_paypal_enabled' => false.  Paypal is not being used.
Did not find anything unusual in the nginx error log (debug on).

Exception Object
(
    [message:protected] => Setting with section {site} value {seller_paypal_enabled}
    [string:Exception:private] => 
    [code:protected] => 0
    [file:protected] => /var/www/chatserver/lhc_customer/lib/core/lhconfig/lhconfig.php
    [line:protected] => 23
    [trace:Exception:private] => Array
        (
            [0] => Array
                (
                    [file] => /var/www/chatserver/lhc_customer/extension/instancecustomer/design/instancecustomertheme/tpl/lhinstance/billing_paypal.tpl.php
                    [line] => 2
                    [function] => getSetting
                    [class] => erConfigClassLhConfig
                    [type] => ->
                    [args] => Array
                        (
                            [0] => site
                            [1] => seller_paypal_enabled
                        )

                )

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

                    [function] => include
                )

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

                    [function] => include
                )

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

                )

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

                )

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

                    [function] => include
                )

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

                )

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

                )

        )

    [previous:Exception:private] => 
)

Last edited by devman (2014-11-18 16:22:29)

Offline

#8 2014-11-18 16:22:02

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

Re: Instance Billing page returns 302

Once I restarted nginx again it started working.

I realized what happened.  The instructions say that IF Paypal is being used to enter the settings in the ini file.  I was not using Paypal (I have integrated the Blesta billing system) so did not enter any of the Paypal lines into the settings.ini.php before copying it over to the customer site.

Apparently the 'seller_paypal_enabled' => false line is REQUIRED, not optional.  I think we need another instructions update. Are there any updates to the automated hosting in the works or should I make the update and do a pull request?

Offline

#9 2014-11-18 16:25:15

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

Re: Instance Billing page returns 302

You can just create a pull request and I merge smile

Offline

Board footer