[Solved] Mythweb Error on CentOS 6

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

kbocek
Senior
Posts: 201
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

[Solved] Mythweb Error on CentOS 6

Post by kbocek »

I upgraded from .27 to 29.1 and am getting this error in Mythweb when I try to use the configuration tool:

Code: Select all

    datetime:  2019-05-22 09:54:47 (PDT)
    errornum:  256
  error type:  User Error
error string:  !!NoTrans: SQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+found' at line 1 [#1064]!!
    filename:  /var/www/html/mythweb/classes/Database/Query/mysqlicompat.php
  error line:  98
Does anyone have any ideas? Thanks.
Last edited by kbocek on Tue May 28, 2019 3:16 pm, edited 1 time in total.
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Mythweb Error

Post by bill6502 »

Hi,

Please mention a specific page, e.g. .../mythweb/settings/mythtv . I
clicked on all six and they display fine.

Also, you've upgraded mythweb to v29 too right (have to ask.)
kbocek
Senior
Posts: 201
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

Re: Mythweb Error

Post by kbocek »

The page is http://myserver/mythweb/settings/database:

Code: Select all

    datetime:  2019-05-26 08:44:07 (PDT)
    errornum:  256
  error type:  User Error
error string:  !!NoTrans: SQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+found' at line 1 [#1064]!!
    filename:  /var/www/html/mythweb/classes/Database/Query/mysqlicompat.php
  error line:  98
Yes, Mythweb is 29.1:

Code: Select all

$ rpm -q mythweb
mythweb-29.1-2.el6.noarch
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Mythweb Error

Post by bill6502 »

That page works for me too. But I'm a *buntu user and on v31-Pre.

I suggest editing the Subject line in your initial post and adding your
distribution name (to see if anyone else picks up on it.)

If there's more to the error above, it may help. The filename above:
var/www/html/mythweb/classes/Database/Query/mysqlicompat.php
on line 98 is just printing the error, but we don't have the full query
that's failing.

MAYBE looking in /var/log/mysql/error.log when the page is accessed
will help.
kbocek
Senior
Posts: 201
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

Re: Mythweb Error on CentOS 6

Post by kbocek »

Done.

Now I'm getting the error on the main setting page: http://myserver/mythweb/settings. I checked the mysql log and don't see anything when accessing this URL. I restarted mysql to confirm the log was being written to.
Vaska
Junior
Posts: 57
Joined: Fri Sep 01, 2017 11:09 pm
Canada

Re: Mythweb Error on CentOS 6

Post by Vaska »

I'm also experiencing this "!!NoTrans" error/issue on 30-Fixes. I recently upgraded from PHP 7.2 to 7.3 which I believe to be the root of the issue but my 7.3 php.ini file appears to have the same settings as my 7.2 did.

Did you ever resolve this issue? Sucks not to be able to search for titles in MythWeb. I'm on Gentoo so I suspect this problem is distribution agnostic.

Vaska
kbocek
Senior
Posts: 201
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

Re: Mythweb Error on CentOS 6

Post by kbocek »

Nope did not. I'm running 29.1 on CentOS6. I too thought it might be a PHP version issue but I have no answers.
Vaska
Junior
Posts: 57
Joined: Fri Sep 01, 2017 11:09 pm
Canada

Re: Mythweb Error on CentOS 6

Post by Vaska »

FYI - I just applied the patch below and it resolved my issue, it will probably fix your problem too.

https://code.mythtv.org/trac/ticket/13368#no1

Cheers
kbocek
Senior
Posts: 201
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

Re: Mythweb Error on CentOS 6

Post by kbocek »

Meh. I've installed Myth via packages. Patching isn't an option. That is unless I can manually make the change. The bug post is talking about Python 2.7. This host has 2.6.6.
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Mythweb Error on CentOS 6

Post by bill6502 »

Download the patch from the link above. In this example, the
patch is in ~/Downloads and mythweb is under /var/www:

Code: Select all

# EXAMPLE, adjust paths as required.
$ cd /var/www/mythweb/
$ sudo patch --dry-run -p1 < ~/Downloads/mythweb.patch 
(Stripping trailing CRs from patch; use --binary to disable.)
checking file modules/tv/search.php
Remove the --dry-run from the last command (if you get the same
response) and it will be applied.

Can't explain the Python comment, that ticket is for PHP.
Vaska
Junior
Posts: 57
Joined: Fri Sep 01, 2017 11:09 pm
Canada

Re: Mythweb Error on CentOS 6

Post by Vaska »

kbocek - It's just one file in the mythweb folder mythweb/modules/tv/search.php

Just create a backup of it if you're hesitant to patch it "cp search.php search.php.backup" then apply the patch as shown above.

Don't let the fact that you installed it from a package stop you from patching this one file, especially since it resolves the issue.
kbocek
Senior
Posts: 201
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

Re: Mythweb Error on CentOS 6

Post by kbocek »

Nope. Patch applied without an error. Still a problem clicking on the button in Mythweb for settings.

Code: Select all

    datetime:  2019-06-25 10:14:28 (PDT)
    errornum:  256
  error type:  User Error
error string:  !!NoTrans: SQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+found' at line 1 [#1064]!!
    filename:  /var/www/html/mythweb/classes/Database/Query/mysqlicompat.php
  error line:  98
Here's the full backtrace:
https://pastebin.com/wC02dtcB
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Mythweb Error on CentOS 6

Post by bill6502 »

@kbocek, do you have a lost+found directory (could be a file) where your database is stored?
Perhaps /var/lib/mysql/mythconverg or /var/lib/mysql/mysql. The above is trying to check a
table with that name.
kbocek
Senior
Posts: 201
Joined: Mon Jul 20, 2015 4:42 pm
United States of America

Re: Mythweb Error on CentOS 6

Post by kbocek »

Yes I do. I setup a separate file system and mounted it under /var/lib/mysql. I removed lost+found but still have the error:

Code: Select all

datetime:  2019-12-04 08:18:26 (PST)
    errornum:  256
  error type:  User Error
error string:  !!NoTrans: SQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '+found' at line 1 [#1064]!!
    filename:  /var/www/html/mythweb/classes/Database/Query/mysqlicompat.php
  error line:  98

==========================================================================

Backtrace: 
...
Here is the full backtrace: https://pastebin.com/peQYGtwQ
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Mythweb Error on CentOS 6

Post by bill6502 »

I'm assuming /var/lib/mysql is a mount point in the above.

The mysql filesystem is OK (got one myself) but it appears that in a database (I'm guessing
mythconverg, but possibly the mysql DB) there's a lost+found entry that appears to be a table.

In the php in the backtrace, a "SHOW TABLES" is sent and the results are checked. If you
do SQL, then I'd run SHOW TABLES; in both databases to see if lost+found shows up.

[I'd restore the lost+found you removed if you haven't already]
Post Reply