Posts Tagged ‘file’
PHP5 Universal File Download Class
Written by Chris on August 12, 2008 – 12:16 pm -After finding different hosting companies having wildly different policies when it comes to what's enabled and what isn't in PHP, I've built a generic file download class which should work in almost all situations.
This is the first version so there are some improvements to be made and if you download it, you'll see where some improvements may be made. I will be releasing another version when I've had time to do some further work on it. For now you can find the source code plus any community improvements here: http://www.refactormycode.com/codes/440-universal-file-download-class
I should also mention that this class has been cleaned of some application specific code, so if there's any disjointed bits I apologise - I have tried to deal with any discontinuities before posting but there may be something i've missed (this is also the reason for the bunch of if's in get_file() if you are to use this as is you may want to replace them with your own custom code).
Popularity: 87% [?]
Sphere: Related ContentTags: 5, Class, Download, file, PHP, script, Universal
Posted in PHP, Web Development | 3 Comments »
How to Mount a Linux LVM2 Partition in Windows
Written by Chris on February 10, 2008 – 11:24 pm -I have a dual boot Windows Vista / Linux Laptop and recently I needed to access the Linux partitions from within Windows to copy data between the operating systems.
So I did a bit of searching on the net and had trouble finding a tool/page describing how to do it with an LVM (Logical Volume Manager) partition, all tools seemed to just work with plain old ext2 or ext3 file systems with no mention of others.
This is a problem with at least CentOS 5.1 (Red Hat Enterprise) and probably all modern Linux distributions as there seems to be a move towards the LVM methodology for all operating systems - understandably so when you read what it's all about from wikipedia: http://en.wikipedia.org/wiki/Logical_volume_management
But then I noticed that Explore2FS from chrysocome.net actually also supports LVM2 as well as ext2 / ext3, and it works great!
All I had to do was download (at the time of writing) explore2fs 1.08beta9 extract it from the archive and run it - job done! I can get to my standard Linux files (and more actually) with ease from within windows through an explorer style interface. Just what I needed!
The guy(s) who developed Explore2FS are also working on another tool called Virtual Volumes but this really is a beta (at the time of writing) and I couldn't get this to work in a useful way what so ever BUT this should be a winner when it works too!
So now it just remains for me to setup ntfs support in CentOS 5.1 and I can go both ways - woohoo!
Popularity: 28% [?]
Sphere: Related ContentTags: CentOS, file, filesystem, Linux, logical, lvm, lvm2, management, mount, partition, system, vista, volume, Windows
Posted in CentOS, Linux, Microsoft, Windows | 1 Comment »














Feed 
