xoops forums

masel

Friend of XOOPS
Posted on: 2016/11/23 12:17
masel
masel (Show more)
Friend of XOOPS
Posts: 25
Since: 2004/10/6
#1

What can replace eval() in /class/cache/file.php ?

I have error
ParseErrorsyntax errorunexpected 'mytheme' (T_STRING), expecting ')' in file /class/cache/file.php(221) : eval()'d code line 9646


Page write "A problem has occurred on our server! ...", site is down.

Error disappears after a cache clearing (/xoops_data/caches/xoops_cache), but it appears again several days later. Code is responsible for read cache.

Possible problem in the template, but it appeared after upgrade server and XOOPS to 2.5.8.

Function eval() considered dangerous. How to replace it?

Mamba

Moderator
Posted on: 2016/11/23 17:53
Mamba
Mamba (Show more)
Moderator
Posts: 10334
Since: 2004/4/23
#2

Re: What can replace eval() in /class/cache/file.php ?

I suspect, it's more of a problem with the template itself.

What theme are you using?

Also, when does it happen? With every module, or only with particular one? If only with one, then the module's template could have a problem...

But I'll ask Richard to look into it, as he is more technical than me
Please support XOOPS & DONATE
Use 2.5.8 | Debug | Requests | Bugs

masel

Friend of XOOPS
Posted on: 2016/11/25 7:01
masel
masel (Show more)
Friend of XOOPS
Posts: 25
Since: 2004/10/6
#3

Re: What can replace eval() in /class/cache/file.php ?

Error disappears after removal of the file in folder /xoops_trust_path/xoops_data/caches/xoops_cache/xoops_09f99dcc_wurfl_user_agents.php

Probably guilty module WURFL 2.1 stable (for mobile). I have XOOPS 2.5.8.

This cache file is created when is created when module Preferences set "Yes' in "Post Loader" (This enables and disallows the post loader!).

Mamba

Moderator
Posted on: 2016/11/26 16:03
Mamba
Mamba (Show more)
Moderator
Posts: 10334
Since: 2004/4/23
#4

Re: What can replace eval() in /class/cache/file.php ?

Quote:
This cache file is created when is created when module Preferences set "Yes' in "Post Loader" (This enables and disallows the post loader!).

I don't know the program so it's hard for me to tell you.

Normally what I would do is to try to set the "Post Loaders" to "No", and see if it works. If it works, then I would leave and move on.
Please support XOOPS & DONATE
Use 2.5.8 | Debug | Requests | Bugs