Confused by a PHP error
Posted: Tue Mar 02, 2010 12:44 pm
Hello,
Okay, I've done a heap of googling, trying to chase down the solution, but I'm out of ideas, so I'm bringing it to the pros.
I've got a Joomla! CMS installation with a Wordpress install running with it (they are seperate, though). I've got a Joomla! Module that grabs the most recent post from the Wordpress blog and posts a snippet of it with a link to it on the Joomla! mainpage. I realize that immediately people will be saying "Check both of their support forums", but I honestly think this is just a problem with the PHP code.
So you can see what is going wrong here:
http://www.orosend.com/joomla/ bottom right "recent blog post" column.
The error is:
Warning: file_get_contents(/kunden/homepages/39/d282264226/htdocs/?getmylink=15) [function.file-get-contents]: failed to open stream: No such file or directory in /homepages/39/d282264226/htdocs/joomla/modules/mod_recentwordpressposts/mod_recentwordpressposts.php on line 474
The code on line 474 is:
$link = file_get_contents($_SERVER['DOCUMENT_ROOT']."/joomla/blog/?getmylink=".$id);
The error is, of course, correct. That file does not exist in the directory it is listing. So I know that somewhere in the code, it's saying to look in the wrong directory, but I cannot figure out where.
Damn, I feel like such a noob.
Any help is much appreciated, I can provide more details as needed.
Thanks,
Chris
I realize I could probably just get the host ot turn off errors, but I would really like to get this module working.
Okay, I've done a heap of googling, trying to chase down the solution, but I'm out of ideas, so I'm bringing it to the pros.
I've got a Joomla! CMS installation with a Wordpress install running with it (they are seperate, though). I've got a Joomla! Module that grabs the most recent post from the Wordpress blog and posts a snippet of it with a link to it on the Joomla! mainpage. I realize that immediately people will be saying "Check both of their support forums", but I honestly think this is just a problem with the PHP code.
So you can see what is going wrong here:
http://www.orosend.com/joomla/ bottom right "recent blog post" column.
The error is:
Warning: file_get_contents(/kunden/homepages/39/d282264226/htdocs/?getmylink=15) [function.file-get-contents]: failed to open stream: No such file or directory in /homepages/39/d282264226/htdocs/joomla/modules/mod_recentwordpressposts/mod_recentwordpressposts.php on line 474
The code on line 474 is:
$link = file_get_contents($_SERVER['DOCUMENT_ROOT']."/joomla/blog/?getmylink=".$id);
The error is, of course, correct. That file does not exist in the directory it is listing. So I know that somewhere in the code, it's saying to look in the wrong directory, but I cannot figure out where.
Damn, I feel like such a noob.
Any help is much appreciated, I can provide more details as needed.
Thanks,
Chris
I realize I could probably just get the host ot turn off errors, but I would really like to get this module working.