|included file mimePart.php not being found|
| 11:42 pm on Aug 2, 2010 (gmt 0)|
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:
<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?
| 12:49 am on Aug 3, 2010 (gmt 0)|
'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:
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:
Before doing that though, see if there's some constant defining "PATH_TO_INCLUDES" (PATH_TO_INCLUDES may be something else, example only.) like
The error tells me it hasn't been properly defined if this is the case.
| 1:13 am on Aug 3, 2010 (gmt 0)|
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.
| 3:43 pm on Aug 3, 2010 (gmt 0)|
|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.