Revigniter upgrade v1 to v2 problems / Handler: error in statement (rigLoadLibrary)

Are you using LiveCode to create server scripts or CGIs?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
istech
Posts: 194
Joined: Thu Sep 19, 2013 10:08 am

Revigniter upgrade v1 to v2 problems / Handler: error in statement (rigLoadLibrary)

Post by istech » Fri Nov 19, 2021 10:14 am

Hi All,

Once more into the fray with Revigniter :D. I do hope you all are doing well.

I have a Revigniter project which I have upgraded from version 1.10.3 to 2.3.1. The initial upgrade went well and everything was working fine until a couple of hours later when this error appeared. See below:

stack "/var/www/vhosts/example.com/httpdocs/system/revigniter/Common.livecodescript"
row 116, col 1: if-then: error in statement
row 116, col 1: if-then: error in statement
row 116, col 1: if-then: error in statement
row 105, col 1: Handler: error in statement (rigLoadLibrary)
file "/var/www/vhosts/example.com/httpdocs/system/application/config/constants.lc"
row 112, col 1: Handler: can't find handler (rigLoadLibrary)
file "/var/www/vhosts/example.com/httpdocs/system/application/config/config.lc"


Currently, I have been troubleshooting this error for a couple of hours and it appears to be a problem loading the "Hooks.livecodescript" from Revigniter.lc file.

I have already upgraded to the latest version of the Livecode Server engine "9.6.4". My understanding is this error has been known to come up when your engine version is less than v9. I was just wondering if someone has come across this error before or tips on the best way to troubleshoot it.

The server loads my .lc files fine so I know the setup of the Livecode Server works and have been running Revigniter v1 for a year with no problems.

Lastly, I'm not ruling out needing to make any changes to my htaccess file to accommodate running ".livecodescript" extensions or it being server security-related issue.

Any thoughts? I'll report back if I find a solution. Thanks all

Ralf Bitter
Posts: 21
Joined: Mon Aug 26, 2013 6:49 pm

Re: Revigniter upgrade v1 to v2 problems / Handler: error in statement (rigLoadLibrary)

Post by Ralf Bitter » Sun Nov 21, 2021 11:09 pm

I'm sorry to be so late in getting back to you. That's not really my style,
but obviously nothing is the way it used to be.

From the information you have provided I can hardly tell what the reason
for the issue is. So far I have had no problems loading the Hooks library.
I assume that you have followed the instructions for upgrading from
version 1.10.3 to 2.0.0.
It might be helpful to see the log. Could you please enable logging while
setting gConfig["logThreshold"] to 4? Then let’s see what’s in there.
Ralf

istech
Posts: 194
Joined: Thu Sep 19, 2013 10:08 am

Re: Revigniter upgrade v1 to v2 problems / Handler: error in statement (rigLoadLibrary)

Post by istech » Mon Nov 22, 2021 11:42 am

Hi Ralf ,

Thanks for your time.

Yes , I used the upgrade process from 1.10.3 to 2.0. I had previously set the logging level to 4 and nothing unusual for me in the logs. see attached. The only items in there are the info from the cron job I scheduled as the site is no longer loading so I presume no logs are being generated? I just get the error above which makes it very hard to diagnose the issue. Maybe It's worth noting I was playing with loading multiple stacks using Revigniter at the time. Maybe there could be an issue there?

In troubleshooting, I commented out this line below:

##
#------------------------------------------------------
# Load the Hooks library, loads the Config library too.
#------------------------------------------------------
##

#rigLoadLibrary "Hooks"


##
#------------------------------------------------------
# Is there a "preSystem" hook?
#------------------------------------------------------

After I comment out that line in Revigniter.lc the error message then changes to the inline error below.

file "/var/www/vhosts/example.com/httpdocs/system/application/config/constants.lc"
file "/var/www/vhosts/example.com/httpdocs/system/application/config/config.lc"

It's definitely something in the setup that is causing this error just trying to track it down is tough. I'm considering just loading the default revigniter files then begin to replace them one by one with my custom config files till I find the culprit. The strange thing is it was working fine for several hours after the update.
Attachments
log.zip
(556 Bytes) Downloaded 131 times

Ralf Bitter
Posts: 21
Joined: Mon Aug 26, 2013 6:49 pm

Re: Revigniter upgrade v1 to v2 problems / Handler: error in statement (rigLoadLibrary)

Post by Ralf Bitter » Mon Nov 22, 2021 2:04 pm

Hi istech,

thank you for the further information. It is very likely
that the fault is not yours. I will take care of this issue
immediately and get back to you when I know more.

Thanks first of all!
Ralf

Ralf Bitter
Posts: 21
Joined: Mon Aug 26, 2013 6:49 pm

Re: Revigniter upgrade v1 to v2 problems / Handler: error in statement (rigLoadLibrary)

Post by Ralf Bitter » Mon Nov 22, 2021 6:07 pm

Hi istech,

the issue is caused by an invalid log file permissions owner.
The owner of files, in this case log files, created while running
revIgniter as a web application may be different than the one
when loading controllers via the command-line interface.
This means that a log file created by a web app can not be written
by running controllers from CLI and vice versa. This yields the
error you described.

So, either remove the current log file (will be recreated), change
the owner of the file or disable logging.

Please let me know if this helps.


PS: Will add more information to the troubleshooting section of the
User Guide in this regard. So, thank you very much.
Ralf

istech
Posts: 194
Joined: Thu Sep 19, 2013 10:08 am

Re: Revigniter upgrade v1 to v2 problems / Handler: error in statement (rigLoadLibrary)

Post by istech » Mon Nov 22, 2021 9:01 pm

Wow thanks Raff, That was exactly it. Not sure I would have got that any time soon. Many thanks for your time and all the effort of all involved with Revigniter and the L.C Team. 8)

Post Reply

Return to “CGIs and the Server”