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.

include mail.php in prea package installed on cpanel

Discussion in 'cPanel Developers' started by Armi_Raz, May 18, 2015.

  1. Armi_Raz

    Armi_Raz Registered

    Joined:
    May 18, 2015
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Iran
    cPanel Access Level:
    Root Administrator
    hi everyone,
    I want to send the user an email from my website after they registeration in the site. I've installed PEAR package manually.(zipped the local pear package in my xammp and uploaded it in home/my_cpanel_account/php, then extracted it).
    so there is PEAR folder in the php folder of my home directory now.
    I want to use include_path in .htaccess file to access the module. so I added this line in the .htaccess of my webroot:

    php_value include_path ".:/usr/lib/php:/usr/local/lib/php:/home/my_cpanel_account/php"

    In the public_html directory there is a submit_user.php file that is going to send the email to the user.
    I used include('mail.php'); in that file for sending email(on the line 39), but after running this file there are errors as below:

    Warning: include(mail.php) [function.include]: failed to open stream: No such file or directory in /home/my_cpanel_account/public_html/submit_user.php on line 39

    Warning: include(mail.php) [function.include]: failed to open stream: No such file or directory in /home/my_cpanel_account/public_html/submit_user.php on line 39

    Warning: include() [function.include]: Failed opening 'mail.php' for inclusion (include_path='/home/malimoha/php:.:/usr/lib/php:/usr/local/lib/php') in /home/my_cpanel_account/public_html/submit_user.php on line 39
    _____________________________________________________________
    The mail.php file is in the Pear folder and also in the Pear/Mail.
    I know there is something wrong with my include_path in .htaccess, or in include(mail). maybe both :)
    By the way the Net_Smtp and Socket are installed in the cpanel.please tell me what to do.
    thank you guys
     
    #1 Armi_Raz, May 18, 2015
    Last edited by a moderator: May 19, 2015
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. Armi_Raz

    Armi_Raz Registered

    Joined:
    May 18, 2015
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Iran
    cPanel Access Level:
    Root Administrator
    it's Apache 2.0 Handler
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    That's the Apache version. Please post the output from the following command:

    Code:
    /usr/local/cpanel/bin/rebuild_phpconf --current
    Thank you.
     
  5. Armi_Raz

    Armi_Raz Registered

    Joined:
    May 18, 2015
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Iran
    cPanel Access Level:
    Root Administrator
    Hi again, sorry for the late answer
    I've done what you said, unfortunately the error occurred saying 500! It seems there are misconfigurations in the server! I've found that I don't have access to php.ini and any server config because I'm using a shared host. I contacted the server management and demanded for access. I will post the result.
    Thanks
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I suggest consulting with your web hosting provider for assistance. It's not realistic to expect root access, but they might be able to help determine the cause of the issue.

    Thank you.
     
Loading...

Share This Page