Upload progress PECL uploadprogress library
Upload progress PECL uploadprogress library
Submitted by admin on Fri, 2010-09-10 23:29
* Cool
* Fedora
* PHP
In my Drupal status report I get the following message:
Your server is capable of displaying file upload progress, but does not have the required libraries. It is recommended to install the PECL uploadprogress library
So I decided to enable this on my Fedora server (same for CentOS), since I will probably need to do this on more servers, here are the steps it takes:
# yum install php-devel
# pecl install uploadprogress
if you get: pecl: command not found then you will need to run:
# yum install pear
Note: I found out this did not work because the name is now php-pear so use:
# yum install php-pear
Now you can finally run the command you need:
# pecl install uploadprogress
Add this line to /etc/php.ini
vi /etc/php.ini
insert extension=uploadprogress.so
And of course you will need to restart apache to make it take affect:
# /etc/init.d/httpd restart
#APC
Complex PHP applications, such as Drupal, can gain a lot of performance benefits from running a PHP op-code cache/accelerators.
APC,
Alternate PHP Cache, is now the most maintained free/open source op-code cache, and is being used more and more as it emerges to be the
most stable.
The instructions here detail how to get APC running on a CentOS 5 server. The server happened to have Plesk on it as well, which initially made me hesitant to install APC “normally", since Plesk is so picky on what other software is installed on the server. However, it seems to have worked out well.
First, we need the pecl command so we can download and install APC from the repositories.
Do to so, we execute the following command:
yum install php-pear
But, this will not run on its own, we need the following package for the phpize command:
yum install php-devel
We also need the apxs command, which is installed via the following package:
yum install httpd-devel
yum install pcre-devel
Now we have all the software we need, so we install apc via the pecl command:
pecl install apc
Once that finishes, we need to enable apc in Apache’s configuration. the following command should do this for us.
echo “extension=apc.so" > /etc/php.ini
Then we restart Apache:
/etc/init.d/httpd start
And we are all done. Watch for less execution time per page, and decreased memory usage per Apache process compared to what you had
before.