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

You are not logged in.

Announcement

#1 2015-01-12 16:47:09

mkh
Member
Registered: 2015-01-12
Posts: 15

503 Service Temporarily Unavailable in client script

I am using version 2.13v (posrgresql) and it works without any problem on my local PC but on the server the client script doesn't load.
Here's the URL of the client widget:
index.php/chat/getstatus/(click)/internal/(position)/bottom_right/(ma)/br/(top)/350/(units)/pixels/(leaveamessage)/true

And I get this error when debug_output is enabled:

<pre>PDOException Object
(
    [message:protected] => SQLSTATE[42883]: Undefined function: 7 ERROR:  operator does not exist: boolean = integer
LINE 1: ...und FROM lh_departament WHERE online_hours_active = 1 AND st...
                                                             ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
    [string:Exception:private] => 
    [code:protected] => 42883
    [file:protected] => /var/www/livehelperchat/lib/core/lhchat/lhchat.php
    [line:protected] => 649
    [trace:Exception:private] => Array
        (
            [0] => Array
                (
                    [file] => /var/www/livehelperchat/lib/core/lhchat/lhchat.php
                    [line] => 649
                    [function] => execute
                    [class] => PDOStatement
                    [type] => ->
                    [args] => Array
                        (
                        )

                )

            [1] => Array
                (
                    [file] => /var/www/livehelperchat/design/defaulttheme/tpl/lhchat/getstatus/is_online_help.tpl.php
                    [line] => 6
                    [function] => isOnline
                    [class] => erLhcoreClassChat
                    [type] => ::
                    [args] => Array
                        (
                            [0] => 
                            [1] => 
                            [2] => Array
                                (
                                    [ignore_user_status] => 0
                                    [online_timeout] => 300
                                )

                        )

                )

            [2] => Array
                (
                    [file] => /var/www/livehelperchat/design/defaulttheme/tpl/lhchat/getstatus.tpl.php
                    [line] => 86
                    [args] => Array
                        (
                            [0] => /var/www/livehelperchat/design/defaulttheme/tpl/lhchat/getstatus/is_online_help.tpl.php
                        )

                    [function] => include
                )

            [3] => Array
                (
                    [file] => /var/www/livehelperchat/lib/core/lhtpl/tpl.php
                    [line] => 530
                    [args] => Array
                        (
                            [0] => /var/www/livehelperchat/design/defaulttheme/tpl/lhchat/getstatus.tpl.php
                        )

                    [function] => include
                )

            [4] => Array
                (
                    [file] => /var/www/livehelperchat/lib/core/lhtpl/tpl.php
                    [line] => 505
                    [function] => fetchExecute
                    [class] => erLhcoreClassTemplate
                    [type] => ->
                    [args] => Array
                        (
                            [0] => /var/www/livehelperchat/design/defaulttheme/tpl/lhchat/getstatus.tpl.php
                        )

                )

            [5] => Array
                (
                    [file] => /var/www/livehelperchat/modules/lhchat/getstatus.php
                    [line] => 92
                    [function] => fetch
                    [class] => erLhcoreClassTemplate
                    [type] => ->
                    [args] => Array
                        (
                        )

                )

            [6] => Array
                (
                    [file] => /var/www/livehelperchat/lib/core/lhcore/lhmodule.php
                    [line] => 89
                    [args] => Array
                        (
                            [0] => /var/www/livehelperchat/modules/lhchat/getstatus.php
                        )

                    [function] => include
                )

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

                )

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

                )

        )

    [previous:Exception:private] => 
    [errorInfo] => Array
        (
            [0] => 42883
            [1] => 7
            [2] => ERROR:  operator does not exist: boolean = integer
LINE 1: ...und FROM lh_departament WHERE online_hours_active = 1 AND st...
                                                             ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
        )

)
</pre>

Offline

#2 2015-01-13 07:06:00

mkh
Member
Registered: 2015-01-12
Posts: 15

Re: 503 Service Temporarily Unavailable in client script

Found it! This happens when no operator is online.

Offline

#3 2015-01-14 08:08:31

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

Re: 503 Service Temporarily Unavailable in client script

Thanks, for report will be fixed in postgresql branch. Just postgresql mutch more strict regarding datatypes.

Offline

#4 2015-01-14 08:44:00

mkh
Member
Registered: 2015-01-12
Posts: 15

Re: 503 Service Temporarily Unavailable in client script

It's great that LHC has support for PostgreSQL. Only a few scripts I know that have support for that. I'm using PostgreSQL for many years and it is really super fast.

But the PostgreSQL version of the script seems buggy and out dated as you mentioned. I just wonder why individual branch for that? A connection driver must be enough to add support for PostgreSQL.

Last edited by mkh (2015-01-14 08:44:26)

Offline

#5 2015-01-14 08:46:43

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

Re: 503 Service Temporarily Unavailable in client script

Just because pos files are different for postgresql and there is sequences in postgresql and database driver is postgresql.
In any case i try to update postgresql branch in the  weekend. This error you get is very simple to fix. Just need update PDO queries. If you find more errors like this let me know smile
After SQL fixes it will be same solid as master branch.

Offline

#6 2015-01-14 08:52:20

mkh
Member
Registered: 2015-01-12
Posts: 15

Re: 503 Service Temporarily Unavailable in client script

Good, I'll wait for the update.

What about database? Is there any upgrade procedure?

Offline

#7 2015-01-14 08:57:10

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

Re: 503 Service Temporarily Unavailable in client script

At the moment just manual (following update_db folder). Just very little amount of PostgreSQL users, actually you are the first one writing regarding PostgreSQL support smile
Basically for database update
1. Before pull origin postgresql you take a look at your installation lhc_web/doc/update_db folder and write down the last update number
2. Then do git pull origin postgresql, and just manually execute new update sql queries, if some does not work you just rewrite them in postgresql syntax.

That's the database update workflow at the moment for postgresql.

Offline

#8 2015-01-14 09:25:07

mkh
Member
Registered: 2015-01-12
Posts: 15

Re: 503 Service Temporarily Unavailable in client script

It's okay, I'll try it.

Offline

#9 2015-01-18 19:53:51

mkh
Member
Registered: 2015-01-12
Posts: 15

Re: 503 Service Temporarily Unavailable in client script

Hi,

Any progress on updating postgresql branch?
Actually I'm experiencing some issues which I'm not sure they exist on the master branch.

Offline

#10 2015-01-18 19:56:12

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

Re: 503 Service Temporarily Unavailable in client script

Sorry,

Not enough time to look today on PostgreSQL branch will have to wait a little more.

Also you can do some updates and just create a pull request. I'm the only person behind a project, and sometimes it's really not enough hours in a day to take care of everything.

Offline

#11 2015-01-19 04:06:34

mkh
Member
Registered: 2015-01-12
Posts: 15

Re: 503 Service Temporarily Unavailable in client script

Understand. I just can't ignore PostgreSQL.

So let me know which parts can be updated directly from the master.

Offline

#12 2015-01-19 07:06:57

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

Re: 503 Service Temporarily Unavailable in client script

Completely all.

1. Usually i do git pull origin master
2. Then if there are new tables i update pos files.
3. Update default datatabase templates.

Basically that's all.

As for you error i think database template need to change field type from boolean to int just.

Offline

#13 2015-01-19 21:23:17

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

Re: 503 Service Temporarily Unavailable in client script

Ok,

I have updated postgresql branch to latest version. You can try to play around, but i think there will be some more issues.
So just report them in github and i fix them ASAP smile

Offline

#14 2015-01-20 03:51:04

mkh
Member
Registered: 2015-01-12
Posts: 15

Re: 503 Service Temporarily Unavailable in client script

Thanks for the update!
But after update it didn't work any more. A long time loading and then a blank page, some thing like a timeout.

So I turned on errors and debug_output but no error/message. I also turned off the cache but no chance. I tracked the codes and discovered that it is trying to connect to database using mysql driver. I think some files need to be excluded when updating but I am not familiar with LHC code structure. Here's the error:

PHP Fatal error:  Maximum execution time of 30 seconds exceeded in "ezcomponents\Database\src\handler.php" on line 88

Update: There must be an option in settings.ini to declare the db driver but I couldn't find.

Last edited by mkh (2015-01-20 03:57:02)

Offline

#15 2015-01-20 05:50:15

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

Re: 503 Service Temporarily Unavailable in client script

Hi,

I think you messed up something. In general what i suggest just try to download fresh new postgresql branch and install according to postgresql tutorial

If you just override all your files manualy from master files that's wrong way to do it. Also see postgresql install file for changes.

On my local enviroment all works so it's only your issues this time.

Offline

#16 2015-01-20 06:29:06

mkh
Member
Registered: 2015-01-12
Posts: 15

Re: 503 Service Temporarily Unavailable in client script

Okay, I did installed a fresh copy of the postgresql branch. So I have some new issues:

- None of links in the "System Config / Embed Code" works properly (incomplete page load).
- I have a 503 HTTP error on this URL: "index.php/site_admin/chat/syncadmininterface".

Offline

#17 2015-01-20 06:32:11

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

Re: 503 Service Temporarily Unavailable in client script

I need errors not words like does not work, these does not help at all smile

Offline

#18 2015-01-20 06:51:14

mkh
Member
Registered: 2015-01-12
Posts: 15

Re: 503 Service Temporarily Unavailable in client script

For the first issue I get no error, nor debug output. Suppressing error signs (***) in the code make it hard to debug and since I am not aware of the program logic, I can not go further.

The second error says: "Undefined column: 7 ERROR:  column lh_chat.user_closed_ts does not exist".

I am just wondering how that works for you!

Offline

#19 2015-01-20 07:13:21

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

Re: 503 Service Temporarily Unavailable in client script

This columns exists in install SQL
https://github.com/LiveHelperChat/liveh … l.sql#L188

I ques you updated files, but missed to see what changes were done on DB itself.

Also see what changes I did yesterday
https://github.com/LiveHelperChat/liveh … 62f6d7826f

Offline

#20 2015-02-02 04:35:25

lybuneiv
Member
Registered: 2015-02-02
Posts: 3

Re: 503 Service Temporarily Unavailable in client script

can u give me link github to download postgresql branch? i just install https://codeload.github.com/LiveHelperC … postgresql but it still error  503 Service Temporarily Unavailable when no operator online. sad

Last edited by lybuneiv (2015-02-02 04:40:17)

Offline

#21 2015-02-02 06:07:26

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

Re: 503 Service Temporarily Unavailable in client script

Offline

#22 2015-02-05 07:57:59

lybuneiv
Member
Registered: 2015-02-02
Posts: 3

Re: 503 Service Temporarily Unavailable in client script

i already install new livechat postgresql branch but i still get error  503 Service Temporarily Unavailable when i generate script from admin and past to my website and no operator online. how can i fix it? sad

Offline

#23 2015-02-05 07:58:53

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

Re: 503 Service Temporarily Unavailable in client script

Offline

#24 2015-02-06 04:26:06

lybuneiv
Member
Registered: 2015-02-02
Posts: 3

Re: 503 Service Temporarily Unavailable in client script

OK! thank now i can fix it already. smile

Offline

#25 2015-03-24 15:40:23

Zhadnost
Member
Registered: 2015-03-24
Posts: 1

Re: 503 Service Temporarily Unavailable in client script

I get the same error as the OP using postgresql (oddly it was working, then it just stopped).

The error message does make a salient point though, online_hours_active is a boolean not an integer.

Looking at doc/update_db and doc/postgresql/postgresql.sql it looks like this was supposed to be changed into an integer at some point and didn't happen.

Offline

Board footer