Welcome to WebmasterWorld Guest from 54.196.147.57

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

included file mimePart.php not being found

     

deejay

11:42 pm on Aug 2, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi all.

So I'm working my way through using a CRON job to run a php file to backup my mysql database and email it to me.

Oy, what a palaver.

But I'm getting there.. slowly.

Latest error is this:


<br />
<b>Warning</b>: require_once(Mail/mimePart.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in <b>/home/user/php/Mail/mime.php</b> on line <b>75</b><br /> <br /> <b>Fatal error</b>: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'Mail/mimePart.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in <b>/home/user/php/Mail/mime.php</b> on line <b>75</b><br />


mimePart.php DOES exist, and it is in /home/user/php/Mail/.

Can you help me out, what's wrong here?

rocknbil

12:49 am on Aug 3, 2010 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



'K, you might have answered your question without realizing it. Relative paths and full server paths are not the same, though they can often be used that way. Look closely:

require_once(Mail/mimePart.php)


says mime.php is looking for a directory "from wherever is is" called "Mail." But the error demonstrates Mail is NOT in that directory:

Failed opening required 'Mail/mimePart.php' .... in /home/user/php/Mail/mime.php


See that? Either move mime.php **outside** the Mail directory, or modify the include like so:

include($_SERVER['DOCUMENT_ROOT']."/Mail/mimePart.php");

Before doing that though, see if there's some constant defining "PATH_TO_INCLUDES" (PATH_TO_INCLUDES may be something else, example only.) like

include(PATH_TO_INCLUDES."Mail/mimePart.php");

The error tells me it hasn't been properly defined if this is the case.

deejay

1:13 am on Aug 3, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Bill, I could bloody kiss ya!

You're right - mime.php and mimePart.php were sitting right alongside each other in Mail/, but I was reluctant to move anything or mess with the path in the mime.php file because, well, y'know, it's a real program type file, coming from PEAR and all.

So I bit the bullet and moved a copy of mime.php up a level and it's working a treat.

Cannot tell you what a relief it is to know I've got an automated backup underway for this monster.

rocknbil

3:43 pm on Aug 3, 2010 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member



well, y'know, it's a real program type file, coming from PEAR and all.


Then that's very different, you shouldn't have to move anything and doing so may have broken something, unless it was incorrectly installed. Did you find any configuration constants like I mentioned? That is more likely the problem.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month