Results 1 to 5 of 5

Thread: looking voor howto suPHP for apache 1.3 and PHP5

  1. #1
    Join Date
    Jan 2005
    Location
    Netherlands
    Posts
    230

    looking voor howto suPHP for apache 1.3 and PHP5

    Hello,

    I search for a howto install suPHP on a directAdmin machine with Apache 1.3.x and PHP5.

    Please no links to howtos for PHP4 + PHP5 and suPHP.
    Only a link howto install suphp witch apache 1.3 and PHP5

  2. #2
    Join Date
    Aug 2006
    Location
    LT, EU
    Posts
    7,490
    Code:
    cd /usr/local/directadmin/customapache
    wget http://de.php.net/get/php-5.2.1.tar.gz/from/this/mirror
    wget http://www.suphp.org/download/suphp-0.6.2.tar.gz
    tar xzf php-5.2.1.tar.gz
    tar xzf suphp-0.6.2.tar.gz
    cd php-5.2.1
    ./configure --prefix=/usr/local/php5 --enable-force-cgi-redirect --enable-fastcgi --with-config-file-path=/usr/local/etc/php5/cgi --with-curl --with-curl-dir=/usr/local/lib --with-gd --with-gd-dir=/usr/local/lib --with-gettext --with-jpeg-dir=/usr/local/lib --with-kerberos --with-mcrypt --with-mhash --with-mysql=/usr --with-pear --with-png-dir=/usr/local/lib --with-xml --with-zlib --with-zlib-dir=/usr/local/lib --with-zip --enable-bcmath --enable-calendar --enable-ftp --enable-magic-quotes --enable-sockets --enable-track-vars --enable-mbstring --enable-memory-limit
    make
    make install
    cd ../suphp-0.6.2
    ./configure --prefix=/usr/local/suphp --sysconfdir=/usr/local/suphp/etc/ --with-apache-user=apache --with-setid-mode=owner --with-apxs=/usr/sbin/apxs --disable-checkpath
    make
    make install
    mkdir -p /usr/local/etc/php5/cgi
    mkdir -p /usr/local/suphp/etc
    cp ../php-5.2.1/php.ini-dist /usr/local/etc/php5/cgi/php.ini
    cp /etc/httpd/conf/httpd.conf httpd.conf.original
    touch /var/log/suphp.log
    echo "webserver_user=apache" > /usr/local/suphp/etc/suphp.conf
    echo "docroot=/" >> /usr/local/suphp/etc/suphp.conf
    echo "check_vhost_docroot=false" >> /usr/local/suphp/etc/suphp.conf
    echo "x-httpd-php=php:/usr/local/php5/bin/php" >> /usr/local/suphp/etc/suphp.conf
    Edit httpd.conf:
    Code:
    vi /etc/httpd/conf/httpd.conf
    After the last LoadModule add:
    Code:
    LoadModule suphp_module /usr/lib/apache/mod_suphp.so
    And after the last AddModule in the file add:
    Code:
    AddModule mod_suphp.c
    After
    Code:
    AddHandler cgi-script .cgi .pl
    add this:
    Code:
    AddHandler x-httpd-php .php .inc .php4 .php5
    And at the end of file add:
    Code:
    <Location />
     suPHP_Engine on
     suPHP_ConfigPath /usr/local/etc/php5/cgi/
     suPHP_AddHandler x-httpd-php
     </Location>
    After the changes restart apache:
    Code:
    /etc/init.d/httpd restart
    Don't forget to remove mod_php5.so and mod_php5.c from httpd.conf too
    Martynas Bendorius
    MB Martynas IT. Professional server management company. Official DirectAdmin, CloudLinux, LiteSpeed and Comodo partners.

  3. #3
    Join Date
    Jan 2005
    Location
    Netherlands
    Posts
    230
    Tanks for your howto.

    But is it posible to run PHP5 normaly?
    (not in cgi mode)

  4. #4
    Join Date
    Aug 2006
    Location
    LT, EU
    Posts
    7,490
    It's very easy There is a how-to: http://help.directadmin.com/item.php?id=135
    Martynas Bendorius
    MB Martynas IT. Professional server management company. Official DirectAdmin, CloudLinux, LiteSpeed and Comodo partners.

  5. #5
    Join Date
    Jan 2005
    Location
    Netherlands
    Posts
    230
    Quote Originally Posted by smtalk View Post
    It's very easy There is a how-to: http://help.directadmin.com/item.php?id=135
    I already done that, but now whe want to install suPHP.
    But php must be run in normaly mode, not in cgi.

    So is it posible to upgrade php5 normaly (see above)
    and then install suPHP?

Similar Threads

  1. Replies: 4
    Last Post: 03-05-2011, 08:02 PM
  2. HOWTO : SuPHP
    By nebukazar in forum How-To Guides
    Replies: 69
    Last Post: 05-20-2007, 05:19 AM
  3. Build script : Apache + suPHP + PHP4 + PHP5
    By Maniak in forum Feedback & Feature Requests
    Replies: 3
    Last Post: 07-01-2006, 02:16 PM
  4. [HOWTO] SuPHP
    By 12Media in forum DirectAdmin General Discussion
    Replies: 5
    Last Post: 02-02-2004, 10:43 PM
  5. [HOWTO] SuPHP
    By 12Media in forum How-To Guides
    Replies: 5
    Last Post: 02-02-2004, 10:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •