View Full Version : error messages??
Cyclist
14th of May 2006 (Sun), 07:47
When I add my custom header and footer to EE I recieve error messages. Probably because they contain external php code for the news system I am using. I do not want to use the ee new system since old news dissappear and it has to be the same on each page of my website.
Is there a way to exclude error messages from being displayed? They only occur with EE, on all other sites (including guestbook) there is no problem at all.
Pekka
14th of May 2006 (Sun), 09:35
In php you can suppress error messages by adding @ right before the command/function/variable. But a better choice is to solve the errors :)
Cyclist
14th of May 2006 (Sun), 09:43
In php you can suppress error messages by adding @ right before the command/function/variable. But a better choice is to solve the errors :)
Then I have to ask you how I can use php include for a news script together with EE? Because without EE it doesn't cause any errors. It produces the errors only if I include it into the pages where my EE gallery is displayed.
If I include the news to my guestbook (php/mysql script as well) there is no problem, and also my other pages can handle it without problem. It's only EE which doesn't run it properly.
I have to include the news like this:
<?PHP
$number=10;
$category=1;
$template=German;
include("../news/show_news.php");
?>
Cyclist
14th of May 2006 (Sun), 11:05
adding @ doesn't have any effects, the error messages are still displayed.
Pekka
14th of May 2006 (Sun), 13:03
Try
<?PHP
$number=10;
$category=1;
$template="German";
include($toroot . "../news/show_news.php");
?>
Cyclist
14th of May 2006 (Sun), 13:25
Thanks, Pekka. But this is not the solution. I still recieve the same error messages:
Warning: file(./data/comments.txt): failed to open stream: No such file or directory in /www/htdocs/xxxx/news/inc/functions.inc.php on line 229
Warning: Invalid argument supplied for foreach() in /www/htdocs/xxxx/news/inc/functions.inc.php on line 231
I don't understand what's going wrong since with my guestbook script I can use it without problems.
Pekka
14th of May 2006 (Sun), 13:52
functions.inc.php tries to include file data/comments.txt but can not find it. Those are not EE files. Apparently show_news.php (not EE file either) was included successfully. Maybe functions.inc.php does not take into account that show_news.php can be started from another location than its home.
Invalid argument supplied for foreach error comes as result of failed include.
EE does not "do" anything to direct php commands.
Cyclist
15th of May 2006 (Mon), 18:23
functions.inc.php tries to include file data/comments.txt but can not find it. Those are not EE files. Apparently show_news.php (not EE file either) was included successfully. Maybe functions.inc.php does not take into account that show_news.php can be started from another location than its home.
Invalid argument supplied for foreach error comes as result of failed include.
EE does not "do" anything to direct php commands.
I figured out the solution. Somehow it didn't recognize they paths by default like in the otrher includes so I had to set the path once again.
NetButch
23rd of May 2006 (Tue), 14:13
Cyclist,
could you post or PM me the code you used.? I am considering a blog/rss feed in the news section of my EE templates as well.
Thanks
Butch
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.