Installing ACP or Uploadprogress Tutorial

Status
Not open for further replies.

PlanetMaster

Registered
Dec 26, 2008
3
0
51
New York
If you want to add an upload progress bar/module using PHP or Ajax you need to have ACP and/or Uploadprogress installed to work with your PHP.

Installing ACP or Uploadprogress from cPanel PECL install doesnt work because it doesnt compile with--apxs so you need to install from the command line. The following is a step by step on how to get this working.

Login to Shell as root

Get the latest version of ACP or Uploadprogress:

ACP: http://pecl.php.net/package/APC
Uploadprogress: http://pecl.php.net/package/uploadprogress

I'll do ACP for example but the install is the same for uploadprogress

wget http://pecl.php.net/get/APC-3.1.2.tgz

Extract and move into the directory

gzip -d APC-3.1.2.tgz
tar -xf APC-3.1.2.tar
cd APC-3.1.2


Locate where php is:

which php

This should return something like: /usr/local/bin/php

Create configuration files:

phpize

Compile APC:

./configure --enable--apc --enable--apc--mmap --with--apxs --with--php--config=/usr/local/bin/php-config
make
make install


Find your php.ini

locate php.ini

Most likely the path will be /usr/local/lib/php.ini but may vary from server to server.

we will edit php.ini and add the APC extension and/or uploadprogress extension:

pico /usr/local/lib/php.ini

In the 'Paths and Directories' section of your php.ini you'll see this:

; Directory in which the loadable extensions (modules) reside.
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613"
extension = "uploadprogress.so"
extension = "apc.so"


Make sure it looks like the above (depending on your path to php extensions directory)

Now scroll down further in the php.ini to 'File Uploads', this is the step most tutorials leave out but is most important to making it work.

Just below:
; Maximum allowed size for uploaded files.
upload_max_filesize = ??m


Add this:

apc.rfc1867 = On

Without the above line nothing will work.

Now save the php.ini and restart Apache.

Done! you can now have an uploadprogress bar for upload forms.

An excellent step by step tutorial for creating upload progress bar using php and ajax can be found here:
http://www.phpriot.com/articles/php-ajax-file-uploads
 
Last edited:

nickp666

Well-Known Member
Jan 28, 2005
769
2
168
/dev/null
Please dont take this the wrong way, but surely it is easier to negate all the hard work and just use pecl?

The only issue you should see is if /tmp is mounted noexec, but there is a workaround for that:
http://www.carbonstudios.co.uk/site/44/219.html

I have installed countless instances of uploadprogress on cPanel servers just using pecl with the afore mentioned workaround

Code:
[email protected]# pecl install APC
and

Code:
[email protected]# pecl install uploadprogress
 
Last edited:

PlanetMaster

Registered
Dec 26, 2008
3
0
51
New York
PECL would be an easy way of course but on many cpanel servers including about 2 dozen I have installed this on for clients and many others who have posted in this forum (Do a search), ACP and/or uploadprogress does not compile with--apxs and you get a non install error so sometimes the longer way is best for those who cannot get there the short way. God forbid users here try to help others when one way isnt the only way.
 

cookiesunshinex

Well-Known Member
Jun 10, 2005
77
0
156
For the record, I used Nickp666's method.

It did work after I applied the tmp directory fix that he linked to.

However, it installed the library uploadprogress.so into
/usr/local/cpanel/3rdparty/lib/php/extensions/no-debug-non-zts-20060613/

and not
/usr/local/lib/php/extensions/no-debug-non-zts-20060613

I had to run the following to get it working correctly.
# mv /usr/local/cpanel/3rdparty/lib/php/extensions/no-debug-non-zts-20060613/uploadprogress.so /usr/local/lib/php/extensions/no-debug-non-zts-20060613/uploadprogress.so

The extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613" line was already in my php.ini because I also have eaccelerator.so extension installed.
 

damainman

Well-Known Member
Nov 13, 2003
515
0
166
Considering this post was made over a year ago, I was wondering if installing "uploadprogress" should still be done via the instructions of the OP.

Thank you.
 

kotakomputer

Member
Mar 21, 2010
24
1
53
Jakarta, Indonesia
This is old thread, but now you can install PECL UploadProgress directly from WHM.

Just klik the Module Instlaller then select PHP PECL, find UploadProgress then install. Thanks to great development of WHM/CPanel!
 

Attachments

Last edited:

chiefme

Member
Jan 21, 2009
13
0
51
cPanel Access Level
Root Administrator
On the configuration:
Apache/2.2.19 (Unix) mod_ssl/2.2.19 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 mod_fcgid/2.3.6

WHM/cpanel PECL install works, but the extension didn't

Im wrong or not?
 
Status
Not open for further replies.