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 Problem

Discussion in 'General Discussion' started by totalufo, Mar 16, 2002.

  1. totalufo

    totalufo Well-Known Member

    Joined:
    Jan 17, 2002
    Messages:
    160
    Likes Received:
    0
    Trophy Points:
    16
    I found this script in another post about fixing PHP that has not been installed during the Apache build.

    [code:1:c0d94f85da]
    #!/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:c0d94f85da]

    Is this how to install php if it's missing on the server?

    How do you execute this script??

    I know there is a thread on this but I don't think it's being noticed. I see a lot of people having this problem and hope this is the solution.
     
  2. sina

    sina Active Member

    Joined:
    Mar 7, 2002
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    sometimes on Cpanel installs you think PHP is not installed but it is ! what you gotta do is open up the /etc/httpd/conf/httpd.conf
    and after the cpanel installation where all the application types are listed add the following lines:

    AddType application/x-httpd-php .php .phtml .php4
    AddType application/x-httpd-php-source .phps

    LoadModule php4_module libexec/libphp4.so

    AddModule mod_php4.c

    you should be all set after !! remember to restart your apache

    Sina Loghavi
     
  3. totalufo

    totalufo Well-Known Member

    Joined:
    Jan 17, 2002
    Messages:
    160
    Likes Received:
    0
    Trophy Points:
    16
    I managed to fix it buy rebuilding apache in the /tmp directory with the default settings. Fixed it without a hitch!
     
  4. creighton

    creighton Registered

    Joined:
    Aug 12, 2001
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    totalufo:

    Can you give a description of how you accomplished this?

    I add the appropriate lines in httpd.conf and stop/start Apache and it fails each time.
     
  5. totalufo

    totalufo Well-Known Member

    Joined:
    Jan 17, 2002
    Messages:
    160
    Likes Received:
    0
    Trophy Points:
    16
    you need to rebuild apache
    http://support.cpanel.net/obb/read.php?TID=1816

    read the 4th post down by shaun
     
Loading...

Share This Page