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 in cpanel?

Discussion in 'General Discussion' started by intrahost, Jan 16, 2002.

  1. intrahost

    intrahost Member

    Joined:
    Dec 1, 2001
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    WTF do i do with php.ini? haha I can\'t get the cpanel to recognize index.php

    what do i have to do? :)

    Thanks!
    Jeff - IntraHost
     
  2. Annette

    Annette Well-Known Member
    PartnerNOC

    Joined:
    Aug 12, 2001
    Messages:
    445
    Likes Received:
    0
    Trophy Points:
    16
    Look in your httpd.conf. Make sure that you have index.php in the DirectoryIndex line.
     
  3. intrahost

    intrahost Member

    Joined:
    Dec 1, 2001
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    its there already
     
  4. wadearnold

    wadearnold Well-Known Member

    Joined:
    Jan 13, 2002
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    16
    I am assuming that mod_php4 is loaded?

    \"<IfDefine HAVE_PHP>
    LoadModule php_module modules/mod_php.so
    </IfDefine>
    <IfDefine HAVE_PHP3>
    LoadModule php3_module modules/libphp3.so
    </IfDefine>
    <IfDefine HAVE_PHP4>
    LoadModule php4_module modules/libphp4.so
    </IfDefine>
    \"

    and of course:

    \"<IfDefine HAVE_PHP>
    AddModule mod_php.c
    </IfDefine>
    <IfDefine HAVE_PHP3>
    AddModule mod_php3.c
    </IfDefine>
    <IfDefine HAVE_PHP4>
    AddModule mod_php4.c
    </IfDefine>\"

    and something like this:
    \"DirectoryIndex index.html index.htm index.shtml index.php index.php4 index.php3 index.cgi\"

    then you need:

    \"<IfModule mod_php4.c>
    AddType application/x-httpd-php .php4 .php3 .phtml .php
    AddType application/x-httpd-php-source .phps
    </IfModule>

    # The following is for PHP3:
    <IfModule mod_php3.c>
    AddType application/x-httpd-php3 .php3
    AddType application/x-httpd-php3-source .phps
    </IfModule>

    # The following is for PHP/FI (PHP2):
    <IfModule mod_php.c>
    AddType application/x-httpd-php .phtml
    </IfModule>
    \"
    Hope that this helps
    wade
     
  5. Gadget

    Gadget Member

    Joined:
    Sep 4, 2001
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    This really has nothing to do with cpanel, php is run using apache not cpanel.
     
  6. intrahost

    intrahost Member

    Joined:
    Dec 1, 2001
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    php is running fine everywhere else but when being called in cpanel it seems, odd.
     
  7. Gadget

    Gadget Member

    Joined:
    Sep 4, 2001
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    things passed via port 2082 are running from the cpanel daemon not apache so php will not work there unless Darkorb found a way to make their cpanel daemon parse php.
     
  8. bens

    bens Member

    Joined:
    Aug 15, 2001
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    Any PHP/Perl scripts that you want to run must be placed in the /usr/local/cpanel/base/backend directory.

    PHP/Perl does not work in the frontend directory.
     
  9. intrahost

    intrahost Member

    Joined:
    Dec 1, 2001
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    thanks, i\'ll try that out!
     
  10. xnull

    xnull Well-Known Member

    Joined:
    Sep 9, 2001
    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    16
    Not entirely true :D I am working on a cpanel theme, and I have used php files (which obviously for a theme must go in the frontend directory).
     
Loading...

Share This Page