Featured image of post Jquery Progress Bar, pecl c, PHP module, Debian

Jquery Progress Bar, pecl c, PHP module, Debian

Note: This post was created awhile back on another platform and I migrated to my current one.

Howto install PECL uploadprogress

I need the uploadprogress PHP module for jQuery progress bar. The reason why my boss and I chose this progress bar over the others out there is because this one does not use Flash. Flash has some annoying bugs, making web development frustrating, and at the same time, it makes our code ugly—full of band-aids and workarounds.

Furthermore, it was difficult to find any upload module for jQuery that doesn’t require Flash. The reason for this is that JavaScript runs on the client side and cannot track progress on the server side. So how can the progress bar gauge the completion percentage? The answer is a PHP module named uploadprogress.

Anyway, in most Linux distributions, you install the module and add a line in php.ini such as:

1
extension=uploadprogress.so

and you’re done. Not in Debian!

Step 1: Installing

1
2
sudo aptitude install php5-dev php-pear
sudo pecl install uploadprogress

Step 2: The Debian way of enabling uploadprogress.so

You need to create a file in conf.d to enable any PHP extension in Debian.

1
sudo vim /etc/php5/conf.d/uploadprogress.ini

Here’s what my uploadprogress.ini looks like:

1
2
# configuration for PHP uploadprogress module
extension=uploadprogress.so

Step 3: Restart Apache2

1
sudo /etc/init.d/apache2 restart
comments powered by Disqus

Desiderata by Max Ehrmann

Go placidly amid the noise and the haste, and remember what peace there may be in silence. As far as possible without surrender be on good terms with all persons. Speak your truth quietly and clearly; and listen to others, even to the dull and the ignorant, they too have their story. Avoid loud and aggressive persons, they are vexations to the spirit.

If you compare yourself with others, you may become vain or bitter; for always there will be greater and lesser persons than yourself. Enjoy your achievements as well as your plans. Keep interested in your own career, however humble; it is a real possession in the changing fortunes of time.

Exercise caution in your business affairs, for the world is full of trickery. But let not this blind you to what virtue there is; many persons strive for high ideals, and everywhere life is full of heroism. Be yourself. Especially do not feign affection. Neither be cynical about love; for in the face of all aridity and disenchantment it is as perennial as the grass. Take kindly the counsel of the years, gracefully surrendering the things of youth.

Nurture strength of spirit to shield you in sudden misfortune. But do not distress yourself with dark imaginings. Many fears are born of fatigue and loneliness. Beyond a wholesome discipline, be gentle with yourself. You are a child of the universe, no less than the trees and the stars; you have a right to be here. And whether or not it is clear to you, no doubt the universe is unfolding as it should.

Therefore, be at peace with God, whatever you conceive Him to be. And whatever your labors and aspirations in the noisy confusion of life, keep peace in your soul. With all its sham, drudgery and broken dreams; it is still a beautiful world. Be cheerful.

Strive to be happy.

Built with Hugo
Theme Stack designed by Jimmy