Formbuilder "Unable to obtain lock for file"

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
antibart
Power Poster
Power Poster
Posts: 1155
Joined: Sun Aug 17, 2008 9:29 am

Formbuilder "Unable to obtain lock for file"

Post by antibart »

Hi there,

CMSMS 2.2.3.1
FB: 0.8.1.6
PHP 5.6.30-0+deb8u1
Server-Version: 10.0.30-MariaDB-0+deb8u2 - (Debian)

When using field "Write into a flat file" I'm getting following error report:

Error. Unable to obtain lock for file.

Debug mode says:

Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1

File directory as generated /var/user-id/my/file/directory/uploads
Directory and file rights: 777.

In older topics people solved it by clearing bad data from table cms_module_fb_flock or updating to PHP 5.6.

But I already use PHP 5.6 and I do not really know how to define "bad data". I only got some table or row attributes.

Tried hard to find out where this syntax error is produced. Usually it means to be:

- More closed parentheses than opened (do not really know)
- Using reserved words without `` (Couldn't find any)
- Obsolet commands (Couldn't find any)
- Missing data (do not really know)

Couldn't get it. Would be thankful for a hint or a solution.

Greetings
antibart
Power Poster
Power Poster
Posts: 1155
Joined: Sun Aug 17, 2008 9:29 am

Re: Formbuilder "Unable to obtain lock for file"

Post by antibart »

Using CMSMS 1.12.2. fixed it.

As I don't wanna call it a real solution, I better do not change the state of the topic to "solved". Maybe anybody will also have this problem and finds a proper way for CMSMS 2.x.
mr.bacan

Re: Formbuilder "Unable to obtain lock for file"

Post by mr.bacan »

Hello everyone, I'm having the same issue with FormBuilder. I started a fresh install with CMSMS 2.2.3.1 (didn't worked), then downgraded to 2.2.3. The form is working great until I add the "Write Results to Flat File" option, I then start getting this error
Sorry! There was an error handling your form submission.
Error. Unable to obtain lock for file.
Uploads Folder has a 777 permission setting. Looking at the server's error_log file the same line keeps appearing
[10-Oct-2017 11:06:24 America/Denver] PHP Notice: Undefined property: stdClass::$op in /home/public_html/mysite.com/tmp/templates_c/FormBuilder^b0659d02ad1b203aa3e41d342af5160056429a53_0.module_db_tpl.FormBuilder;fb_4.php on line 141
On that file the line 141 shows this
if ($_smarty_tpl->tpl_vars['entry']->value->input[(isset($_smarty_tpl->tpl_vars['__smarty_section_numloop']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_numloop']->value['index'] : null)]->op) {?>&nbsp;<?php echo $_smarty_tpl->tpl_vars['entry']->value->input[(isset($_smarty_tpl->tpl_vars['__smarty_section_numloop']->value['index']) ? $_smarty_tpl->tpl_vars['__smarty_section_numloop']->value['index'] : null)]->op;
Don't know what the error is ???

My CMSMS info is
Cms Version: 2.2.3

Installed Modules:

AdminSearch: 1.0.4
CMSContentManager: 1.1.6
CMSMailer: 6.2.14
CmsJobManager: 0.1.1
DesignManager: 1.1.3
FileManager: 1.6.4
FilePicker: 1.0.1
FormBuilder: 0.8.1.6
MenuManager: 1.50.3
MicroTiny: 2.2.1
ModuleManager: 2.1.2
Navigator: 1.0.8
News: 2.51.3
Search: 1.51.2


Config Information:

php_memory_limit:
max_upload_size: 16000000
url_rewriting: mod_rewrite
page_extension: .html
query_var: page
auto_alias_content: true
locale:
set_names: true
timezone: America/Panama
permissive_smarty: false


Php Information:

phpversion: 7.0.24
md5_function: On (True)
json_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_ALL: 32767
E_STRICT: 2048
E_DEPRECATED: 8192
test_file_timedifference: No time difference found
test_db_timedifference: No time difference found
create_dir_and_file: 1
memory_limit: 128M
max_execution_time: 60
register_globals: Off (False)
output_buffering: 4096
disable_functions:
open_basedir:
test_remote_url: Success
file_uploads: On (True)
post_max_size: 16M
upload_max_filesize: 16M
session_save_path: /tmp (0700)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
check_ini_set: On (True)
curl: On


Performance Information:

allow_browser_cache: On (True)
browser_cache_expiry: 60
php_opcache: On (True)
smarty_cache: Off (False)
smarty_compilecheck: Off (False)
auto_clear_cache_age: On (True)

Server Information:

Server Software: Apache
Server Api: litespeed
Server Os: Linux 2.6.32-673.26.1.lve1.4.27.el6.x86_64 On x86_64
Server Db Type: MySQL (mysqli)
Server Db Version: 10.0.32
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable


Permission Information:

tmp: /home/tuinvitacion/public_html/promobandelta.com/tmp (0755)
tmp_cache: /home/tuinvitacion/public_html/promobandelta.com/tmp/cache (0755)
templates_c: /home/tuinvitacion/public_html/promobandelta.com/tmp/templates_c (0755)
modules: /home/tuinvitacion/public_html/promobandelta.com/modules (0755)
uploads: /home/tuinvitacion/public_html/promobandelta.com/uploads (0755)
File Creation Mask (umask): /home/tuinvitacion/public_html/promobandelta.com/tmp/cache (0755)
config_file: 0444
Thanks in advance for any help on this.
mr.bacan

Re: Formbuilder "Unable to obtain lock for file"

Post by mr.bacan »

As antibart did I had to downgrade until I found a stable installation to work with FormBuilder. On CMSMS 2.1.6 it works great. I've tested it with PHP 5.6 - 7.0 and on different hosts and it doesn't break. So I'm assuming that there's a compatibility issue with the latest CMSMS versions. I'm no expert but that's what it seems.
Hupi
Forum Members
Forum Members
Posts: 16
Joined: Fri Dec 25, 2015 4:03 pm

Re: Formbuilder "Unable to obtain lock for file"

Post by Hupi »

Actually I run into the same issue.

There seams to be some kind of compatibility issue / bug / problem when using ...

CMSMS 2.2.3.1
Formbuilder 0.8.1.6
(Capcha 0.5.5)

... and you want to write the form data into a flat file.

It seams not to be a problem of the PHP version. I have it with 7.0.23 and 5.6.31 too.

I'am stuck on that too.

Maybe some Pro's could look into that to fix the issue ????
antibart
Power Poster
Power Poster
Posts: 1155
Joined: Sun Aug 17, 2008 9:29 am

Re: Formbuilder "Unable to obtain lock for file"

Post by antibart »

The problem is that in the newest CMSms Version the ADODB layer has been replaced with an own database class that doesn't "know" the attribute "sysTimeStamp".
But FormBuilder use this attribute.

xxxx
Last edited by Rolf on Sat Dec 02, 2017 3:57 pm, edited 1 time in total.
Reason: Please don't post code hacks, post a bugreport for the module developer in the Forge instead! This way the module get fixed for all users.
Locked

Return to “Modules/Add-Ons”