For unknown reasons, it seems your web server is incapable of performing automated upgrades reliably (for contrast: I have around 30 WSN installations that autoupdate, and I don't believe I've ever had a file get truncated... I think I've heard of it happening to others a couple times in the past though). It's very strange that a server would stop a file copy in the middle. My guess would be that the entire operating system or server is crashing in the middle of the upgrade process, in the middle of a file copy, thus leaving a file half-copied. Do you see no more than one file per day become truncated? If so this could be the case. If on the other hand there's more than one file truncating per day, it must be something that happens to numerous files during the same update, and that might be something I could potentially detect in the code though I still wouldn't have any way to force it to write correctly except to repeat the same copy command many times and hope.
At any rate, for the moment you should go to the front page of the admin panels and in Autoupdate to releases every 12 hours change the "all" selection to "no" in order to stop automatic updates.
You mentioned the includes folder. Is it only in the includes folder? Or is it only the includes/addeditfuncs.php file specifically?
Can you givemetheIPof the server thatmade theupdates,this formy webhostcanadd it to thewhitelist,wewill thenmake sure thatupdatesgoingwithout a break.
The only commonality I see is that those are among the largest files.
The IP address is 50.28.38.122 but that can't be the problem, because it downloads the entire .tar.gz archive at once, and if that download weren't complete it wouldn't be able to extract it in order to copy any of the files. Each file is copied over locally from the /temp/ subdirectory to its final destination. The problem is either with extracting the tar.gz in the temp directory or with copying from there to the final directory. I guess an extraction problem seems the most likely, somehow some files must be incompletely extracted... perhaps the extraction process dies before completing, so you're actually getting old versions of some other files too but just notice the half-file where it cuts off.
I'll look into whether I can have it retry or at least hit a panic button when it writes a PHP file that doesn't contain a closing ?> though all those checks will slow the upgrade process.
Update to the latest version, then enable the verifyfileintegrity tweak. This will cause subsequent upgrades to check all the files in the includes subdirectory, report if they're incomplete, and report whether the incompleteness occours during the extraction of the archive or only after the copy to the final destination.
Sounds like it was unable to detect the incomplete files. That doesn't really make any sense unless the autoupgrade.php crashes in the middle.
To be clear, after you click upgrade, do you:
A) see an "Upgrade complete" message, and then when you click to another page you see the syntax error B) see a blank page, then when you click to another page you see the syntax error C) see a brief message about upgrade.php not having been run and then get redirect to another page which has the syntax error D) see the syntax error immediately (but this should be logically impossible as the files are already loaded in memory) E) other
When I look atmy site statisticswithPiwik, I see that the site remainedwithoutvisitsfor some time.
Then I goto my website, for example on KnowledgeBase (http://www.milouchouchou.com/articles/) and then Ireceive the error messagethat Ireportedin my othermessage.
ThenI checkif anotherscriptstill works.
If yes, thenI transferredvia FTPthe correctinclude filethat works onmy hard drive.
ThenItransferredtothe includefilewhere thefileis truncated, this in order togo intoadministrationKnowledgeBase.
In the administrationI get the messagetelling methat an updateis available.
I can thendothis update.
Apparently, this problem happensevery timebeforetheupdate,manual or automatic.
It seems thatsomethinghappens whenan updateis ready to beinstalled.
No code at all is executed when an update is available, until it's actually installed (meaning, if automated updates are off, the upgrade button is pressed). The possibilities are (a) there were a couple of releases close togeather the last few days so you may have had the first update and not the second (b) it ran the upgrade, but because it was unable to copy files the file indicating the current version number didn't get copied over so it continued to show it as being the previous version number.
Can you answer post #10 for a site where automatic updates are turned off and you manually click the upgrade button?
Unfortunately I'm still not seeing how this could be possible. With autoupdates off, I'm not seeing any processes that overwrite /includes/ files.
Try writing down the last modification time of a broken file the next time it breaks (your FTP client should show this). Also write down the last modification time of another random file in the includes directory which isn't broken, and see if those modification times are the same or not (this will be a clue). Maybe given the last modification time we can have a look at your apache server log to see what was running at that second.
0/5
1
2
3
4
5
Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.
Comments on Truncated file
Forum Regular
Usergroup: Customer
Joined: Nov 05, 2006
Location: Borlo Belgique
Total Topics: 27
Total Comments: 121
Posted Dec 25, 2013 - 4:11 AM:
Hello Paul
Almost every day there is a file in the Includes folder is truncated, so I have to send via FTP a copy of this file.
Do you have any idea of the source of this problem?
Herewith, the truncated file that I had today.
Thank you for your reply.
Cordially.
Francis
Attached Files:
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
For unknown reasons, it seems your web server is incapable of performing automated upgrades reliably (for contrast: I have around 30 WSN installations that autoupdate, and I don't believe I've ever had a file get truncated... I think I've heard of it happening to others a couple times in the past though). It's very strange that a server would stop a file copy in the middle. My guess would be that the entire operating system or server is crashing in the middle of the upgrade process, in the middle of a file copy, thus leaving a file half-copied. Do you see no more than one file per day become truncated? If so this could be the case. If on the other hand there's more than one file truncating per day, it must be something that happens to numerous files during the same update, and that might be something I could potentially detect in the code though I still wouldn't have any way to force it to write correctly except to repeat the same copy command many times and hope.
At any rate, for the moment you should go to the front page of the admin panels and in
Autoupdate to releases every 12 hours
change the "all" selection to "no" in order to stop automatic updates.
You mentioned the includes folder. Is it only in the includes folder? Or is it only the includes/addeditfuncs.php file specifically?
Forum Regular
Usergroup: Customer
Joined: Nov 05, 2006
Location: Borlo Belgique
Total Topics: 27
Total Comments: 121
Thank you for your reply Paul
I changed the automatic update to NO following your advice.
The problem always occurs in the Includes folder for the 5 scripts but not always the same.
I've had the problem with:
addeditfuncs.php
commonfuncs.php
admincommonfuncs.php
filefunctions.php
At the moment, I just had the problem with addeditfuncs.php
I also transfers your response in my webhost planethoster who swears to me that the problem is not their servers.
Good day.
Cordially.
Francis
Forum Regular
Usergroup: Customer
Joined: Nov 05, 2006
Location: Borlo Belgique
Total Topics: 27
Total Comments: 121
Hello Paul
Can you give me the IP of the server that made the updates, this for my webhost can add it to the whitelist, we will then make sure that updates going without a break.
Thank you for your reply.
Cordially.
Francis
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
The only commonality I see is that those are among the largest files.
The IP address is 50.28.38.122 but that can't be the problem, because it downloads the entire .tar.gz archive at once, and if that download weren't complete it wouldn't be able to extract it in order to copy any of the files. Each file is copied over locally from the /temp/ subdirectory to its final destination. The problem is either with extracting the tar.gz in the temp directory or with copying from there to the final directory. I guess an extraction problem seems the most likely, somehow some files must be incompletely extracted... perhaps the extraction process dies before completing, so you're actually getting old versions of some other files too but just notice the half-file where it cuts off.
I'll look into whether I can have it retry or at least hit a panic button when it writes a PHP file that doesn't contain a closing ?> though all those checks will slow the upgrade process.
Forum Regular
Usergroup: Customer
Joined: Nov 05, 2006
Location: Borlo Belgique
Total Topics: 27
Total Comments: 121
Thank you Paul.
I forwarded your response to Planethoster.
Cordially.
Francis
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Update to the latest version, then enable the verifyfileintegrity tweak. This will cause subsequent upgrades to check all the files in the includes subdirectory, report if they're incomplete, and report whether the incompleteness occours during the extraction of the archive or only after the copy to the final destination.
Forum Regular
Usergroup: Customer
Joined: Nov 05, 2006
Location: Borlo Belgique
Total Topics: 27
Total Comments: 121
Thank you Paul, I just update and I enabled this option.
Forum Regular
Usergroup: Customer
Joined: Nov 05, 2006
Location: Borlo Belgique
Total Topics: 27
Total Comments: 121
Hello Paul
Before to make update to 8.0.41, I had this error in two scripts.
Parse error: syntax error, unexpected $end in /home/milouch1/public_html/milannu/includes/commonfuncs.php on line 3280
Parse error: syntax error, unexpected $end in /home/milouch1/public_html/articles/includes/commonfuncs.php on line 6247
I transferred the file from the forum in order to make this update.
And in de forum
Parse error: syntax error, unexpected $end in /home/milouch1/public_html/forum/includes/addeditfuncs.php on line 756
I transferred the file from the other script in order to make this update.
Cordially.
Francis
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Sounds like it was unable to detect the incomplete files. That doesn't really make any sense unless the autoupgrade.php crashes in the middle.
To be clear, after you click upgrade, do you:
A) see an "Upgrade complete" message, and then when you click to another page you see the syntax error
B) see a blank page, then when you click to another page you see the syntax error
C) see a brief message about upgrade.php not having been run and then get redirect to another page which has the syntax error
D) see the syntax error immediately (but this should be logically impossible as the files are already loaded in memory)
E) other
Forum Regular
Usergroup: Customer
Joined: Nov 05, 2006
Location: Borlo Belgique
Total Topics: 27
Total Comments: 121
When I look at my site statistics with Piwik, I see that the site remained without visits for some time.
Then I go to my website, for example on Knowledge Base (http://www.milouchouchou.com/articles/) and then I receive the error message that I reported in my other message.
Then I check if another script still works.
If yes, then I transferred via FTP the correct include file that works on my hard drive.
Then I transferred to the include file where the file is truncated, this in order to go into administration Knowledge Base.
In the administration I get the message telling me that an update is available.
I can then do this update.
Apparently, this problem happens every time before the update, manual or automatic.
It seems that something happens when an update is ready to be installed.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
No code at all is executed when an update is available, until it's actually installed (meaning, if automated updates are off, the upgrade button is pressed). The possibilities are (a) there were a couple of releases close togeather the last few days so you may have had the first update and not the second (b) it ran the upgrade, but because it was unable to copy files the file indicating the current version number didn't get copied over so it continued to show it as being the previous version number.
Can you answer post #10 for a site where automatic updates are turned off and you manually click the upgrade button?
Forum Regular
Usergroup: Customer
Joined: Nov 05, 2006
Location: Borlo Belgique
Total Topics: 27
Total Comments: 121
The automatic updates are disabled.
Forum Regular
Usergroup: Customer
Joined: Nov 05, 2006
Location: Borlo Belgique
Total Topics: 27
Total Comments: 121
Hello Paul
Here are the link with the error message.
WSN Classifieds http://www.milouchouchou.com/annonces/
Parse error: syntax error, unexpected $end in /home/milouch1/public_html/annonces/includes/googlemapfunc.php on line 257
I do NOTHING changes, perhaps you can better find out what causes this problem.
Cordially.
Francis
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Unfortunately I'm still not seeing how this could be possible. With autoupdates off, I'm not seeing any processes that overwrite /includes/ files.
Try writing down the last modification time of a broken file the next time it breaks (your FTP client should show this). Also write down the last modification time of another random file in the includes directory which isn't broken, and see if those modification times are the same or not (this will be a clue). Maybe given the last modification time we can have a look at your apache server log to see what was running at that second.