Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Member
    Join Date
    Dec 2003
    Posts
    50

    Exclamation how to tell if php is installed as a module (and how to change it!)

    Hello -

    A developer is trying install something on my machine, and he's telling me that he can't because php is installed as a module.

    How can I check to see if it's true?

    and

    How can I change the way it's installed??/

    any advice appreciated!! thanks, Dave

  2. #2
    Member
    Join Date
    Jan 2005
    Posts
    1,880

    Default

    Go to WHM > Software > Update Apache > Load Previous Config.

    If PHP suEXEC Support is not checked, PHP will be running as an Apache module. If you don't want to run PHP as an Apache module, check the suEXEC option and rebuild Apache.

    Bear in mind that if you plan to do so, please please please search these forums for phpsuexec and find out about it beforehand.

  3. #3
    Member
    Join Date
    Dec 2003
    Posts
    50

    Default

    I did this, and it IS checked. However, I wonder if it's loading the last config that I entered into this screen, which had that box checked but failed to work properly.

    The last ACTUAL build was done with /scripts/easyapache using option 1

  4. #4
    Member
    Join Date
    Aug 2002
    Posts
    1,118

    Default

    The easiest solution, place a phpinfo.php file (or name it whatever you want, it doesn't make any difference) in the directory that you are installing the script. Normally just your public_html directory should be sufficient. Place the following code in that file:

    PHP Code:
    <?php
    phpinfo
    ();
    ?>
    Now visit that page in your browser. Near the top, there will be a heading name Server API. If this says Apache, then your account is running PHP as an Apache module. If it says CGI then it is running as a CGI script, probably with PHPSuExec.

  5. #5
    Member
    Join Date
    Jun 2004
    Posts
    61

    Default

    Quote Originally Posted by dhecker
    I did this, and it IS checked. However, I wonder if it's loading the last config that I entered into this screen, which had that box checked but failed to work properly.

    The last ACTUAL build was done with /scripts/easyapache using option 1
    Do option 2 if you want phpsuexec, and I believe all the other options are without.

  6. #6
    Member
    Join Date
    Oct 2004
    Posts
    106

    Exclamation phpinfo.php

    When I run this file, it shows neither, but PHP shows as working from the command line.

    What did I do wrong and most importantly, how the heck do I fix it?

    Also I was told DO NOT use PHPSuExec with PHP 5.0.4, use the regular suexec. Some security isssue. is this true?

  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

    You can easily tell if you're using php as a module or via CGI by searching httpd.conf for mod_php:

    grep mod_php /usr/local/apache/conf/httpd.conf

    If it comes back with a commented in AddModule line, then you're using the module and not phpsuexec.
    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
    Oct 2004
    Posts
    106

    Exclamation MySQL Module or CGI

    Hmmm, does this tell you anything? It's the exact output.


    grep mod_php /usr/local/apache/conf/httpd.conf
    #AddModule mod_php4.c
    AddModule mod_php5.c
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>
    <IfModule mod_php4.c>
    <IfModule mod_php5.c>

  9. #9
    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

    This:
    AddModule mod_php5.c
    Would suggest that you are running php5 using php as a module, not as CGI (phpsuexec).
    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

Similar Threads & Tags
Similar threads

  1. Replies: 14
    Last Post: 03-30-2010, 12:10 PM
  2. The perl module Expect could not be installed
    By will72wein in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 02-18-2010, 10:27 PM
  3. How to change PHP install to ISAPI Module instead of CGI?
    By jdearing in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 04-01-2007, 11:44 AM
  4. Installed module page is blank
    By mr.wonderful in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 06-11-2004, 07:40 AM
  5. Perl Module Installed
    By Nico in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 10-07-2003, 04:59 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube