News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

No Temp Directory Removal

Started by SleePy, March 19, 2007, 07:03:32 PM

Previous topic - Next topic

SleePy

Link to Mod

THIS MOD ONLY FIXES PROBLEMS WITH THE TEMP DIRECTORY REMOVAL IN PACKAGES FOLDER.

This Mod removes package managers deleting of the temp directory in package manager but still allows it to clear it out.
This mod is not needed for everyone. Some hosts have problems with php creating and removing directories. This mod attempts to fix this problem by removing package manager's directory deletion code on the temp directory. Which means that future mods will you will not need to create the temp directory again.

Note: Though Before this mod is installed you may need to create the temp directory to get it installed. And one more time possibly after. But should continue to be there after.
The temp directory should have full permissions to read/write to it.

Version 1.0
! Release
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Lanthan

Thank you very much for this mod.
I was waiting so long for this mod.
It helped me so much on 110mb.com, now I'm able to install new mods.
Perfect. The only thing is, that its only working for mods in a zip package, not in an tar.gz.
But I think thats another issue, which depends on the hoster.

Best Regards
Lanthan

SleePy

That is weird. It shouldn't mater what type of file it is as SMF cleans the temp directory the same way.
And I did test this with tar.gz files on my test site and it did act how it should.
I will look into the code maybe I missed a spot but I thought I scanned all package manager files for code used to remove the temp directory.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

ディン1031

#3
Yeah, i was near to fix this by my self :D.

Hope it work fine on my forum.

Why did you not replace only

deltree($boarddir . '/Packages/temp');

with

deltree($boarddir . '/Packages/temp', false);


in package.php normal the package manager replace all the one with this term.

And one other thing, can you add a modSetting Option for it? So that it can be disabled or enabled.

(Hmmm i never new that i can post fixes in the modifications... hmmm i think i should also add a fix for moderators color problem) ;).

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

SleePy

I only replaced that because thats all that needed done from the deltree function that was created by SMF.

If you look at the function:
http://support.simplemachines.org/function_db/index.php?action=view_function;function=323

All that was required is to add false at the end so it knew to leave the directory.

I could make it an option but what would the point of the mod be then? It removes package managers ability to delete the temp directory. No option needed as if you don't want it just uninstall.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Lanthan

Quote from: SleePy on March 20, 2007, 06:02:36 PM
That is weird. It shouldn't mater what type of file it is as SMF cleans the temp directory the same way.
And I did test this with tar.gz files on my test site and it did act how it should.
I will look into the code maybe I missed a spot but I thought I scanned all package manager files for code used to remove the temp directory.
Hai SleePy,
I think its an matter of 110mb.com. The Problem in their system is the Rights Management.
I'll have to create the Temp Dir with the ftp Account and set it to 777. I Thnk when the tar.gz is unpacked there are two steps the system does. First unpack the gz and then the tar. The created dir for the gz has the wrong rights, and SMF is unable to process the Files in the new Dir.
The same happens if an Mod zip has an directory in it self.
Only too make this point clearer, the ftp functions of SMF don't work. I've tried it and it fails.

Best Regards
Lanthan

SleePy

SMF's FTP functions do work. Just not on all hosts due to the many configurations possible.

While my mod doesn't touch what permissions directories are you could effectively duplicate the deltree function and give it a good name Then instead of deleting have it chmod files with php to hopefully the right permissions.
But that isn't what this mod is intended to do ;) Just to keep that temp directory there :P
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Lanthan

Quote from: SleePy on March 22, 2007, 06:10:15 PM
SMF's FTP functions do work. Just not on all hosts due to the many configurations possible.
So the FTP funtion does not work for me:-).
But as I said, its an matter of 110mb.com.
And its no problem for me to extract tar.gz files and repack it as an normale zip. So your Mod saved me Hours working on an mirror Site and then upload the changed Files to the final place.

greyknight17

OK, had to use this mod for a user. Thought it all went well, until I saw the temp folder vanished...again :(

I created the temp folder in Packages and CHMOD it to 777. Then after many attempts, finally got the NoTempDirectoryRemoval mod to install (kept giving me modification parser errors). After that, I create the temp folder and CHMOD that one to 777. Installed another mod to test it out. OK....no problem. Then tried a second one, modification parser error again :(

Any idea what's wrong here? Thanks :)

SleePy

Was the temp directory gone again?

Does uninstalling the mod pass all tests (Proving that it is completely installed and didn't miss something)?

My Mod won't necessary fix modification errors but it does help on servers where temp directory is the problem to installing mods.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

babjusi

Quote from: greyknight17 on July 03, 2007, 11:36:44 PM
OK, had to use this mod for a user. Thought it all went well, until I saw the temp folder vanished...again :(

I created the temp folder in Packages and CHMOD it to 777. Then after many attempts, finally got the NoTempDirectoryRemoval mod to install (kept giving me modification parser errors). After that, I create the temp folder and CHMOD that one to 777. Installed another mod to test it out. OK....no problem. Then tried a second one, modification parser error again :(

Any idea what's wrong here? Thanks :)

I have tried this mod in 8 users here, and in 3 of them happened just like you described, but those 3 were all in a free host. Whereas for the other 5 who were in a paid host didn''t give a problem at all.

Was the user you tried this mod in a free host as well greyknight17?

SleePy

I can't help much for people who have forced ad hosting.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

greyknight17

Got it resolved guys :)

The problem is with safe mode enabled. I disabled it already from the user's host but it took longer than I expected to take effect. Great mod SleePy ;)

Dirtrocker

#13
I had to post to say thank you for this mod.
I had to put this on my server (Ok, SMF support had to  8)) to make the packages options work and to be honest, I would have been lost without this mod.

Oh and I really appreciate that it didn't drop out with the new version. Thank you for that.

As for the free/ad hosting, I realize it is free, but when there is hosting for $5-$10/month out there, why use those free/ad hostings?

olabaz

Can someone upload the file (package.php) with all of the modifications done correctly?

SleePy

Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

olabaz


Dzen

Hi, it doesn't want to install for smf 1.1.10. In xml there're only instructions for uninstall for this version. Any suggestions?

SleePy

Download the file and try again Dzen.  A few of my mods didn't package right when I updated them, I repackaged it and it should work now.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Deonhotboy

hi can someone help me. i followed the instruction in installing it but i get the same error as when trying to install other mods

Advertisement: