DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Last post Author Topic: ZIP to PHP converter  (Read 73,692 times)

Tuxman

  • OMG not him again!
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,522
    • Participated in NANY Challenge Seven Times
Re: ZIP to PHP converter
« Reply #25 on: January 08, 2010, 12:15 AM »
For the intended use of this program (as I understand it: upgrading websites, especially pre-fab systems), it should.
Isn't that related to the files' CHMOD?
I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.

f0dder

  • [Well, THAT escalated quickly!]
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
    • Participated in NANY Challenge Once
Re: ZIP to PHP converter
« Reply #26 on: January 08, 2010, 12:17 AM »
For the intended use of this program (as I understand it: upgrading websites, especially pre-fab systems), it should.
Isn't that related to the files' CHMOD?
Of course, but if you've found a way to inject files you're normally running with a user account that has write access to the files you're interested in overwriting - duh?
- carpe noctem

Tuxman

  • OMG not him again!
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,522
    • Participated in NANY Challenge Seven Times
Re: ZIP to PHP converter
« Reply #27 on: January 08, 2010, 12:21 AM »
you're normally running with a user account that has write access to the files you're interested in overwriting - duh?
Now that is the server administrator's fault, right? If root uploads something he doesn't actually know into a folder where he could, theoretically, destroy a lot of things and runs the file, he is, basically, a jerk. In this case it is not of any interest, if the file is a zipped PHP or has to be unpacked via shell or anything...
I bet when Cheetahs race and one of them cheats, the other one goes "Man, you're such a Cheetah!" and they laugh & eat a zebra or whatever.

_Tenshi

  • Participant
  • Joined in 2010
  • *
  • Posts: 1
Re: ZIP to PHP converter
« Reply #28 on: March 26, 2010, 09:26 AM »
This is amazing, but it doesn't delete the file after its used, maybe auto deletes OR maybe rewrite from .php to .txt or .done (fake extention but still there) or no extension what so ever.

also maybe a file for options, if i wanna have it delete afterwards, or rename it (blah.php to blah.bak)
and looking for something that takes whats in the directory and makes it into zip (in linux servers)

anyways LOVE THIS SO MUCH.

scancode

  • I will eat Cody someday.
  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 641
    • Cody Award
    • Participated in NANY Challenge Twice
    • Coding Snacks
    • Furry Fandom Badge - Furry Fandom
    • DJ Badge - DJ
Re: ZIP to PHP converter
« Reply #29 on: March 26, 2010, 02:20 PM »
This is amazing, but it doesn't delete the file after its used, maybe auto deletes OR maybe rewrite from .php to .txt or .done (fake extention but still there) or no extension what so ever.

I'll add that option.

also maybe a file for options, if i wanna have it delete afterwards, or rename it (blah.php to blah.bak)
and looking for something that takes whats in the directory and makes it into zip (in linux servers)

Sure thing.

anyways LOVE THIS SO MUCH.

Thanks!

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 9,827
    • Participated in NANY Challenge Eight Times
    • Cody Award
Re: ZIP to PHP converter
« Reply #30 on: April 13, 2010, 10:11 PM »
I just used this to upgrade a DokuWiki installation. It worked great! Thanks so much to both scancode for making it and icekin for requesting the idea!

psionics

  • Participant
  • Joined in 2007
  • *
  • Posts: 119
Re: ZIP to PHP converter
« Reply #31 on: June 04, 2010, 08:58 PM »
The best!!!!!  :Thmbsup:

rgdot

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 2,197
Re: ZIP to PHP converter
« Reply #32 on: June 04, 2010, 09:07 PM »
This is a great thing, thanx
* rgdot just seen this thread

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 9,827
    • Participated in NANY Challenge Eight Times
    • Cody Award
Re: ZIP to PHP converter
« Reply #33 on: January 22, 2011, 04:58 PM »
I just tried to use this to convert a fairly large zip file (~330MB) and I got an error:

Quote
Error while trying to write the file, aborting.
7Out of memory

That 7 is not a typo. It does end up creating a 0 byte file. Any chance to get this fixed? Thanks!
« Last Edit: June 16, 2019, 06:11 PM by Deozaan »

worstje

  • The Gent with the White Hat
  • Honorary Member
  • Joined in 2009
  • **
  • Posts: 589
    • Coding Snacks
    • Participated in NANY Challenge Three Times
Re: ZIP to PHP converter
« Reply #34 on: January 22, 2011, 05:09 PM »
It could very well be a limitation from the server administrator. They can define how much memory php scripts can use, and if you have a large zip file I can imagine that amount gets exceeded. Especially when you use the stronger forms of compression as those take more memory to decompress as well. Maybe you can work around it by compressing the zip file a bit less?

scancode

  • I will eat Cody someday.
  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 641
    • Cody Award
    • Participated in NANY Challenge Twice
    • Coding Snacks
    • Furry Fandom Badge - Furry Fandom
    • DJ Badge - DJ
Re: ZIP to PHP converter
« Reply #35 on: January 22, 2011, 07:16 PM »
Woops! The 7 is not a typo, it's VB's error code for Out Of Memory.

I never tested with such big files :(
I'll try to fix.

PS: Worstje, it isn't a PHP error, but one from the app. I guess it happens in the base64 encoding, though not sure yet.
« Last Edit: January 22, 2011, 07:18 PM by scancode »

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 9,827
    • Participated in NANY Challenge Eight Times
    • Cody Award
Re: ZIP to PHP converter
« Reply #36 on: June 16, 2019, 06:11 PM »
I've been using this for years and it has almost always been great. A big thank you to scancode for making this useful little utility. :Thmbsup:



But I just tried to use this with another fairly large (~116 MB) file, but smaller file than my previous attempt, and got a different error:

Quote
Error while trying to write the file, aborting.
14Out of string space
« Last Edit: June 20, 2019, 02:03 AM by Deozaan »

scancode

  • I will eat Cody someday.
  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 641
    • Cody Award
    • Participated in NANY Challenge Twice
    • Coding Snacks
    • Furry Fandom Badge - Furry Fandom
    • DJ Badge - DJ
Re: ZIP to PHP converter
« Reply #37 on: June 19, 2019, 05:19 PM »
Can't believe someone is still using this thing. Time to make an updated version! Stay tuned ~

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 11,205
    • Participated in NANY Challenge Fourteen Times
    • Coding Snacks
    • Writer
    • Hardware Hacker
Re: ZIP to PHP converter
« Reply #38 on: June 19, 2019, 06:05 PM »
I'm glad someone is still using it... I'd not seen this before!

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 11,205
    • Participated in NANY Challenge Fourteen Times
    • Coding Snacks
    • Writer
    • Hardware Hacker
Re: ZIP to PHP converter
« Reply #39 on: September 14, 2019, 11:28 PM »
Can't believe someone is still using this thing. Time to make an updated version! Stay tuned ~


This thing is the best thing since sliced bread!  Just a warning on the deprecated functions:

Code: (text)
[14-Sep-2019 23:25:39 UTC] PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; Archive_Zip has a deprecated constructor in /home/redacted/zipfilename.zip.phpzip.php on line 1
[14-Sep-2019 23:25:39 UTC] PHP Deprecated:  The each() function is deprecated. This message will be suppressed on further calls in /home/redacted/zipfilename.zip.phpzip.php on line 1

Thanks for making this!  It saved me a lot of time!  Donationcredits coming your way!

Original address: https://www.donationcoder.com/forum/index.php?topic=21287.0