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.

New Theme in PHP

Discussion in 'General Discussion' started by star, May 27, 2002.

  1. star

    star Registered

    Joined:
    May 25, 2002
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I'm making my own cPanel theme in php and was wondering what the php code for this would be:

    &cpanel Quota=&showquotaused()&&

    any ideas?
     
  2. haze

    haze Well-Known Member

    Joined:
    Dec 21, 2001
    Messages:
    1,550
    Likes Received:
    3
    Trophy Points:
    38
    Can php even be run from within cpanel? I didn't think this was possible.
     
  3. star

    star Registered

    Joined:
    May 25, 2002
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    php in cPanel

    yeah php can run in cPanel and I figured out how to get it working :)
     
  4. jameshsi

    jameshsi Well-Known Member

    Joined:
    Oct 22, 2001
    Messages:
    347
    Likes Received:
    0
    Trophy Points:
    16
    How ?
    Would you tell me,please.
     
  5. masood

    masood Well-Known Member

    Joined:
    Jun 14, 2002
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    Just put a file with .php and put your favourite php code ;)
     
  6. chrisanderton

    chrisanderton Registered

    Joined:
    Mar 27, 2002
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    &?php

    $quotaused = &cpanel Quota=&showquotaused()&&;

    ?&

    puts the value of the cpanel tag into the php as the cpanel code is evaluated first. if it is a string value returned from a cpanel tag you might need to use:

    &?php

    $variable = &&cpanel tag&&;

    ?&

    with the quotes to make sure php uses a string.
     
  7. kosmo

    kosmo Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    403
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    All over Europe
    Unfortunately the PHP version running on the CPanel port is a limited one. Some functions are disabled. I discovered following disabled functions: mail() and file upload.
     
  8. masood

    masood Well-Known Member

    Joined:
    Jun 14, 2002
    Messages:
    78
    Likes Received:
    0
    Trophy Points:
    6
    if mail() does not work, then what's the use of php? :p
     
  9. porcupine

    porcupine Well-Known Member
    PartnerNOC

    Joined:
    Apr 18, 2002
    Messages:
    74
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Toronto, Ontario
    cPanel Access Level:
    DataCenter Provider
    I've had complaints on this. Anyone know how to enable the mail() function?
     
  10. porcupine

    porcupine Well-Known Member
    PartnerNOC

    Joined:
    Apr 18, 2002
    Messages:
    74
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Toronto, Ontario
    cPanel Access Level:
    DataCenter Provider
    I've had complaints on this. Anyone know how to enable the mail() function?
     
  11. chrisanderton

    chrisanderton Registered

    Joined:
    Mar 27, 2002
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    the mail function uses the mail command supplied in the php ini file. i believe this defaults to sendmail. if you don't have sendmail installed, or a sendmail replacement then it will fail.

    you can either modify the php.ini file - look in the [mail_function] section for the sendmail_path line - or use some replacement for sendmail that wraps around exim - i assume there is one..
     
Loading...

Share This Page