Archive for February, 2008

PHP File Upload Progress Bar Part 2

After further investigation PHP 5.2.0 now allows you to use the APC (Alternative PHP Cache) addition with the ability to track the progress of uploads. Within windows it is as simply adding the dll extension to your php.ini and putting some configs there to. With Linux I’m not too sure how you add this extension as I don’t know Linux well. But anyway below is some nice and easy documentation on this.

PHP File Upload Progress Bar

PHP File Upload Progress Bar

As you may be aware in php it doesn’t have the functionality to report back the status of file uploads. For example upload percent complete, speed of upload and estimated time of completion. To be able to provide a progress bar the easiest way would be to use a perl script to do the uploading for you as perl has this functionality. Now I build a file uploader for the public and I looked at providing a perl uploader but because I know very little about the language of perl I couldn’t get any examples to work for me, but the ones that did work needed some server side changes. These server side changes would be no good for most of my downloader’s as many of them don’t have root access to their server.

There is another solution out there but once again it involves making server side changes which hacks php and adds the additional functions to track the upload progress of a file.

The above hack for PHP can be found at http://pecl.php.net/package/uploadprogress. There isn’t much documentation out there for it but if you do a Google search you will find one or two examples.

The above hack I’m thinking about putting it in my module so that those that have the modified php will be able to run my uploader with the progress bar but those without would not get the upload progress bar. The thing in to build my module to use this hack I need a server that is running the hacked version of php. Thing is I’m stuck with a shared hosting account and I don’t have access to modify php. So if there is anyone out there that can lend me some space for a short time and is running the above hack please contact me so I can’t continue building my file uploader script

Blogger on Strike

So my blog has been dead for awhile, no I wasn’t on strike. Well there is a reason why. I’ve just been busy busy busy. Firstly there was end of semester exams. I’ve spent most of my free time revising and finishing up university work, ready for the second semester.

Recently at work I’ve got so much work to do that I don’t know where to start on them. It’s come to one of those points were everyone is coming to you for small changes and those small changes take up all your time so you can’t work on those bigger things that will solve the small problems which are using up all my time. We are now in a vicious circle here!

Got a New Bike

As mine was starting to fall apart due to it being left outside all the time I have gone a gotten a new bike. It’s one my mum had got but she didn’t want it so I bought it from her. It’s one of these fold up ones that folds up to about a size of a suitcase. Ideal for folding up and bringing indoors and storing. Now it’s not left outdoors in the rain and should last me a good few years. Well my last bike was about 6 years old so it had a good innings.

Just Good Friends

Ok a little issue… It’s about a girl… A girl I like a lot… So what is the problem? Just ask her out and live happily ever after. If only life was that easy… When we talk and some of the things she talks to me about makes it clear that she only sees me as a good friend. It took someone else to point that out to me, but since it was mentioned it became clear. Fair enough I know we are just good friends but when she talks about her love life it hurts me. I’m really lost here…

They say friendship is worth keeping hold of no matter what but my friend hurts me because of my feelings towards her. What do I do? Do I continue to pretend everything is ok and just continue to be friends and now and then feel sad because nothing can progress between us and maybe one day something does come of it? Do I stop the friendship because the pain is not worth the friendship and/or go out and meet new people?

Can anyone offer some good advice?