Page 1 of 1

Warning: require_once(Mail/mime.php)

Posted: Wed Feb 18, 2009 5:42 am
by vani sri
Hi all,

I am using SMTP mail function. Mail sent successfully. When i try to include the MIME function i got the error

Code: Select all

Warning: require_once(Mail/mime.php) [function.require-once]: failed to open stream: No such file or directory in /home/viewtube/public_html/mail.php on line 3
How can i fix this error? Hope any one help me.

Regards,
vani

Re: Warning: require_once(Mail/mime.php)

Posted: Wed Feb 18, 2009 6:23 am
by susrisha

Code: Select all

 
/home/viewtube/public_html/
 
go to this location and see if there is a folder by name Mail

Its possible a file path mismatch problem.

Check to see if the file actually exists in the path expected.

Re: Warning: require_once(Mail/mime.php)

Posted: Wed Feb 18, 2009 6:32 am
by vani sri
Hi susrisha,
Thanks for ur reply.
require_once ('Mail.php');
require_once ('Mail/mime.php');
This are build in files in pear know. Then how the path may change ?

Regards,
vani

Re: Warning: require_once(Mail/mime.php)

Posted: Wed Feb 18, 2009 6:38 am
by susrisha
then you forgot to update the PEAR EXTENSIONS path in the configuration as include path..

Go to php.ini file
Look for the lines

Code: Select all

 
include_path
 
ensure that the path to the PEAR extensions is present. Again i am only suggesting this might be the problem.

I had similiar issues with require_once functions.

and FYI, i have seen much of the PEAR extensions didnt work out for me as it is. some modifications needed. I am not blaming PEAR for this . I blame myself for not understanding the prerequisites.

Re: Warning: require_once(Mail/mime.php)

Posted: Wed Feb 18, 2009 6:54 am
by vani sri
Hi susrisha,

Thanks for ur reply.
I have no experience with this type of error.In my .ini file , i found the path
.:/usr/lib/php:/usr/local/lib/php
In that path i saw PEAR folder also. Then why this functions are not called properly. I have no idea with this error pls kindly give me the instruction how to overcome from this pbm.

Regards,
vani

Re: Warning: require_once(Mail/mime.php)

Posted: Wed Feb 18, 2009 7:25 am
by susrisha
can you post the include path of php.ini file?

Also please see if Mail/ folder is present in the PEAR folder and post the pwd of PEAR in your system.

Re: Warning: require_once(Mail/mime.php)

Posted: Wed Feb 18, 2009 7:35 am
by vani sri
Hi,
http://viewtube.in/info.php This is URL.
In
.:/usr/lib/php:/usr/local/lib/php
this folder i found the PEAR/ folder.

Re: Warning: require_once(Mail/mime.php)

Posted: Wed Feb 18, 2009 7:38 am
by vani sri
I found this Folder /usr/local/lib/php/Mail. But with in this folder mime.php is not found.

Re: Warning: require_once(Mail/mime.php)

Posted: Wed Feb 18, 2009 7:49 am
by susrisha
then its not the issue with php.. its the issue with the downloaded PEAR extensions for the solution. if you find /usr/local/lib/php/PEAR/Mail/mime.php , then add the path to include path as

.:/usr/lib/php:/usr/local/lib/php:usr/local/lib/php/PEAR

Then restart the apache server and check please.
sorry if it has been troubling long time. cant do anything but try to help.

Re: Warning: require_once(Mail/mime.php)

Posted: Wed Feb 18, 2009 7:55 am
by vani sri
Hi susrisha,

Thank for ur information sharing. mime.php file is missing.
So i
pear install Mail Mail_mime
to install the mime.
Now i got the output. Thank u very much.

Regards,
vani

Re: Warning: require_once(Mail/mime.php)

Posted: Wed Feb 18, 2009 8:02 am
by susrisha
so it was a file missing problem or a module was not yet installed?? any how problem solved.. ;)