include mail.php in prea package installed on cpanel

Armi_Raz

Registered
May 18, 2015
3
0
1
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
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello,

Could you let us know which PHP handler is activated on your system (e.g. suPHP, DSO)?

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
That's the Apache version. Please post the output from the following command:

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

Armi_Raz

Registered
May 18, 2015
3
0
1
Iran
cPanel Access Level
Root Administrator
Hello,

Could you let us know which PHP handler is activated on your system (e.g. suPHP, DSO)?

Thank you.
That's the Apache version. Please post the output from the following command:

Code:
/usr/local/cpanel/bin/rebuild_phpconf --current
Thank you.
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
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.