1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Installing ACP or Uploadprogress Tutorial

Discussion in 'General Discussion' started by PlanetMaster, Feb 10, 2009.

Thread Status:
Not open for further replies.
  1. PlanetMaster

    PlanetMaster New Member

    Joined:
    Dec 26, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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
     
    #1 PlanetMaster, Feb 10, 2009
    Last edited: Feb 10, 2009
  2. nickp666

    nickp666 Member

    Joined:
    Jan 28, 2005
    Messages:
    770
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    /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:
    root@box# pecl install APC
    and

    Code:
    root@box# pecl install uploadprogress
     
    #2 nickp666, Feb 10, 2009
    Last edited: Feb 10, 2009
  3. PlanetMaster

    PlanetMaster New Member

    Joined:
    Dec 26, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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.
     
  4. cookiesunshinex

    Joined:
    Jun 10, 2005
    Messages:
    77
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
  5. damainman

    damainman Member

    Joined:
    Nov 13, 2003
    Messages:
    520
    Likes Received:
    0
    Trophy Points:
    16
    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.
     
  6. kotakomputer

    kotakomputer New Member

    Joined:
    Mar 21, 2010
    Messages:
    23
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    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!
     

    Attached Files:

    #6 kotakomputer, Aug 3, 2010
    Last edited: Aug 3, 2010
  7. chiefme

    chiefme New Member

    Joined:
    Jan 21, 2009
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    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?
     
  8. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    12,122
    Likes Received:
    32
    Trophy Points:
    48
    Location:
    Pennsylvania
    Please start a new thread concerning your question, this thread is old and outdated.


    Thanks!
     
Thread Status:
Not open for further replies.

Share This Page