FPA 1.6 and 1.6.1 deletes itself Topic is solved

This Forum board is about discussions about the FPA tool.

Moderator: General Support Moderators

Locked
User avatar
JurajB
Joomla! Guru
Joomla! Guru
Posts: 624
Joined: Fri Oct 02, 2015 3:28 pm

FPA 1.6 and 1.6.1 deletes itself

Post by JurajB » Fri Sep 25, 2020 3:10 pm

As a security measure, this copy of FPA has been self-deleted due to the time it has been present on the server.

You will need to upload another copy of FPA to continue.

So I reupload file hit f5 or ctrl f5 and it repeats again.
1.5 works fine.
V 3.9.21
PHP 7.4.4

Maybe it has something to do with:
siteguarding.com
or
mysites.guru

both active

here is also fpa 1.5 post in the attachment
You do not have the required permissions to view the files attached to this post.
Last edited by toivo on Fri Sep 25, 2020 5:18 pm, edited 1 time in total.
Reason: mod note: retitled on request

User avatar
PhilTaylor-Prazgod
Joomla! Ace
Joomla! Ace
Posts: 1402
Joined: Sat Aug 20, 2005 12:32 pm
Location: Jersey, Channel Islands
Contact:

Re: 1.6 and 1.6.1 problem

Post by PhilTaylor-Prazgod » Fri Sep 25, 2020 4:33 pm

Maybe it has something to do with:
[...]
mysites.guru
As the owner of the mySites.guru service, I can dispel that myth.

The mySites.guru service does not interact with, or delete the Forum Post Assistant. The Snapshot will identify and report to you the presence of the FPA in the tool entitled " Forum Post Assistant Should Not Be Left In Webspace" - we do not AUTOMATICALLY delete anything.


The message "As a security measure, this copy of FPA has been self-deleted due to the time it has been present on the server" is actually from the FPA itself here:

https://github.com/ForumPostAssistant/F ... n.php#L200

Looking at the code above that I would hazard a guess that your server time might be wrong, or the file timestamp is being incorrectly set when uploading the file.
Phil Taylor
- https://mySites.guru - Manage Multiple Joomla/WordPress Sites In One Dashboard for Security, Audits, Backups and more....
- https://www.phil-taylor.com/

sozzled
I've been banned!
Posts: 13639
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: FPA 1.6 and 1.6.1 deletes itself

Post by sozzled » Fri Sep 25, 2020 7:23 pm

@JurajB: With the release of FPA v1.6.0, a feature was added to delete the script from the server if the date when the FPA file was last modified is more than a week ago. This feature was added to prevent anyone running the FPA script (and, possibly, obtaining information about the website's server environment) if the script was uploaded to the server more than one week (7 days) ago.

In previous versions of the FPA, we recommended that the file fpa-en.php should be deleted from the server after it was used. From FPA v1.6.0 we automated the process so that the file would be deleted if it was left on the server for a long time.

Some people may find it inconvenient to refresh the file on the server if they see the message
As a security measure, this copy of FPA has been self-deleted due to the time it has been present on the server
but it only takes a minute. It's simple.

1) The first time you visit https://forumpostassistant.github.io/docs/ you need to click the button labelled Download Latest FPA. This will point you to the location of the latest version of the FPA package. Download the FPA package (it's a .zip file) that has a name like ForumPostAssistant-FPA-vx.y.z-n-aaaaaaaa.zip (where x, y, z, n refer to the semantic versioning information and aaaaaaaa is a randomly-generated [hexadecimal] hash).

2) Download this file to your PC and extract the file fpa-en.php from it on your PC.

Now you have the file fpa-en.php on your PC! :D

This is all explained in the online documentation at https://forumpostassistant.github.io/docs/.

When you want to run the FPA on your website, upload the file fpa-en.php to your J! root folder. After you have run the FPA on your website, delete the file fpa-en.php from your server. If you forget to delete the file don't worry. The file will automatically delete itself a week later if you try to run the script again; if that happens, just upload the file you previously stored from your PC to your server.

What's hard to understand about that? ???

User avatar
PhilTaylor-Prazgod
Joomla! Ace
Joomla! Ace
Posts: 1402
Joined: Sat Aug 20, 2005 12:32 pm
Location: Jersey, Channel Islands
Contact:

Re: FPA 1.6 and 1.6.1 deletes itself

Post by PhilTaylor-Prazgod » Fri Sep 25, 2020 7:29 pm

@sozzled - did you read his text?

Let me put it another way
Hey - Every time I upload the FPA, on the first load of the FPA it tells me:

As a security measure, this copy of FPA has been self-deleted due to the time it has been present on the server.

So I reupload the FPA file and refresh the page again

and again it deletes the file with the same warning. I cannot run the FPA because of this.
Make sense now? that's what he is saying. He is reporting a bug saying that v1.6 of the FPA auto deletes IMMEDIATELY and not after a week.
Phil Taylor
- https://mySites.guru - Manage Multiple Joomla/WordPress Sites In One Dashboard for Security, Audits, Backups and more....
- https://www.phil-taylor.com/

sozzled
I've been banned!
Posts: 13639
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: FPA 1.6 and 1.6.1 deletes itself

Post by sozzled » Fri Sep 25, 2020 7:34 pm

Thank, Phil. I understood that. My guess is that the OP extracted the file fpa-en.php and stored it on his webserver—somewhere—and copied the file from another folder on his server to the root folder of his website. I haven't done it that way myself.

My guess is that copying files from one location to another within the same environment involves inheriting the same last-modified date as the original. However, if you store the file on your PC and upload the file from the PC to the server, doesn't the last-modified date (for the uploaded file) become "today"?

I haven't had this problem. I've been through this procedure many times. I have a place on my PC where I store my "kits" and I upload what I need from my PC to my web server when I need to place something there. As far as I can tell, when I upload a file from my PC to my web server, the last-modified date of the uploaded file is timestamped with the date/time that I uploaded it.

I can't say what is happening here. What I can assume, with some confidence, is that the OP hasn't read the documentation very well. Posting a [zipped] image (or images) of the FPA report on the forum is not how people should use the script. The script generates BBcode, suitable for posting on the forum. If the generated BBcode exceeds 20,000 characters then the Joomla! Forum™ won't allow it but, again, that's not a show-stopper. There are options built-into the FPA script to select different parts of the report.

Also, if the FPA [full] report exceeds 20,000 characters this indicates a very complicated and, probably, difficult-to-maintain website with a lot of extensions. I try to keep things simple and install only what I need and not install hundreds of extensions that I will probably never use in a month of Sundays. 8)

sozzled
I've been banned!
Posts: 13639
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: FPA 1.6 and 1.6.1 deletes itself

Post by sozzled » Fri Sep 25, 2020 8:40 pm

Just as a test, I have a copy of FPA v1.6.1 on my PC with the following details:

Date created: 21-Jun-20 05:50
Date modified: 21-Jun-20 05:50

I uploaded this file to my webserver and it sets the timestamps like this:

Date created: 21-Jun-20 05:50
Date modified: 26-Sep-20 06:34

So I was right in my assumption. Copying a from my PC to the server updates the last-modified date on the server.

User avatar
JurajB
Joomla! Guru
Joomla! Guru
Posts: 624
Joined: Fri Oct 02, 2015 3:28 pm

Re: FPA 1.6 and 1.6.1 deletes itself

Post by JurajB » Sat Sep 26, 2020 6:11 am

I read the text. Do you agree there is a bug? What I have to do? What is wrong?
Thanks for advice

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44024
Joined: Sat Apr 05, 2008 9:58 pm

Re: 1.6 and 1.6.1 problem

Post by Webdongle » Sat Sep 26, 2020 7:24 am

PhilTaylor-Prazgod wrote:
Fri Sep 25, 2020 4:33 pm
...
Looking at the code above that I would hazard a guess that your server time might be wrong, or the file timestamp is being incorrectly set when uploading the file.
I have had problems uploading with an ftp client with timestamps and different dd/mm/yyyy mm/dd/yyyy settings. If that is the problem using the Host's CP file manager might avoid the problem?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

sozzled
I've been banned!
Posts: 13639
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: FPA 1.6 and 1.6.1 deletes itself

Post by sozzled » Sat Sep 26, 2020 8:38 am

Part 1:
JurajB wrote:
Sat Sep 26, 2020 6:11 am
I read the text. Do you agree there is a bug?
No, I do not agree there is a bug. I agree you have a problem but I also think you have not following the instructions properly.

I tested the FPA V1.6.1 today without any problems. Other people have used the FPA v1.6.1 recently without any problems. See, for example, viewtopic.php?f=706&t=982176#p3614677. I can show you many other examples.

Please explain, step by step, exactly what you did.

Part 2

@Webdongle: it should not matter if the date display is dd/mm/yyyy or mm/dd/yyyy because all operating use an internal clock to timestamp files; dates are stored as a number (in milliseconds offset from some epoch time, e.g. 1-Jan-1970 midnight). In your case, date displayed on your screen is a human-readable representation of the timestamp displayed according to the locale settings for your client (i.e. file explorer in a browser or FTP app).

I tested copying a file (a) from one PC to another PC in my LAN, as well as copying a file (b) using Filezilla and (c) using my cPanel to my web server. In all three cases the copied file's created date was the same but the copied files' modified date were different (as was to be expected).

The FPA auto-delete feature calculates the elapsed time from the file's modified date.

frostmakk
Joomla! Explorer
Joomla! Explorer
Posts: 262
Joined: Sun Dec 28, 2014 9:30 am
Location: Stavanger, Norway

Re: FPA 1.6 and 1.6.1 deletes itself

Post by frostmakk » Sat Sep 26, 2020 12:29 pm

JurajB wrote:
Sat Sep 26, 2020 6:11 am
What I have to do?
The easy way to get around this is to disable the function.
Put a # at the start of line 97 as it is done in line 101.

User avatar
JurajB
Joomla! Guru
Joomla! Guru
Posts: 624
Joined: Fri Oct 02, 2015 3:28 pm

Re: FPA 1.6 and 1.6.1 deletes itself

Post by JurajB » Sat Sep 26, 2020 5:11 pm

It works now, I edited file on my pc by adding one comment line and uploaded. Now I have my report in extensions section of forum

sozzled
I've been banned!
Posts: 13639
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: FPA 1.6 and 1.6.1 deletes itself

Post by sozzled » Sat Sep 26, 2020 8:20 pm

I guess—when all else fails—you can always take a sledgehammer to the source code (as suggested by @frostmakk). It doesn't explain what went wrong in the first place. I also see that the FPA script is (at the time of writing) still present on the OP's webserver. Maybe he forgot to delete it or maybe he doesn't care?

I would very much like to know why the OP did not follow the instructions. The instructions are fairly simple:
  1. Go to https://forumpostassistant.github.io/docs/ and click the button labelled Download Latest FPA. This will point you to the location of the latest version of the FPA package. Clicking the button will download the FPA package (it's a .zip file) that has a name like ForumPostAssistant-FPA-vx.y.z-n-aaaaaaaa.zip (where x, y, z, n refer to the semantic versioning information and aaaaaaaa is a randomly-generated [hexadecimal] hash).
    ~
  2. Download this [.zip] file to your PC and extract the file fpa-en.php into a directory on your PC but do not put this file in the same place as the filesystem used for your J! website at this time. You now have the FPA file stored on your PC.
    ~
  3. When you want to run the FPA on your website, upload the file fpa-en.php from your PC (see previous step) to your J! root folder. If you are using a local/PC-hosted webserver, you can copy the file stored at step 2 to the directory used by Wampserver or xAMPx software as applicable.
    ~
  4. After you have run the FPA on your website, delete the file fpa-en.php from your J! website root folder. If you forget to delete the file don't worry. The file will automatically delete itself a week later if you try to run the script again; if that happens, just repeat step 3 again.
That is how I use the FPA and that is how most people use the FPA. If you did something differently then please explain what you did differently.

FPA v1.6.x has been used successfully on dozens of different websites and server configurations including Unix, Nginx, Wampserver, XAMPP, LAMP, Windows, MacOS, IIS, just to name a few. FPA v1.6.x requires at least PHP 5.4 or higher and may not work, in some cases, depending on the server environment. FPA v1.6.x is unsuitable for J! 1.0 or J! 1.5 (running in legacy mode) and people will need to find an older version of FPA from the archives on GitHub.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44024
Joined: Sat Apr 05, 2008 9:58 pm

Re: FPA 1.6 and 1.6.1 deletes itself

Post by Webdongle » Sat Sep 26, 2020 9:17 pm

sozzled wrote:
Sat Sep 26, 2020 8:20 pm
...
2. When you want to run the FPA on your website, upload the file fpa-en.php from your PC (see previous step) to your J! root folder. If you are using a local/PC-hosted webserver, you can copy the file stored at step 2 to the directory used by Wampserver or xAMPx software as applicable....
An observation.
The file manager in the Host's CP can be used to upload the file. In many cases a newbie may find installing/configuring an ftp program as daunting.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

sozzled
I've been banned!
Posts: 13639
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: FPA 1.6 and 1.6.1 deletes itself

Post by sozzled » Sun Sep 27, 2020 8:15 pm

@JurajB: I am happy for you that you were able to bypass the built-in self-deletion action of the FPA so that you could run the program.

Can we please set aside how you bypassed the self-deletion action (by turning one line of code into a comment) and return to the original issue: the original issue is that, in your case, whenever you upload a new copy of the FPA script to your server, you cannot run the program because it deletes itself.

I would like to know how that happens, please. I would like us to understand how this happens because if it can happen to you it could happen to other people and I would like to see if we can help other people who have this problem in future.

Could you please do something for us? Would you please try the original file on one of your websites and tell us if the same problem happens again. If it happens (as you mentioned before, "I re-upload file, hit F5 or CTRL-F5 and [the self-destruct message] repeats.") again I would like to ask you a couple of simple questions.

Would you be willing to help us understand more about this problem, please? :)

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44024
Joined: Sat Apr 05, 2008 9:58 pm

Re: FPA 1.6 and 1.6.1 deletes itself

Post by Webdongle » Sun Sep 27, 2020 8:43 pm

If you upload the original file again please do it using the file manager in your Host's CP? After all there is little point in trying it exactly the same yet another time!
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

sozzled
I've been banned!
Posts: 13639
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: FPA 1.6 and 1.6.1 deletes itself

Post by sozzled » Sun Sep 27, 2020 8:54 pm

@Webdongle: thanks for your help but I'm trying to discover how this problem came about to begin with. I actually would like the OP to use the same process they used the first time around. (Who knows, maybe they did it your way in the first place?) I have a theory but if we do things differently we will not be able to reproduce the problem, will we? That's the whole point of the experiment. While I appreciate your helpful suggestions, I would like the OP to use whatever approach they used originally and then we can consider alternative experimentation another time.

To summarise: @JurajB: Could you please do something for us? Would you please try to upload the original [unaltered] file to one of your websites and tell us if the same problem happens again.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44024
Joined: Sat Apr 05, 2008 9:58 pm

Re: FPA 1.6 and 1.6.1 deletes itself

Post by Webdongle » Sun Sep 27, 2020 9:16 pm

sozzled wrote:
Sun Sep 27, 2020 8:54 pm
... I'm trying to discover how this problem came about to begin with. I actually would like the OP to use the same process they used the first time around. ...
What makes you think he will will get a different result using the same process?

Thanks for your help @sozzled but I am also trying to find out what's happening. It makes sense to try it slightly differently.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

sozzled
I've been banned!
Posts: 13639
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: FPA 1.6 and 1.6.1 deletes itself

Post by sozzled » Sun Sep 27, 2020 10:38 pm

@Webdongle: I am hoping to reproduce the same problem. I am not looking for "a different result". I want the same result and then I want test a theory. Do you understand now what I'm asking?

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44024
Joined: Sat Apr 05, 2008 9:58 pm

Re: FPA 1.6 and 1.6.1 deletes itself

Post by Webdongle » Mon Sep 28, 2020 9:21 am

sozzled wrote:
Sun Sep 27, 2020 10:38 pm
... I am not looking for "a different result". I want the same result and then I want test a theory. ...
Asking the OP to try again will not help you reproduce the error. Asking the the OP to explain step by step may help you reproduce the issue but only if it is not his ftp/Server combo causing the issue. So asking him to give details of what he did makes sense but what you are asking does not. Now do you understand why what your asking is not a logical approach to trying to replicate it?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
JurajB
Joomla! Guru
Joomla! Guru
Posts: 624
Joined: Fri Oct 02, 2015 3:28 pm

Re: FPA 1.6 and 1.6.1 deletes itself

Post by JurajB » Mon Sep 28, 2020 2:18 pm

guys it was like this
I had and old FPA on my server root, I dont remember how did it get there I do lot of things, last days I am at computer working almost whole day.
Problem was in servers FTP control program, I used WinSCP, I uploaded FPA 1.6.1 (overwriten), but the script didnt get new modified date, you understand? So it thinks that it has been uploaded long ago and deletes itself. It didnt help to even delete the file (by its own or via user action) and upload it again, it still dont updates last modified date. The way it worked wasnt disable part of security code to avoid this, the point was that I added one COMMENT LINE into COMMENT LINES which was there so the script gets new hash or something and after upload server categorized it differently and updated last modified date, so it checks for a date and get the information that its fresh installed and continued into work.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44024
Joined: Sat Apr 05, 2008 9:58 pm

Re: FPA 1.6 and 1.6.1 deletes itself

Post by Webdongle » Mon Sep 28, 2020 3:24 pm

Would be nice to know if uploading using the file manager in the Host's cp would create a new date stamp for the file?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44024
Joined: Sat Apr 05, 2008 9:58 pm

Re: FPA 1.6 and 1.6.1 deletes itself [Solved]

Post by Webdongle » Mon Sep 28, 2020 4:05 pm

Tested with
Filezilla ........................ current date/time stamp applied to file on the server
File manager in Host's cp ... current date/time stamp applied to file on the server

WinSCP ......................... date/time stamp of file on the computer was given to file on the server

Conclusion
Best use Filezilla or Host's file manager to upload the file.

Reason
The original creation date/time of the fpa-en.php(within the zip) is preserved when unpacked. WinSCP (and perhaps other ftp clients) preserve the original creation date/time
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

sozzled
I've been banned!
Posts: 13639
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: FPA 1.6 and 1.6.1 deletes itself

Post by sozzled » Mon Sep 28, 2020 4:27 pm

@Webdongle: Not interested in file creation time. Only interested in file modified time. Please check if WinSCP preserves the source file's modified date on the target.

JurajB wrote:
Mon Sep 28, 2020 2:18 pm
I had an old FPA on my server ...
That's what I guessed in post #5 of this topic. So why doesn't the OP understand the instructions I wrote in post #3 (repeated again in post #12 of this topic)? As I wrote before, I do not agree there's a bug in the FPA. I agree that some people have problems following instructions.

The solution is to download the FPA to your PC and copy the file from your PC to your server when you need it. How you copy the file is your choice. After using the FPA, delete it from the server. If you need the FPA again, copy it from your PC to the server again. How you copy the file is, again, your choice.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44024
Joined: Sat Apr 05, 2008 9:58 pm

Re: FPA 1.6 and 1.6.1 deletes itself

Post by Webdongle » Mon Sep 28, 2020 4:59 pm

@sozzled
The current fpa-en.php has a (modified) date/time stamp of ‎21 ‎June ‎2020, ‏‎13:50:22. It is that date/time stamp that WinSCP uses when it creates the file on the server. So it is easy for someone to mistakenly think it was an old file causing the problem.

Editing then saving the file will change the (modified) date/time stamp so using WinSCP (after modifying the file) will overwrite the date/timestamp on the server.

The problem (as I alluded to in my first reply) is the way in which WinSCP handles the date/time stamp.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

sozzled
I've been banned!
Posts: 13639
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: FPA 1.6 and 1.6.1 deletes itself

Post by sozzled » Mon Sep 28, 2020 6:47 pm

OK. Thanks. Looks like WinSCP preserves the original modified date from the source file into the modified date on the target (which sounds counter-intuitive to me); it's a gotcha: see https://winscp.net/forum/viewtopic.php?t=13124. We would have gotten here faster if the OP had answered my question in post #9:
sozzled wrote:
Sat Sep 26, 2020 8:38 am
Please explain, step by step, exactly what you did.
... instead of being side-tracked looking for a solution. ;)

As you say, it's better to not use WinSCP (esp. if some application relies on utilising the modified date of copied files). Interesting discussion. I think we all learnt something from it. 8)

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44024
Joined: Sat Apr 05, 2008 9:58 pm

Re: FPA 1.6 and 1.6.1 deletes itself

Post by Webdongle » Mon Sep 28, 2020 8:19 pm

I remember (from the distant past) FZ having a similar problem. It could have been another ftp client though. In any case I have uninstalled WinSCP immediately after testing. I would say exactly what I thought of it but I don't want another BW.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".


Locked

Return to “Forum Post Assistant (FPA)”