Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Jan 2004
    Posts
    107

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

    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...r-v4.1/INSTALL
    http://pdoru.from.ro/upload-progress...-patch/INSTALL
    http://pdoru.from.ro/upload-progress..._meter/INSTALL

    how I can install this on cPanel server?


    Thanks.

    Sorry if my english poor

  2. #2
    Member
    Join Date
    Jul 2003
    Posts
    50

    Default

    Hello,

    I need this too. Did you figure it out?

    Regards,

    Rex

  3. #3
    cPanel Partner NOC cPanel Partner NOC Badge AndyReed's Avatar
    Join Date
    May 2004
    Location
    Minneapolis, MN
    Posts
    2,223

    Default

    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.
    Andy Reed
    RHCE and CCNA
    ServerTune.com

  4. #4
    Registered User
    Join Date
    Jul 2003
    Posts
    2

    Default You ever get this working?

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

  5. #5
    Member freedog96150's Avatar
    Join Date
    Mar 2005
    Location
    Nevada, USA
    Posts
    68

    Default

    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.
    **********************
    Brian Frias
    "Without fear, there is no
    courage"
    **********************

Similar Threads & Tags
Similar threads

  1. bytesCode PHP Encoder next request for cPanel PHP extension build in
    By RodrigoGregorio in forum Feature Requests for cPanel/WHM
    Replies: 0
    Last Post: 11-12-2010, 04:30 PM
  2. SOAP extension for cPanel PHP
    By cyon in forum cPanel and WHM Discussions
    Replies: 15
    Last Post: 12-12-2009, 02:37 AM
  3. PHP MSSQL extension with cPanel
    By Xtrm2Matt in forum cPanel and WHM Discussions
    Replies: 9
    Last Post: 07-30-2009, 02:37 PM
  4. Can I somehow patch PHP on server with cpanel???
    By x-man in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 01-31-2006, 04:28 PM
  5. Replies: 0
    Last Post: 01-30-2006, 06:34 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube