- Forums
 - PHP
 - Failed opening required 'Mail.php' include_path='
 
Do Yo Get This Error On Your Scripts Failed Opening Required 'mail.php' Include_path= [2079], Last Updated: Mon Jun 24, 2024 
 
 Webune Support
 Fri Jan 08, 2010 
 2 Comments
 3728 Visits
do yo get this error on your scripts?
Warning: require_once(Mail.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/html/email.php on line 83
Fatal error: require_once() [function.require]: Failed opening required 'Mail.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/web1/web/v5/modules/default/pages/forgot-password.php on line 83well if you do this is how you can solve this error message:
Webune offers Web Hosting for all types of websites.
if your considering changing hosting company, sign up today. we provide the best support service!
so why are you getting this error: Basically you are getting this error because the Mail.php pear class is not found by your script
so how do you fix it? by installing the function
how do you install Mail.php: login to your server as superuser and send this shell command:
yum install php-pear-Mail
after you send this command you will get a prompt to install. enter 'y' for yes
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.facebook.net
 * base: linux.mirrors.es.net
 * extras: centos-distro.cavecreek.net
 * updates: mirrors.cat.pdx.edu
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-pear-Mail.noarch 0:1.1.14-1.el5.centos set to be updated
--> Processing Dependency: php-pear(Net_SMTP) >= 1.1.0 for package: php-pear-Mail
--> Running transaction check
---> Package php-pear-Net-SMTP.noarch 0:1.2.10-1.el5.centos set to be updated
--> Processing Dependency: php-pear(Net_Socket) >= 1.0.7 for package: php-pear-Net-SMTP
--> Processing Dependency: php-pear(Auth_SASL) for package: php-pear-Net-SMTP
--> Running transaction check
---> Package php-pear-Auth-SASL.noarch 0:1.0.2-4.el5.centos set to be updated
---> Package php-pear-Net-Socket.noarch 0:1.0.8-1.el5.centos set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
 Package                 Arch       Version                    Repository  Size
================================================================================
Installing:
 php-pear-Mail           noarch     1.1.14-1.el5.centos        extras      26 k
Installing for dependencies:
 php-pear-Auth-SASL      noarch     1.0.2-4.el5.centos         extras      11 k
 php-pear-Net-SMTP       noarch     1.2.10-1.el5.centos        extras      18 k
 php-pear-Net-Socket     noarch     1.0.8-1.el5.centos         extras      12 k
Transaction Summary
================================================================================
Install      4 Package(s)
Update       0 Package(s)
Remove       0 Package(s)
Total download size: 67 k
Is this ok [y/N]
then it will start to download and install:
Downloading Packages:
(1/4): php-pear-Auth-SASL-1.0.2-4.el5.centos.noarch.rpm  |  11 kB     00:00
(2/4): php-pear-Net-Socket-1.0.8-1.el5.centos.noarch.rpm |  12 kB     00:00
(3/4): php-pear-Net-SMTP-1.2.10-1.el5.centos.noarch.rpm  |  18 kB     00:00
(4/4): php-pear-Mail-1.1.14-1.el5.centos.noarch.rpm      |  26 kB     00:00
--------------------------------------------------------------------------------
Total                                            60 kB/s |  67 kB     00:01
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : php-pear-Auth-SASL                                       1/4
  Installing     : php-pear-Net-Socket                                      2/4
  Installing     : php-pear-Net-SMTP                                        3/4
  Installing     : php-pear-Mail                                            4/4
Installed:
  php-pear-Mail.noarch 0:1.1.14-1.el5.centos
Dependency Installed:
  php-pear-Auth-SASL.noarch 0:1.0.2-4.el5.centos
  php-pear-Net-SMTP.noarch 0:1.2.10-1.el5.centos
  php-pear-Net-Socket.noarch 0:1.0.8-1.el5.centos
Complete!
then restart your web server:
/etc/init.d/httpd restart
now you should not get this error message.
note: it works on Redhat, Fedora and Centos - have not tried other distributions as of yet