Guldstrand Posted February 27, 2009 Share Posted February 27, 2009 What´s the easiest way to extract zip-/rar files with php 5, without the need of installing -and/or enabling extensions? Quote Link to comment https://forums.phpfreaks.com/topic/147178-extract-ziprar-files/ Share on other sites More sharing options...
premiso Posted February 27, 2009 Share Posted February 27, 2009 system would allow you to access your system's zip functions and allow you to use the command line for it. Quote Link to comment https://forums.phpfreaks.com/topic/147178-extract-ziprar-files/#findComment-772613 Share on other sites More sharing options...
Guldstrand Posted February 27, 2009 Author Share Posted February 27, 2009 system would allow you to access your system's zip functions and allow you to use the command line for it. Is this the only way? Quote Link to comment https://forums.phpfreaks.com/topic/147178-extract-ziprar-files/#findComment-772614 Share on other sites More sharing options...
Mark Baker Posted February 27, 2009 Share Posted February 27, 2009 Is this the only way? There's always PHP's zip extension.... don't know about rar though Quote Link to comment https://forums.phpfreaks.com/topic/147178-extract-ziprar-files/#findComment-772619 Share on other sites More sharing options...
Guldstrand Posted February 27, 2009 Author Share Posted February 27, 2009 Is this the only way? There's always PHP's zip extension.... don't know about rar though I´ve allready tried that, but that gave me: Fatal error: Class 'ZipArchive' not found in ... Is there any zip extension/function that´s enabled by "default"? Quote Link to comment https://forums.phpfreaks.com/topic/147178-extract-ziprar-files/#findComment-772631 Share on other sites More sharing options...
Mark Baker Posted February 27, 2009 Share Posted February 27, 2009 Is there any zip extension/function that´s enabled by "default"? Short answer: "No". If there was, then there'd be no need for the extension. If you do the build yourself, then you simply enable it in the build configuration. If your ISP controls your PHP build, then you'd have to ask if they could enable it for you. Quote Link to comment https://forums.phpfreaks.com/topic/147178-extract-ziprar-files/#findComment-772636 Share on other sites More sharing options...
Guldstrand Posted February 27, 2009 Author Share Posted February 27, 2009 Is there any zip extension/function that´s enabled by "default"? Short answer: "No". If there was, then there'd be no need for the extension. If you do the build yourself, then you simply enable it in the build configuration. If your ISP controls your PHP build, then you'd have to ask if they could enable it for you. Well.. since this is for a plugin-system to an open source project, i really don´t want the users to have all the "hassle" with enabling extensions. I know that SMF has a extract-function that works. http://support.simplemachines.org/function_db/index.php?action=view_function;id=269 Quote Link to comment https://forums.phpfreaks.com/topic/147178-extract-ziprar-files/#findComment-772640 Share on other sites More sharing options...
Mark Baker Posted February 27, 2009 Share Posted February 27, 2009 I know that SMF has a extract-function that works. Correct, because they've written it by hand. PHP has no simple function to extract files from a zip unless you install the zip extension. Being aware of SMF's read_zip_data() function, why don't you contact the developers (Simple Machines LLC) and ask their permission to use it? Quote Link to comment https://forums.phpfreaks.com/topic/147178-extract-ziprar-files/#findComment-772654 Share on other sites More sharing options...
Guldstrand Posted February 27, 2009 Author Share Posted February 27, 2009 In my case, i HAVE zlib installed and enabled on my server, but i still can´t use it. Why is that? Quote Link to comment https://forums.phpfreaks.com/topic/147178-extract-ziprar-files/#findComment-772665 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.