Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 11 of 11
  1. #1
    Member
    Join Date
    Aug 2005
    Posts
    7

    Default php5 as apache module

    i tryed searching for php5 and i didnt find an awnser (mostly how to run php5 with php4)

    im trying to install php5 as an apache module (i dont want to run it along side php4) but what ever i try it allways runs as cgi.

    my VPS is running WHM 10.1.0 cPanel 10.2.0-R82 Fedora i686 - WHM X v3.1.0 and i try to update php through the update apache link in whm.

    these are the selected items in the update apache page

    Expires Module
    Raise FD_SETSIZE to 16384 (System Wide)
    Prevent Users from reading other webroots
    Frontpage Module
    Raise HARD_SERVER_LIMIT
    Php Module (Version 4.3.3)
    Version 5.0.4
    Bc Math
    Calendar Support
    Curl (Version 7.12.0)
    FTP
    GD (Version 2.0.15)
    Magic Quotes
    Mysql Module
    Discard Path
    Pear
    Sockets
    Track Vars
    Versioning
    Zlib
    PHP suEXEC Support
    Report Build Errors to cPanel
    Rewrite Module
    SSL Module (Version 2.8.22)
    suEXEC Module


    whats confusing is the module part of the httpd.conf file has both php4 and php5 commented out (and if i un comment out the php 5 parts, apache fails to start)

    LoadModule rewrite_module libexec/mod_rewrite.so
    LoadModule expires_module libexec/mod_expires.so
    #LoadModule php4_module libexec/libphp4.so
    LoadModule bwlimited_module libexec/mod_bwlimited.so
    LoadModule bytes_log_module libexec/mod_log_bytes.so
    LoadModule auth_passthrough_module libexec/mod_auth_passthrough.so
    #LoadModule php5_module libexec/libphp5.so

    # Reconstruction of the complete module list from all available modules
    # (static and shared ones) to achieve correct module execution order.
    # [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO]
    ClearModuleList
    AddModule mod_env.c
    AddModule mod_log_config.c
    AddModule mod_mime.c
    AddModule mod_negotiation.c
    AddModule mod_status.c
    AddModule mod_include.c
    AddModule mod_autoindex.c
    AddModule mod_dir.c
    AddModule mod_cgi.c
    AddModule mod_asis.c
    AddModule mod_imap.c
    AddModule mod_actions.c
    AddModule mod_userdir.c
    AddModule mod_alias.c
    AddModule mod_rewrite.c
    AddModule mod_access.c
    AddModule mod_auth.c
    AddModule mod_expires.c
    AddModule mod_so.c
    AddModule mod_setenvif.c
    <IfDefine SSL>
    AddModule mod_ssl.c
    </IfDefine>
    AddModule mod_frontpage.c
    #AddModule mod_php4.c
    AddModule mod_bwlimited.c
    AddModule mod_log_bytes.c
    AddModule mod_auth_passthrough.c
    #AddModule mod_php5.c


    here is the php info http://vadertrophy.com/phpinfo.php

    any help to getting it running as an apache module is great

  2. #2
    Member
    Join Date
    Aug 2005
    Posts
    7

    Default

    yes i was told to do that last time. and it didnt make a difference

  3. #3
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    When you do the php/apache build, have you made sure that the box "Skip Apache Build if up to date" is not ticked. If it is, then you should untick it and rebuild.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  4. #4
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    Next thing to try would be to make sure that you delete /home/cpapachebuild before running the build again. If this still fails, I'd log a support ticket with cPanel as it should clearly work.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  5. #5
    Member
    Join Date
    Aug 2005
    Posts
    7

    Default

    am i allowed to log a support ticket with cpanel? because my cpanel license is bought through my host (but they dont offer support for things like this without extra charge)

  6. #6
    Member
    Join Date
    Aug 2005
    Posts
    7

    Default

    ok thanks.

    its a production machine so i cant take it down until midnight. ill post back to let you know the result

    [edit]

    thats the 2nd time its put my reply above your post

  7. #7
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    For something like this I would say, yes. You can always mention the fact to them when logging and they'll let you know if it's a problem.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  8. #8
    Member
    Join Date
    Aug 2005
    Posts
    7

    Default

    ok i just tryed it and it seemed to have killed itself. all php files now want to be downloaded instead of executed

    Building Apache Config.....Done
    Downloading and compiling apache+modules....

    Verifying archive integrity... All good.
    Uncompressing buildapache.............................................................................................................................
    Verifying compiler and libs....Verifying installation....Using newyum support
    Setting up Install Process
    Setting up Repos
    Reading repository metadata in from local files
    Excluding Packages in global exclude list
    Finished
    Nothing to do
    Using newyum support
    Setting up Install Process
    Setting up Repos
    Reading repository metadata in from local files
    Excluding Packages in global exclude list
    Finished
    Nothing to do
    Done
    Done
    ********************************
    This is buildapache version 10.5.1
    ********************************
    buildapache configured from Web Host Manager
    Apache configured from Web Host Manager!
    Untarring expat...Done

    configure expat-1.95.6...(--prefix=/usr).... . . . . . . . . Done

    make -j 4 expat-1.95.6....... . . . . . . . . . . . . . . Done

    make expat-1.95.6...(install).... Done

    Untarring apache....
    Suexec w/php Standard Patch
    patching file configure
    patching file src/main/util_script.c
    patching file src/modules/standard/mod_cgi.c
    patching file src/support/suexec.c
    patching file src/support/suexec.h
    Suexec MailMan Patch
    patching file src/support/suexec.c
    Hunk #1 succeeded at 477 (offset 42 lines).
    Fileprotect Suexec+Php Standard Patch
    patching file src/support/suexec.c
    Hunk #1 succeeded at 231 (offset -44 lines).
    Hunk #3 succeeded at 599 (offset -44 lines).
    HTTPS var Standard Patch
    patching file src/support/suexec.c
    Hunk #1 succeeded at 138 (offset -36 lines).

    configure apache_1.3.33...(--enable-shared=max).... . . . . . . . . . Done

    patching file src/include/httpd.h
    Hunk #1 succeeded at 272 (offset -44 lines).
    Untarring modssl....
    patching file pkg.sslmod/libssl.module

    configure mod_ssl-2.8.22-1.3.33...(--with-apache=../apache_1.3.33 --with-ssl=/usr --enable-module=expires --enable-shared=expires --add-module=../mod_frontpage.c --enable-suexecphp --enable-module=rewrite --enable-shared=rewrite --enable-suexec --suexec-logfile=/usr/local/apache/logs/suexec_log --suexec-caller=nobody --suexec-uidmin=100 --suexec-gidmin=100 --suexec-docroot=/ --suexec-userdir=public_html).... . . . . . . . . . . . . . . . . . . . . . . Done

    configure apache_1.3.33...(--enable-module=ssl --enable-module=expires --enable-shared=expires --add-module=../mod_frontpage.c --enable-suexecphp --enable-module=rewrite --enable-shared=rewrite --enable-suexec --suexec-logfile=/usr/local/apache/logs/suexec_log --suexec-caller=nobody --suexec-uidmin=100 --suexec-gidmin=100 --suexec-docroot=/ --suexec-userdir=public_html).... . . . . . . . . . . . . . . Done

    make -j 4 apache_1.3.33....... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Done

    make apache_1.3.33...(install).... . . . Done

    /etc/rc.d/init.d/httpd start: httpd started
    Setting /home permissions to 0711......Done
    Setting permissions for.....vmaxsr...tux......Done

    configure libxml2-2.6.11...(--prefix=/usr).... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Done

    make -j 4 libxml2-2.6.11....... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Done

    make libxml2-2.6.11...(install).... . . . . . . . . . . . . . . . Done

    configure zziplib-0.13.36...(--prefix=/usr).... . . . . . . . . . . . . . . . . . . . . Done

    make -j 4 zziplib-0.13.36....... . . . . . . . . . . . . . . . . . . . . . . . . . . . . Done

    make zziplib-0.13.36...(install).... . . . . . . Done

    Untarring php....Done

    configure php-5.0.4...(--with-apxs=/usr/local/apache/bin/apxs --with-xml --enable-bcmath --enable-calendar --enable-ftp --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 --enable-magic-quotes --with-mysqli --with-mysql=/usr --enable-discard-path --with-pear --enable-sockets --enable-track-vars --enable-versioning --with-zip --with-zlib).... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Done

    make -j 4 php-5.0.4...(clean).... Done

    make -j 4 php-5.0.4....... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Done

    make: *** [libphp5.la] Error 1

    make php-5.0.4...(install).... . . . . . . . . . . . . . . . . . . Done

    make: *** [libphp5.la] Error 1
    /etc/rc.d/init.d/httpd start: httpd started

    configure php-5.0.4...(--prefix=/usr --with-xml --enable-bcmath --enable-calendar --enable-ftp --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 --enable-magic-quotes --with-mysqli --with-mysql=/usr --enable-discard-path --with-pear --enable-sockets --enable-track-vars --enable-versioning --with-zip --with-zlib).... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Done

    make -j 4 php-5.0.4...(clean).... Done

    make -j 4 php-5.0.4....... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Done

    make php-5.0.4...(install).... . . . . . . . . . . . . . . . . . . . . . . . . . . . Done

    initfpsuexec: using apache 1.x support
    PHP version file has been updated to
    Executing /scripts/postbuildapache (if exists)...Done
    /etc/rc.d/init.d/httpd start: httpd started

    Attempting to restart httpd

    Waiting for httpd to restart....
    .
    .
    .
    .
    .
    .
    .
    .
    .
    .
    finished.





    httpd status

    root 19723 0.3 0.0 5344 2884 ? S 19:50 0:00 /usr/local/apache/bin/httpd -DSSL






    httpd started ok

  9. #9
    Member
    Join Date
    Aug 2005
    Posts
    7

    Default

    ok i managed to get it to compile but its *still* as cgi

    so im going to submit a support request

  10. #10
    Member
    Join Date
    Aug 2005
    Posts
    7

    Default

    im back

    a cpanel tech fixed php for me (dont compile with phpsuexec if you want an apache module). but then came a new problem and a confusing one. it seems that php5 as an apache module doesnt execute the scripts properly, the best way to describe it is as if it gets to a point in *any* php script and halts execution (the point where it halts is different for each script).

    has anyone seen that happen before?


    in the mean time im back to using it as a cgi module

  11. #11
    Member
    Join Date
    Sep 2001
    Posts
    315

    Default

    I'm using at the moment php 4.3.11 with phpsuexec. Can I just tick the PHP5 box under "Update Apache" and this will install additionally PHP5? Is then the extension of php5 files *.php5?

    I always thought, this is much more complicate. But I think that's how you do it, right?

    Michael

Similar Threads & Tags
Similar threads

  1. No GD module in PHP5.2.9, how to install?
    By zhaiduo in forum New User Questions
    Replies: 1
    Last Post: 04-20-2010, 09:54 AM
  2. Apache 2.2 PHP5 Out of Memory
    By devourer in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-13-2009, 02:33 PM
  3. Replies: 2
    Last Post: 02-23-2009, 01:09 PM
  4. Can't compile IMAP module in PHP5/4
    By internetfab in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 04-09-2008, 05:50 PM
  5. PHP5 Killed Apache
    By SEAL31 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 12-18-2004, 10:12 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube