• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Five files are giving me fits

TonyBenedetti

Hobbyist Programmer & Fabrik Fan
For reasons that I can't comprehend the following 5 files seemingly disappear the instant after I transfer them from my local machine to the server.
  • C:\Users\Tony Benedetti\Documents\GitHub\fabrik\components\com_fabrik\models\element.php
  • C:\Users\Tony Benedetti\Documents\GitHub\fabrik\plugins\fabrik_element\date\date.php
  • C:\Users\Tony Benedetti\Documents\GitHub\fabrik\plugins\fabrik_element\dropdown\dropdown.php
  • C:\Users\Tony Benedetti\Documents\GitHub\fabrik\plugins\fabrik_element\image\image.php
  • C:\Users\Tony Benedetti\Documents\GitHub\fabrik\plugins\fabrik_element\link\link.php

I thought that perhaps there was something about the filename.ext that the server objected to... so I created dummy files (with the suspect filenames and "the quick brown fox" as content) but the dummies "stick around" ... no problem.

I uploaded the files using Filezilla, BeyondCompare and via the Cpanel "File Manager"'s upload. All with the same result ... the files see to go through the process but just "go away" immediately afterwards.

The versions of the files that came from the V3.1a install package will upload okay but the GitHub files are the ones that are giving me trouble.

All the other files from GitHub are okee dokee .... could there be something in the files' content itself that make them disappear like Houdini?
 
I've not heard of that happening before.
It would be best to check with your hosting provder - perhaps they have some automatic tool that checks uploaded files and if its not happy with them removes them.
If so there would be a log of this and hopefully an explanation as to what or why they were removed.
 
Rob, your analysis is spot on. Although I haven't checked with my hosting provider yet , I think I have proven the same thing by searching through the suspect files. It looks like the phrase @eval(stripslashes( is the trigger for something at the server to immediately remove the file upon its arrival.

I have tricked the watchdog (whatever it may be) into ignoring the problematic phrase by casting the result of stripslashes to string ... so I have changed
@eval(stripslashes( ...
to
@eval((string) stripslashes( ...
in the Fabrik-fabrik-3.1b-15-gaaa35fd version of the following files:
  • .../components/com_fabrik/models/element.php --- at line 4427
  • .../plugins/fabrik_element/date/date.php --- at line 828
  • .../plugins/fabrik_element/dropdown/dropdown.php --- at line 174
  • .../plugins/fabrik_element/image/image.php --- at line 57
  • .../plugins/fabrik_element/link/link.php --- at line 417

Since the watchdog doesn't seem to "bark" at any other of Fabrik's uses of @eval, another solution might be to set the result of stripslashes to a string and then use that as the argument of @eval. For example:
$default = stripslashes($default);
$default = @eval($default);​

I'm not all that comfortable using GIT Fork/Pull yet so would you consider amending the 5 files to use either of these techniques? It might help other users avoid having their watchdogs from barking up the wrong tree. Thanks a million!

Tony Benedetti
 
Or you could try and rename the files *.bak or something before uploading, then once uploaded, rename it back to .PHP

Perhaps your host checks for .php content while uploading. renaming files might fool it not to check content while uploading.

Paul.
 
I've changed those files as suggested - I don't see that being an issue, although its not any 'safer' than before - it must just fool the security regular expression that is run when files are uploaded.
 
Thank you Rob. That really helped --- now I won't have to fiddle with the files each time there is an update.

P38 --- I tried copying the files with a bogus extension, but as soon as I renamed them to .php the "watchdog" bit me in the butt and removed the file. ... sigh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top