Warnings shown above CUSTOM PAGE

Started by replica, July 24, 2010, 11:16:59 AM

Previous topic - Next topic

replica

Hi,

I wanted to integrate my webpage(just 1 page for now) into SMF, so searched here in this forum & found out the solution. (I forgot the link from where I got it)
Its just a single page(.php) that does some database operation...(different from SMF's database)

The problem is, whenever I open that page I get few warnings on top of the page. Its not a problem, I mean the page successfully loads but its kinda sad to see some errors on top!
The warnings are something like this:

Quote
Warning: fopen(/home/(my_username)/public_html/cache/lang_index+Modifications_english_default.php) [function.fopen]: failed to open stream: Permission denied in /home/(my_username)/public_html/Sources/ManageMaintenance.php  on line 1534

Warning: fwrite(): supplied argument is not a valid stream resource in /home/(my_username)/public_html/Sources/ManageMaintenance.php on line 1536

Warning: fclose(): supplied argument is not a valid stream resource in /home/(my_username)/public_html/Sources/ManageMaintenance.php on line 1618


I've used the following technique to make my page look like a part of the forum.

Quote
<?php
require_once("SSI.php");

$context['page_title_html_safe'] = 'My Page Title';

template_header();


if(!($context['user']['is_logged'])) {

// If they are not logged in, redirect them to INDEX.php

header("Location: index.php");

exit;

}

?>

My page contents goes here.
My page is a ".php" file which does some database operations(on a different database).
My page contents involve html tags, php, mysql. But I'm sure none of the contents here uses any of the SMF files.


<?php

template_footer();

// ssi_shutdown();

?>

Please help me ASAP.
If more information is required, please ask me. I'll provide it here.

Thank you.

Mick.

The code above worked for me just fine.   I can see it logged in.  But as a guest, it takes me to the forum.

I created a test.php page and added the code.  It works


Have you modified anything else?



replica

No, I've not touched any of the SMF files.

But I have some mods, well actually quite a lot of mods. Maybe that's causing the problems?

Does that warning have anything to do with the SSI.php or any of the functions related to it?

If its something caused by one of the mods I have, then, is there a way to find out which mod & how to resolve it?

xenovanis

Could you try clearing your forums cache?
"Insanity: doing the same thing over and over again and expecting different results."

replica

Quote from: xenovanis on July 24, 2010, 12:07:50 PM
Could you try clearing your forums cache?
I tried that, didnt work. Still getting the same errors.

Actually while I was at it, I saw the ERROR logs. I cleared it first & rechecked the custom page, but still getting the warnings.
I went back to the error logs section again, I did 'CLEAR ALL' but everytime there is a min of 20 errors left out. And if I navigate to some other section & come back & check the error log, it would have increased to almost 140 errors now.(those errors are showing the same content as the warnings in my 1st post).

I think, these warnings are being generated everytime I navigate in the forum, its just not displaying it. It displays it only in my custom page. :(

Advertisement: