Results 1 to 7 of 7

Thread: PHP 4.2.3 BUG IN LAST CPANEL APACHE.

  1. #1
    Member cass's Avatar
    Join Date
    Jul 2002
    Location
    Argentina/USA/Mexico
    Posts
    355

    Default PHP 4.2.3 BUG IN LAST CPANEL APACHE.

    The bug : http://bugs.php.net/bug.php?id=20114

    A possible solution? (from the MB forums...)

    [quote:998f165c27]
    PHP 4.2.3 (Cpanel Tutorial)
    If you have a cpanel server, I wrote this tutorial for our dedicated customers:

    Step One

    cd /home/cpapachebuild/buildapache/php-4.2.3

    Step Two

    './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-mcrypt=/usr/lib/libmcrypt' '--with-xml' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--with-gd=../gd-1.8.4' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-imap' '--with-kerberos' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-ming=../ming-0.2a' '--enable-magic-quotes' '--with-mysql' '--with-pear' '--enable-safe-mode' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--enable-versioning' '--with-zlib'

    Step Three

    make

    Step Four

    make install

    Step Five

    cd /home/cpapachebuild/buildapache/

    Step Six

    touch 4.2.3-patch

    Step Seven

    pico -w 4.2.3-patch

    Step Eight

    --- php-4.2.3/ext/mbstring/mbstring.c.org 2002-09-19 22:32:22.000000000
    +0200
    +++ php-4.2.3/ext/mbstring/mbstring.c 2002-09-19 22:29:32.000000000
    +0200
    @@ -1031,15 +1031,18 @@
    var = php_strtok_r(res, separator, &strtok_buf);
    while (var) {
    val = strchr(var, '=');
    - val_list[n] = var;
    - len_list[n] = php_url_decode(var, strlen(var));
    - n++;
    if (val) { /* have a value */
    *val++ = '\0';
    + val_list[n] = var;
    + len_list[n] = php_url_decode(var, strlen(var));
    + n++;
    val_list[n] = val;
    len_list[n] = php_url_decode(val, strlen(val));
    } else {
    - val_list[n] = &&;
    + val_list[n] = var;
    + len_list[n] = php_url_decode(var, strlen(var));
    + n++;
    + val_list[n] = &&;
    len_list[n] = 0;
    }
    n++;
    ----------------

    Step Nine

    patch & 4.2.3-patch

    Step Ten

    php-4.2.3/ext/mbstring/mbstring.c

    Step Eleven

    './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-mcrypt=/usr/lib/libmcrypt' '--with-xml' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--with-gd=../gd-1.8.4' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-imap' '--with-kerberos' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-ming=../ming-0.2a' '--enable-magic-quotes' '--with-mysql' '--with-pear' '--enable-safe-mode' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--enable-versioning' '--with-zlib'

    Step Twelve

    make

    Step Thirteen

    make install

    Step Fourteen

    service httpd restart
    [/quote:998f165c27]

    I dont know if this works or not ...
    NICK... can you please make a new build apache with this?
    or another solution ... I have compiled apache 3 times in the last hours.... and I keep getting the error.

    Also... here you can view it working:
    http://www.cascompany.com/phpbug.php

    (if I make it work... I will remove this link... heh)
    Carlos Ariel Sepúlveda
    CAS company :: 1997-2011, 14 Years! :: Dedicated Attitude
    http://www.cascompany.com :: Providing CPANEL/WHM Servers since 2002 !

  2. #2
    Member
    Join Date
    Aug 2001
    Posts
    365

    Default

    Any luck yet? I need this fixed too...
    Webhostingtalk.nl :: For all your Dutch (AMS-IX - Amsterdam) and European hosting quotes
    The best and only hosting forum you need in Europe
    You can ask your quotes and questions in English!

  3. #3
    Member cass's Avatar
    Join Date
    Jul 2002
    Location
    Argentina/USA/Mexico
    Posts
    355

    Default

    Oh, I have it working now ...

    I compiled it WITHOUT mbstring .... just this and it worked.

    this config worked for me:
    './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--enable-ftp' '--with-gd=../gd-2.0.4' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--enable-magic-quotes' '--with-mysql' '--with-pear' '--enable-sockets' '--enable-track-vars' '--enable-versioning' '--with-zlib'

    hope it helps.
    Regards.
    Carlos Ariel Sepúlveda
    CAS company :: 1997-2011, 14 Years! :: Dedicated Attitude
    http://www.cascompany.com :: Providing CPANEL/WHM Servers since 2002 !

  4. #4
    bdraco
    Guest

    Default

    mbstring is disabled by default in newer buildapaches

  5. #5
    Member cass's Avatar
    Join Date
    Jul 2002
    Location
    Argentina/USA/Mexico
    Posts
    355

    Default

    yeah, I know that, but this &patch& I posted here is supposed to FIX the problem with mbstring...

    and if you have time ... maybe you can try & test it, and see if it works ... so you can make a new buildapache already patched.

    Thanks!
    Carlos Ariel Sepúlveda
    CAS company :: 1997-2011, 14 Years! :: Dedicated Attitude
    http://www.cascompany.com :: Providing CPANEL/WHM Servers since 2002 !

  6. #6
    Member cass's Avatar
    Join Date
    Jul 2002
    Location
    Argentina/USA/Mexico
    Posts
    355

    Default

    Also ... to test the bug is EASY, very very EASY.

    just make a somename.php with :

    &form action=&&?=$_SELF?&& method=&POST&&
    &input name=&variable[]& value=&123456789&&
    &input name=&variable[]& value=&abcdefghi&&
    &input type=submit value=submit name=submit&
    &/form&
    &pre&
    &?=print_r($_POST);?&
    &/pre&

    save & run it ...
    if you see 56789 & efghi ... it's bad :P

    Regards.
    Carlos Ariel Sepúlveda
    CAS company :: 1997-2011, 14 Years! :: Dedicated Attitude
    http://www.cascompany.com :: Providing CPANEL/WHM Servers since 2002 !

  7. #7
    Member
    Join Date
    Nov 2001
    Posts
    49

    Default

    another bug identified in 4.2.3....can we get a fix in the cpanel update?

    http://bugs.php.net/bug.php?id=20355


    This one strips 4 characters from form input.

Similar Threads

  1. cPanel Bug, Apache failed
    By Planet_Master in forum cPanel & WHM Discussions
    Replies: 11
    Last Post: 02-19-2008, 02:20 AM
  2. Bug during Apache/PHP compile
    By trparky in forum cPanel & WHM Discussions
    Replies: 22
    Last Post: 11-17-2005, 06:07 PM
  3. Cpanel Apache Bug ???
    By ServerGuru in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 02-01-2005, 06:16 AM
  4. Apache/Cpanel Bug?!
    By Rad in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 06-14-2004, 03:32 PM
  5. Major bug with apache on CPanel : images are not cached...
    By mpierre in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 10-10-2003, 08:39 AM