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.

Getting PHP 4.0.6 to work

Discussion in 'General Discussion' started by WildWayz, Aug 15, 2001.

  1. WildWayz

    WildWayz Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    209
    Likes Received:
    0
    Trophy Points:
    16
    Hi all,

    I got my new webserver yesterday, and PHP wasn\'t compiled with Apache, so php pages were being downloaded as opposed to parsed, so I tried recompiling Apache and PHP only to end up killing some of CPanel/WHM.

    I have now uninstalled CPanel/WHM and reinstalled it, but still PHP files are not being parsed.

    Does anyone have any instructions how they got PHP to work with their CPanel installation?

    There is no php4lib.so (I think that\'s it\'s name) in /usr/local/apache/libexec and no appropriate LoadModule for it.

    Any ideas?

    --James

    PS - Thank you :)
     
  2. WildWayz

    WildWayz Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    209
    Likes Received:
    0
    Trophy Points:
    16
    hi ya

    [quote:2630159f64]
    make[3]: Entering directory `/tmp/selfgz13523/php-4.0.6/ext/ftp\'
    make[4]: Entering directory `/tmp/selfgz13523/php-4.0.6/ext/ftp\'
    make[4]: Nothing to be done for `install-p\'.
    make[4]: Leaving directory `/tmp/selfgz13523/php-4.0.6/ext/ftp\'
    make[3]: Leaving directory `/tmp/selfgz13523/php-4.0.6/ext/ftp\'
    Making install in gd
    make[3]: Entering directory `/tmp/selfgz13523/php-4.0.6/ext/gd\'
    make[4]: Entering directory `/tmp/selfgz13523/php-4.0.6/ext/gd\'
    gcc -I. -I/tmp/selfgz13523/php-4.0.6/ext/gd -I/tmp/selfgz13523/php-4.0.6/main -I/tmp/selfgz13523/php-4.0.6 -I/tmp/selfgz13523/php-4.0.6/Zend -I/usr/include/freetype -I/tmp/selfgz13523/gd-1.8.4 -I/tmp/selfgz13523/imap-2001.BETA.SNAP-0105220031/c-client -I/tmp/selfgz13523/php-4.0.6/ext/mysql/libmysql -I/usr/local/flash/include -I/tmp/selfgz13523/php-4.0.6/ext/xml/expat/xmltok -I/tmp/selfgz13523/php-4.0.6/ext/xml/expat/xmlparse -I/tmp/selfgz13523/php-4.0.6/TSRM -DSUPPORT_UTF8 -DXML_BYTE_ORDER=12 -g -O2 -c gd.c && touch gd.lo
    gd.c: In function `php_minit_gd\':
    gd.c:296: `gdPie\' undeclared (first use in this function)
    gd.c:296: (Each undeclared identifier is reported only once
    gd.c:296: for each function it appears in.)
    gd.c:297: `gdChord\' undeclared (first use in this function)
    gd.c:298: `gdNoFill\' undeclared (first use in this function)
    gd.c:299: `gdEdged\' undeclared (first use in this function)
    gd.c: In function `php_if_imagecreatetruecolor\':
    gd.c:577: warning: assignment makes pointer from integer without a cast
    make[4]: *** [gd.lo] Error 1
    make[4]: Leaving directory `/tmp/selfgz13523/php-4.0.6/ext/gd\'
    make[3]: *** [install-recursive] Error 1
    make[3]: Leaving directory `/tmp/selfgz13523/php-4.0.6/ext/gd\'
    make[2]: *** [install-recursive] Error 1
    make[2]: Leaving directory `/tmp/selfgz13523/php-4.0.6/ext\'
    make[1]: *** [install-recursive] Error 1
    make[1]: Leaving directory `/tmp/selfgz13523/php-4.0.6\'
    [/quote:2630159f64]

    That is the error I get when trying to rebuild Apache/PHP/GD.

    I have tried buildapache.sea, frontpage5.sea etc and each time PHP falls over when it gets to that part.

    Any ideas?

    I think the server is RH7.1 - I requested 6.2 but they didn\'t install it :/

    Please help

    --James
     
  3. Brownie

    Brownie Well-Known Member

    Joined:
    Aug 10, 2001
    Messages:
    145
    Likes Received:
    0
    Trophy Points:
    16
    Dnt know if its any help but I use this when I build php - saves lots a typing ;)

    [code:1:11b8caa190]
    #!/bin/bash

    cd /tmp
    rm -rf php-4.0.6
    echo "##############################################"
    echo "# PHP 4.0.6 BUILDER #"
    echo "##############################################"

    echo "[GRABBING SOURCE CODE FROM PHP.NET]"
    wget -q http://php.net/do_download.php?download_file=php-4.0.6.tar.gz&source_site=www.php.net
    echo "--> got it"

    echo "[DECOMPRESSING]"
    tar -xzf php-4.0.6.tar.gz
    echo "--> done"

    cd php-4.0.6

    echo "[CONFIGURING PHP]"

    ./configure --with-apxs=/usr/local/apache/bin/apxs --with-xml --enable-ftp --with-gd --with-zlib --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-xpm-dir=/usr/X11R6 --with-swf=/usr/local/flash --enable-magic-quotes --with-mysql --enable-safe-mode --enable-track-vars --with-ttf --enable-versioning --with-mcrypt --enable-sockets --enable-calendar --with-ming

    echo "--> PHP Configured"

    echo "[BUILDING BINARY]"
    make
    echo "--> Binary Built"

    echo "If no errors have occured above, you can now run the command 'make install'."
    [/code:1:11b8caa190]

    [Edited on 16/8/2001 by Nicholas Brown]
     
  4. WildWayz

    WildWayz Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    209
    Likes Received:
    0
    Trophy Points:
    16
    OMG - thanks Nicholas!

    It now seems to be working - will this mess up any CPanel updates?

    --James
     
  5. WildWayz

    WildWayz Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    209
    Likes Received:
    0
    Trophy Points:
    16
    Ack new problem...

    The problem now is that when I make a new account in WHM, I log into the users control panel and I get his error wherever there is a reference to MySQL.

    Warning: MySQL Connection Failed: Access denied for user: \'root@localhost\' (Using password: NO) in /usr/local/cpanel/base/3rdparty/phpMyAdmin/lib.inc.php on line 226
    Error

    Any ideas?

    --James
     
  6. Brownie

    Brownie Well-Known Member

    Joined:
    Aug 10, 2001
    Messages:
    145
    Likes Received:
    0
    Trophy Points:
    16
    >> will this mess up any CPanel updates?
    Ive been running it on ours and it hasnt affected anything - it just builds it all for you so it cant do anything really :)

    >>Warning: MySQL Connection Failed: Access denied for user: \'root@localhost\' (Using password: NO) in /usr/local/cpanel/base/3rdparty/phpMyAdmin/lib.inc.php on line 226
    Error

    Have you tried Changing or re-setting the root mysql password?
     
  7. WildWayz

    WildWayz Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    209
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    When I change MySQL\'s root password I get this

    \"grep: /root/.my.cnf: No such file or directory Password changed for root to xxxxxxxxxxxxx\"

    Is that a problem?
    This was done through WHM

    --James
     
  8. WildWayz

    WildWayz Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    209
    Likes Received:
    0
    Trophy Points:
    16
    Hi again,

    .my.cnf was somehow located in / so I copied it to /root.

    It still shows up with the above error.

    Hmmm changed the password again, and it is updating /.my.cnf and not /root/.my.cnf .

    Any other ideas?

    --James
     
  9. totalufo

    totalufo Well-Known Member

    Joined:
    Jan 17, 2002
    Messages:
    160
    Likes Received:
    0
    Trophy Points:
    16
    [quote:deb0799631][i:deb0799631]Originally posted by Brownie[/i:deb0799631]

    Dnt know if its any help but I use this when I build php - saves lots a typing ;)

    [code:1:deb0799631]
    #!/bin/bash

    cd /tmp
    rm -rf php-4.0.6
    echo &##############################################&
    echo &# PHP 4.0.6 BUILDER #&
    echo &##############################################&

    echo &[GRABBING SOURCE CODE FROM PHP.NET]&
    wget -q http://php.net/do_download.php?download_file=php-4.0.6.tar.gz&source_site=www.php.net
    echo &--& got it&

    echo &[DECOMPRESSING]&
    tar -xzf php-4.0.6.tar.gz
    echo &--& done&

    cd php-4.0.6

    echo &[CONFIGURING PHP]&

    ./configure --with-apxs=/usr/local/apache/bin/apxs --with-xml --enable-ftp --with-gd --with-zlib --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-xpm-dir=/usr/X11R6 --with-swf=/usr/local/flash --enable-magic-quotes --with-mysql --enable-safe-mode --enable-track-vars --with-ttf --enable-versioning --with-mcrypt --enable-sockets --enable-calendar --with-ming

    echo &--& PHP Configured&

    echo &[BUILDING BINARY]&
    make
    echo &--& Binary Built&

    echo &If no errors have occured above, you can now run the command 'make install'.&
    [/code:1:deb0799631]

    [Edited on 16/8/2001 by Nicholas Brown][/quote:deb0799631]

    What's the best way to execute this script?
     
  10. moronhead

    moronhead Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    706
    Likes Received:
    0
    Trophy Points:
    16
    [quote:6de0007054][i:6de0007054]Originally posted by WildWayz[/i:6de0007054]

    Hi again,

    .my.cnf was somehow located in / so I copied it to /root.

    It still shows up with the above error.

    Hmmm changed the password again, and it is updating /.my.cnf and not /root/.my.cnf .

    Any other ideas?

    --James[/quote:6de0007054]

    Once you've changed the root MySQL password in WHM update /root/.my.cnf manually with the same password you just entered in WHM.
     
Loading...

Share This Page