Page 1 of 1

I am getting include () problems

Posted: Tue May 07, 2002 2:31 am
by ly_thai_binh
Hello There,

I am getting the problem in sending mail in PHP 4. Please read my following words:

I am using the class of "class.html.mime.mail.inc" for sending mail with attachements. The errors I got as follows:
"
Warning: Failed opening 'class.html.mime.mail.inc' for inclusion (include_path='') in c:inetpubwwwrootphpNewsend.php on line 24

Fatal error: Cannot instantiate non-existent class: html_mime_mail in c:inetpubwwwrootphpNewsend.php on line 45. "

Basically, I have adjusted the path in the file of php.ini in WindowNT to:
1. Include_path=
or
2. include_path="C:PHPclass.html.mime.mail.inc"
After testing some times, I got the same errors mentioned above.
Please help me or show me the ways so that I get over this problems.
Thanks.
LTBinh from Vietnam

Posted: Tue May 07, 2002 6:31 am
by nahp
the directive name is include_path, this is a list of directories not of files
try this:
include="C:PHP"

Solution..?

Posted: Tue May 07, 2002 7:43 am
by pHaZed
I had the same problem on my server,
My problem was resolved simply by commenting out / or deleting the include_path=
setting in php.ini
Also,
Say the file you wanted to include is located in C:ApachePHP
And your wwwroot (or wherever your executing the script from) is located at C:Apachewww
You would include the file like so

Code: Select all

include("../PHP/class.html.mime.mail.inc");
../ = up a dir, use as many of these as needed

Another thing to remember...

Posted: Wed May 08, 2002 3:43 pm
by hitek
with included files, make sure they are either outside the webroot or are using a parsed extension, otherwise it's possible for someone to look at the code inside your include files.
For instance, if index.php includes header.inc, and header.inc is in the webroot, and *.inc files aren't parsed by php.exe, someone could type in
http://www.yoursite.com/header.inc and actually see the code.