SyntaxError: missing ; before statement

Issue #318 resolved
Terrill Bennett created an issue

phpLiteAdmin v1.9.7.1

SQL Tab: Errors in both Chrome (v 57.0.2987.110) and Firefox (v 52.0.2) when attempting to move field names into SQL statement.

Firefox Reports: "SyntaxError: missing ; before statement"

Chrome Reports: "Uncaught SyntaxError: Unexpected identifier"

Both: open to "unction initAutoincrement()" in JavaScript. Note: that's "unction" not "function" although in the actual Javascript we read "function initAutoincrement()".

firefoxError.png

chromeError.png

Comments (4)

  1. phpLiteAdmin repo owner

    Have you modified the phpliteadmin.php file in any way? I suspect that you opened it with a text editor that automatically converted linebreaks and thus, the locations of the embedded resources in the file changed. The js is embedded into the phpliteadmin.php file (at the bottom). The js starts in line 5761 in 1.9.7.1. In line 5748, the offsets between the end of the php part (__halt_compiler() ?> in line 5760) and the ressources is stored. The offset ist 4047 bytes for the js resource. It seems one byte has been removed in your file somewhere in line 5760. I guess some text editor has converted the CR+LF into LF (unix style) or CR (mac style). Or maybe you changed something in the CSS in line 5760?

    Best thing to do is: Don't change phpliteadmin.php at all. To change the configuration, use the phpliteadmin.config.php file as described in the wiki. If you want to change the css, create a theme based on the default theme and put it into phpliteadmin.css, which will overwrite the default theme.

    If you want to really change the code of phpLiteAdmin, better don't use the onefile-version from the zip-releases at all, but clone / download the files from our git repository.

  2. Terrill Bennett reporter

    I did, in fact, edit phpliteadmin.php (added a comment so other admins would know who "installed" the utility). Unzipped a fresh copy, edited with vim instead of Textpad) and it works like a champ.

    Resolving the issue. THANKS for the quick reply!

  3. Log in to comment