The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

php-patch + php extension + cPanel = HOW :(

Discussion in 'General Discussion' started by x-man, May 25, 2005.

  1. x-man

    x-man Well-Known Member

    Joined:
    Jan 25, 2004
    Messages:
    118
    Likes Received:
    0
    Trophy Points:
    16
    I want install upload progress meter because I can`t do it in standard PHP, I find it on:
    http://pdoru.from.ro/

    but now I have problem because I use cPanel on my server and all PHP updates I done with cPanel (easyapache) and now I don`t know how I can patch php and add this extension, can somebody help to me?

    All info you can find on:
    http://pdoru.from.ro/upload-progress-meter/upload-progress-meter-v4.1/INSTALL
    http://pdoru.from.ro/upload-progress-meter/upload-progress-meter-v4.1/php-patch/INSTALL
    http://pdoru.from.ro/upload-progress-meter/upload-progress-meter-v4.1/upload_progress_meter/INSTALL

    how I can install this on cPanel server?


    Thanks.

    Sorry if my english poor :(
     
  2. xaze

    xaze Well-Known Member

    Joined:
    Jul 10, 2003
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    I need this too. Did you figure it out?

    Regards,

    Rex
     
  3. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    According to the installation instructions: this module was tested with PHP versions 4.3.7/8/10 and 5.0.0/3. Does that mean it won't work with 4.3/12/ or 4.4.0?

    I have never heard of such module, but installation and configuration is pretty much straight forward.
     
  4. fsbailey

    fsbailey Registered

    Joined:
    Jul 11, 2003
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    You ever get this working?

    I need this as well. You ever get it working?
     
  5. freedog96150

    freedog96150 Well-Known Member

    Joined:
    Mar 25, 2005
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Nevada, USA
    Instructions for patching php from the pdoru.ro website:
    Code:
    This is version 4 of the php-patch that implements the upload-progress-callback feature.  Tested with php versions: 4.3.7/8/10 5.0.0/3
    
    Quick install:
    1. you need a fresh source of PHP. version 4 or 5. and just untar it.
    2. change directory into the main directory of the php source tree:
    	cd php-4.3.7
    3. apply patch	
    	patch -p1 < /path/to/the/patch.upload-progress-callback-v4.1-phpVERSION.txt
    4. configure, compile and install PHP as usual. enjoy.
    
    when done, install the php upload_progress_meter extension
    Instruction for installing the extension, also from the same site:
    Code:
    Quick install: 
    1. compile
       This extension was tested with PHP versions 4.3.7/8/10 and 5.0.0/3
    
    phpize
    ./configure
    make 
    make install
       
       Notice the directory where the extension was installed.
    
    2. edit your php.ini and add on line like this:
    
    extension=no-debug-non-zts-20020429/upload_progress_tracking.so
    
    it is possible that you will need to copy it somewhere else, or to edit the extension_dir directive
    in your php.ini to point to the correct path.
    
    mine looks like this:
    extension_dir = /usr/local/lib/php/extensions
    
    and I have the extension in this place: 
    /usr/local/lib/php/extensions/no-debug-non-zts-20020429/upload_progress_tracking.so
    
    3. edit php.ini or apache's httpd.conf to configure the upload-progress-tracking
    
    I have this in my httpd.conf:
    php_value upload_progress_tracking.store_method "file"
    php_value upload_progress_tracking.file 1
    php_value upload_progress_tracking.file.filename_template "/tmp/uploadbar/upl_%s.txt"
    
    
    4. don't forget to mkdir /tmp/uploadbar ; chmod 777 /tmp/uploadbar
    cPanel keeps the source/build files for apache and php in /home/cpapachebuild/buildapache Inside there you will see the directory for your version of PHP. For me, there is a directory called php-5.1.4 that houses all the php source files.

    So if I were to build this onto MY server it would go something like this (keep in mind that you MUST verify directories for your own server as they may not be the same as mine).

    1. Login to your cPanel server as root using SSH and navigate to the appropriate directory and download the necessary files
    Code:
    root@xxx [~root] cd /home/cpapachebuild/buildapache/php-5.1.4
    root@xxx [php-5.1.4] wget http://pdoru.from.ro/upload-progress-meter/upload-progress-meter-v4.1/upload_progress_meter/upload_progress_meter.c
    root@xxx [php-5.1.4] wget http://pdoru.from.ro/upload-progress-meter/upload-progress-meter-v4.1/php-patch/patch.upload-progress-callback-v4.1-for-php(your ver).txt
    2. Then run the patch as per the instructions above
    Code:
    root@xxx [php-5.1.4] patch -pl patch.upload-progress-callback-v4.1-phpVERSION.txt
    3. Next comes the compile process. Every user has different compile wants and needs. Read the options at ./configure --help for more info. I have given you an example below. Again, do not use my example unless those are the options that you want to use for your server.
    Code:
    root@xxx [php-5.1.4] phpize
    root@xxx [php-5.1.4] ./configure --with-apxs=/usr/local/apache/bin/apxs --prefix=/usr/local --with-xml --with-mm --with-dom --with-dom-xslt --with-dom-exslt --enable-exif --with-swf=/usr/local/flash --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-java=/usr/local/jdk --enable-mbstring --enable-mbstr-enc-trans --enable-mbregex --with-mcrypt --with-mhash --enable-magic-quotes --with-mm --with-mysqli --with-mysql=/usr --with-openssl --enable-discard-path --with-pear --with-pspell --enable-xslt --with-xslt-sablot --enable-sockets --enable-track-vars --with-ttf --with-freetype-dir=/usr --enable-gd-native-ttf --enable-wddx --with-xmlrpc --with-zip --with-zlib --enable-soap
    4. Now for the make process
    Code:
    root@xxx [php-5.1.4] make
    root@xxx [php-5.1.4] make install
    5. Follow the instructions above concerning the modifications to your php.ini file and httpd.conf file

    If this does not help, you can always hire one of the experts you find in these forums to do this install for you.
     
Loading...

Share This Page