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.

phpize problem

Discussion in 'General Discussion' started by Matt Wade, Oct 26, 2007.

  1. Matt Wade

    Matt Wade Member

    Joined:
    Jul 22, 2004
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    I'm having a problem that I think is related to the version of phpize on my system. /usr/bin and /usr/local/bin both have different versions of phpize. The one in /usr/bin/ is the correct one I believe, but after running easyapache3 (php5 and apache2.2), the one in /usr/local/bin/ is reverted again. Any ideas? Here's the output from phpize -v:

    /usr/bin/phpize -v

    Configuring for:
    PHP Api Version: 20041225
    Zend Module Api No: 20060613
    Zend Extension Api No: 220060519


    /usr/local/bin/phpize -v

    Configuring for:
    PHP Api Version: 20020918
    Zend Module Api No: 20020429
    Zend Extension Api No: 20050606
     
  2. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator

    I think the two different versions are the CLI and CGI versions. It compiles both when you run EasyApache3 I believe. Notice how you can choose between cgi / dso / suphp handlers. I imagine if you select 'cgi' as the handler it uses /usr/bin/php and /usr/bin/phpize (or that you should use phpize from that if you are running cgi), and that if you select 'suphp or dso that it uses /usr/local/bin/php and /usr/local/bin/phpize.

    I'm not them though. Take my thoughts for what they are worth :)

    Mike
     
  3. Matt Wade

    Matt Wade Member

    Joined:
    Jul 22, 2004
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    But, if it is the same version of PHP, it should still output the same thing. The API versions that the one in /usr/local/bin/ outputs relate to PHP I believe. I've checked my other servers and they are the same in /usr/bin/ and /usr/local/bin/.

    BTW, the problem I am diagnosing is why Suhosin isn't loading properly. I believe the problem lies in the fact that it isn't phpizing properly.
     
  4. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    Here is what I know on my system with PHP4 and PHP5, both running suPHP.

    PHP4 (cgi) files
    /usr/php4/bin/php
    /usr/php4/bin/php-config
    /usr/local/php4/lib/php.ini
    /usr/php4/bin/phpize
    Configuring for:
    PHP Api Version: 20020918
    Zend Module Api No: 20020429
    Zend Extension Api No: 20050606

    PHP5 (cli) files
    /usr/local/bin/php
    /usr/local/bin/php-config
    /usr/local/lib/php.ini (symlinked to /usr/local/Zend/etc/php.ini in my case)
    /usr/local/bin/phpize
    Configuring for:
    PHP Api Version: 20041225
    Zend Module Api No: 20060613
    Zend Extension Api No: 220060519

    PHP5 (cgi) files
    /usr/bin/php
    /usr/bin/php-config
    /usr/lib/php.ini (symlinked to /usr/local/lib/php.ini, symlinked to /usr/local/Zend/etc/php.ini)
    /usr/bin/phpize
    Configuring for:
    PHP Api Version: 20041225
    Zend Module Api No: 20060613
    Zend Extension Api No: 220060519

    It looks like your /usr/bin/php, /usr/bin/php-config and /usr/bin/phpize are probably your PHP5 CGI stuff and that your /usr/local/bin/php, /usr/local/bin/php-config and /usr/local/bin/phpize are probably old PHP4 CLI stuff.

    If you run a /usr/local/bin/php -v, does it report PHP 4.4.x (cli) and does /usr/bin/php -v report PHP 5.2.3 (cgi) ?

    Mike
     
  5. Matt Wade

    Matt Wade Member

    Joined:
    Jul 22, 2004
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Thanks...both /usr/bin/php and /usr/local/bin/php return 'PHP 5.2.4 (cli)", as I would expect. I am only running PHP 5.2.4 on this server.

    It's strange that the /usr/local/bin/phpize is being overwritten with the PHP4 version each time I run easyapache.
     
  6. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    4
    Trophy Points:
    18
    To test this out I removed these four paths (boy that felt awesome ;p):
    [root ~]# ls -l /usr/bin/php /usr/bin/phpize /usr/local/bin/php /usr/local/bin/phpize
    ls: /usr/bin/php: No such file or directory
    ls: /usr/bin/phpize: No such file or directory
    ls: /usr/local/bin/php: No such file or directory
    ls: /usr/local/bin/phpize: No such file or directory
    [root ~]#

    [built php4 only]
    [root ~]# ls -l /usr/bin/php /usr/bin/phpize /usr/local/bin/php /usr/local/bin/phpize
    -rwxr-xr-x 1 root root 4975337 Oct 29 08:03 /usr/bin/php
    -rwxr-xr-x 1 root root 3998 Oct 29 08:05 /usr/bin/phpize
    -rwxr-xr-x 1 root root 4977026 Oct 29 07:43 /usr/local/bin/php
    -rwxr-xr-x 1 root root 4010 Oct 29 07:47 /usr/local/bin/phpize
    [root ~]# md5sum /usr/bin/php /usr/bin/phpize /usr/local/bin/php /usr/local/bin/phpize
    d20ae03533ccdf1feee214ce72a84ef5 /usr/bin/php
    e61e9e87edcce4f2cb2a2e418dd77d3e /usr/bin/phpize
    32ec2597fe2cc4f27d1fec240dbe8258 /usr/local/bin/php
    f2e3e0da1e6066194877b89b7d420643 /usr/local/bin/phpize
    [root ~]#
    [root ~]# /usr/bin/php -v
    PHP 4.4.7 (cli) (built: Oct 29 2007 08:02:17)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
    [root ~]# /usr/bin/phpize
    Cannot find config.m4.
    Make sure that you run '/usr/bin/phpize' in the top level source directory of the module

    [root ~]# /usr/local/bin/php -v
    PHP 4.4.7 (cli) (built: Oct 29 2007 07:43:23)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
    [root ~]# /usr/local/bin/phpize
    Cannot find config.m4.
    Make sure that you run '/usr/local/bin/phpize' in the top level source directory of the module

    [root ~]#

    [removed them again and built php5 only]
    [root ~]# ls -l /usr/bin/php /usr/bin/phpize /usr/local/bin/php /usr/local/bin/phpize
    -rwxr-xr-x 1 root root 14673306 Oct 29 09:09 /usr/bin/php
    -rwxr-xr-x 1 root root 4172 Oct 29 09:12 /usr/bin/phpize
    -rwxr-xr-x 1 root root 14648092 Oct 29 08:45 /usr/local/bin/php
    -rwxr-xr-x 1 root root 4184 Oct 29 08:48 /usr/local/bin/phpize
    [root ~]# md5sum /usr/bin/php /usr/bin/phpize /usr/local/bin/php /usr/local/bin/phpize
    c68da5eb4b222dded5f3e907a019bfd3 /usr/bin/php
    0b1919b2e6040ed4f7d7ba1da1f48bf0 /usr/bin/phpize
    9dc940606cf849edc67322c6d86676f0 /usr/local/bin/php
    99a0e39f63385b1c63700f8e9cc786cb /usr/local/bin/phpize
    [root ~]# /usr/bin/php -v
    PHP 5.2.4 (cli) (built: Oct 29 2007 09:08:22)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
    [root ~]# /usr/bin/phpize
    Cannot find config.m4.
    Make sure that you run '/usr/bin/phpize' in the top level source directory of the module

    [root ~]# /usr/local/bin/php -v
    PHP 5.2.4 (cli) (built: Oct 29 2007 08:43:43)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
    [root ~]# /usr/local/bin/phpize
    Cannot find config.m4.
    Make sure that you run '/usr/local/bin/phpize' in the top level source directory of the module

    [root ~]#

    [removed them again and built php4 and php5]
    [after php4 was done but php5 was not]
    [root ~]# ls -l /usr/bin/php /usr/bin/phpize /usr/local/bin/php /usr/local/bin/phpize
    ls: /usr/bin/php: No such file or directory
    ls: /usr/bin/phpize: No such file or directory
    ls: /usr/local/bin/php: No such file or directory
    ls: /usr/local/bin/phpize: No such file or directory
    [root ~]# md5sum /usr/bin/php /usr/bin/phpize /usr/local/bin/php /usr/local/bin/phpize
    md5sum: /usr/bin/php: No such file or directory
    md5sum: /usr/bin/phpize: No such file or directory
    md5sum: /usr/local/bin/php: No such file or directory
    md5sum: /usr/local/bin/phpize: No such file or directory
    [root ~]#

    that is becasue when both are built php4 is in a different location:
    [root ~]# ls -l /usr/php4/bin/php /usr/php4/bin/phpize /usr/local/php4/bin/php /usr/local/php4/bin/phpize
    -rwxr-xr-x 1 root root 4977090 Oct 29 10:05 /usr/local/php4/bin/php
    -rwxr-xr-x 1 root root 4020 Oct 29 10:08 /usr/local/php4/bin/phpize
    -rwxr-xr-x 1 root root 4975337 Oct 29 10:25 /usr/php4/bin/php
    -rwxr-xr-x 1 root root 4008 Oct 29 10:28 /usr/php4/bin/phpize
    [root ~]# md5sum /usr/php4/bin/php /usr/php4/bin/phpize /usr/local/php4/bin/php /usr/local/php4/bin/phpize
    189b2474b03c99a8570c34c80292e939 /usr/php4/bin/php
    9194feea760fc9e1158ddfa95d28745d /usr/php4/bin/phpize
    a1f80b4436b9bcffa6a39a34eece91c7 /usr/local/php4/bin/php
    8aa4c141e29d614fbac80e3d9b011543 /usr/local/php4/bin/phpize
    [root ~]# /usr/php4/bin/php -v
    PHP 4.4.7 (cli) (built: Oct 29 2007 10:24:23)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
    [root ~]# /usr/php4/bin/phpize
    Cannot find config.m4.
    Make sure that you run '/usr/php4/bin/phpize' in the top level source directory of the module

    [root ~]# /usr/local/php4/bin/php -v
    PHP 4.4.7 (cli) (built: Oct 29 2007 10:05:03)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
    [root ~]# /usr/local/php4/bin/phpize
    Cannot find config.m4.
    Make sure that you run '/usr/local/php4/bin/phpize' in the top level source directory of the module

    [root ~]#


    [after php5 was done]
    [root ~]# ls -l /usr/bin/php /usr/bin/phpize /usr/local/bin/php /usr/local/bin/phpize
    -rwxr-xr-x 1 root root 14673306 Oct 29 11:21 /usr/bin/php
    -rwxr-xr-x 1 root root 4172 Oct 29 11:25 /usr/bin/phpize
    -rwxr-xr-x 1 root root 14648092 Oct 29 10:55 /usr/local/bin/php
    -rwxr-xr-x 1 root root 4184 Oct 29 10:59 /usr/local/bin/phpize
    [root ~]# md5sum /usr/bin/php /usr/bin/phpize /usr/local/bin/php /usr/local/bin/phpize
    3fb23d1e9ba8fa01111344df4624c41a /usr/bin/php
    0b1919b2e6040ed4f7d7ba1da1f48bf0 /usr/bin/phpize
    e9d5e6baca50a99f07822e86ce47ec96 /usr/local/bin/php
    99a0e39f63385b1c63700f8e9cc786cb /usr/local/bin/phpize
    [root ~]# /usr/bin/php -v
    PHP 5.2.4 (cli) (built: Oct 29 2007 11:20:21)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
    [root ~]# /usr/bin/phpize
    Cannot find config.m4.
    Make sure that you run '/usr/bin/phpize' in the top level source directory of the module

    [root ~]# /usr/local/bin/php -v
    PHP 5.2.4 (cli) (built: Oct 29 2007 10:53:55)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
    [root ~]# /usr/local/bin/phpize
    Cannot find config.m4.
    Make sure that you run '/usr/local/bin/phpize' in the top level source directory of the module

    [root ~]#

    As you can see the PHP 4 version of 'phpize' was overwritten by PHP5's. So the only way it'd be left over AFAIK is if the build failed, you only have 4, or the filesystem is not allowing it.
     
Loading...

Share This Page